summaryrefslogtreecommitdiffstats
path: root/net/disk_cache
Commit message (Collapse)AuthorAgeFilesLines
* Disk cache: Close the current experiment for new users.rvargas@google.com2010-10-141-28/+6
| | | | | | | | | | | | | (increasing the number of deleted entries) BUG=none TEST=none TBR=gavinp Review URL: http://codereview.chromium.org/3778002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62643 0039d316-1c4b-4281-b951-d872f2087c98
* Move Stats, histograms, and field trial into a metrics subdirectory of base andbrettw@chromium.org2010-10-147-26/+31
| | | | | | | | | put them in the base namespace. TEST=it compiles BUG=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62510 0039d316-1c4b-4281-b951-d872f2087c98
* This adds a cache_util::MoveCacheContents function for ChromeOS to usegspencer@chromium.org2010-10-124-3/+123
| | | | | | | | | | | | | | | | | | when "cleaning" the cache, since we don't actually want to remove the old cache directory. Because when we do that creating it anew will cause ecryptfs to give it an encrypted name, and we want to be able to find the cache directories in an encrypted user home dir. [This was already reviewed and LGTM'd here: http://codereview.chromium.org/3560001/show But never made it into the tree] BUG=chromium-os:6859 TEST=added and ran unittest, ran chrome in new user_data dir and cleared cache. Review URL: http://codereview.chromium.org/3714002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62257 0039d316-1c4b-4281-b951-d872f2087c98
* clang: Let everything compile in Release builds.thakis@chromium.org2010-10-103-0/+6
| | | | | | | | | | | Release builds also require http://code.google.com/p/googletest/issues/detail?id=321 BUG=None TEST=None Review URL: http://codereview.chromium.org/3700001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62128 0039d316-1c4b-4281-b951-d872f2087c98
* clang/mac: Fix almost all problems when building all.xcodeproj.thakis@chromium.org2010-10-041-22/+0
| | | | | | | | BUG=None TEST=None TBR=hans git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61344 0039d316-1c4b-4281-b951-d872f2087c98
* Reland 61124 - Disk Cache: Add a quick return path for truncating an empty ↵rvargas@google.com2010-10-011-3/+8
| | | | | | | | | | | | | | | stream and make sure that Flush() doesn't fail when it has nothing to do. BUG=56872, 57395 TEST=none Review URL: http://codereview.chromium.org/3551005 Review URL: http://codereview.chromium.org/3576007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61183 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 61124 To see if interactive_ui_test (AutocompleteEditViewTest)rvargas@google.com2010-10-011-8/+3
| | | | | | | | | | | | | | | | | | go green. Disk Cache: Add a quick return path for truncating an empty stream and make sure that Flush() doesn't fail when it has nothing to do. BUG=56872, 57395 TEST=none Review URL: http://codereview.chromium.org/3551005 TBR=rvargas@google.com Review URL: http://codereview.chromium.org/3543007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61138 0039d316-1c4b-4281-b951-d872f2087c98
* Disk Cache: Add a quick return path for truncating an empty streamrvargas@google.com2010-09-301-3/+8
| | | | | | | | | | | and make sure that Flush() doesn't fail when it has nothing to do. BUG=56872, 57395 TEST=none Review URL: http://codereview.chromium.org/3551005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61124 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Move ctors/dtors into implementation files. Adds ctors/dtors to ↵erg@google.com2010-09-302-1/+3
| | | | | | | | | | | | | | non-POD structs. Cuts ~2MB off our .a files (Debug, Linux). Also added the "virtual" keyword on a whole bunch of virtual dtors that were missing it. BUG=none TEST=compiles Review URL: http://codereview.chromium.org/3522004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61100 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Change the way we delete files.rvargas@google.com2010-09-295-16/+75
| | | | | | | | | | | | | | | | | | | | | | | | | Now we always share delete and request delete access when we open the files, and don't close the handle before deleting a file. The result is that the delete operation should not be prevented by someone opening the file right after we close our handle. The downside is that anybody attempting to open one of our files while the browser is running will have to also share delete or their request will fail. On the other hand, we don't really want other people modifying the files at the same time, so the change may be for good. The caveat is that I think most of the failures are result of improper AV behavior, so we have to see what happens. BUG=16723 TEST=net_unittests Review URL: http://codereview.chromium.org/3475025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60989 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Handle failures growing the user_buffer thatrvargas@google.com2010-09-295-18/+103
| | | | | | | | | | | | | | | | | | | should result in data going to an external file. After PrepareBuffer() we must always have either a buffer that will receive the user data, or an initialized address that points to the correct block or external file to receive the data. This CL makes sure that when we end up without a buffer, the second condition is met. BUG=56872 TEST=net_unittests Review URL: http://codereview.chromium.org/3471016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60958 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Moves code to the headers.erg@google.com2010-09-288-26/+51
| | | | | | | | | | | | | One of the big things is starting to move/declare ctors/dtors that derive from RefCounted<> to/in the implementation file. (Saves 4 megabytes from libglue.a alone. 1 meg off libbrowser.a. Hundred of kilobyte savings in a large number of .a files; only libmedia.a grew and it's only 100k.) BUG=none TEST=compiles Review URL: http://codereview.chromium.org/3452030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60863 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Add a little more tracing for the stress testrvargas@google.com2010-09-271-0/+3
| | | | | | | | | | | tool. BUG=55605 TEST=none Review URL: http://codereview.chromium.org/3452024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60675 0039d316-1c4b-4281-b951-d872f2087c98
* net: Append base:: in the StringPrintf calls.tfarina@chromium.org2010-09-255-18/+25
| | | | | | | | | | | (Note: This is a TODO in string_util.h) BUG=None TEST=trybots Review URL: http://codereview.chromium.org/3390026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60555 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Small adjustment so that we continue withrvargas@google.com2010-09-231-2/+4
| | | | | | | | | | | | | | the process of creating a new entry after we detect a dirty entry with a partial hash collision. Detected with stress_cache. BUG=none TEST=none Review URL: http://codereview.chromium.org/3404013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60376 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 60165 - GTTF: Make net_unittests run successfully with parallel test ↵phajdan.jr@chromium.org2010-09-229-121/+139
| | | | | | | | | | | | | | | | launcher by using a unique directory for disk cache tests. BUG=54098 TEST=run net_unittests using tools/parallel_launcher/parallel_launcher.py Review URL: http://codereview.chromium.org/3410008 TBR=phajdan.jr@chromium.org Review URL: http://codereview.chromium.org/3387012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60166 0039d316-1c4b-4281-b951-d872f2087c98
* GTTF: Make net_unittests run successfully with parallel test launcherphajdan.jr@chromium.org2010-09-229-139/+121
| | | | | | | | | | | by using a unique directory for disk cache tests. BUG=54098 TEST=run net_unittests using tools/parallel_launcher/parallel_launcher.py Review URL: http://codereview.chromium.org/3410008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60165 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a bunch of clang warnings/errors.thakis@chromium.org2010-09-211-13/+0
| | | | | | | | | BUG=None TEST=None Review URL: http://codereview.chromium.org/3473006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60109 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Fix the include order.rvargas@google.com2010-09-201-1/+1
| | | | | | | | | | BUG=55970 TEST=none Review URL: http://codereview.chromium.org/3458006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59952 0039d316-1c4b-4281-b951-d872f2087c98
* Annotate test-only race in DiskCacheBackendTest.NewEvictionTrimInvalidEntrytimurrrr@chromium.org2010-09-171-0/+8
| | | | | | | | | | | also remove the suppressions which won't be needed anymore. Also remove suppression for an old bug 30960 fixed long ago. BUG=55970,30960 TBR=rvargas TEST=trybots, TSan Review URL: http://codereview.chromium.org/3416009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59778 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Start an experiment to measure the impact ofrvargas@google.com2010-09-162-6/+39
| | | | | | | | | | | | throttling cache requests. BUG=54338 TEST=none Review URL: http://codereview.chromium.org/3388009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59729 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Fix the order in which we delete datarvargas@google.com2010-09-1615-54/+356
| | | | | | | | | | | | | | | | | | | | | from the block files. Stress testing the cache reveals a problem with the deletion of some data from an entry: it is possible to crash in a way that the block file thinks a block is free and an entry thinks the block is in use. This CL corrects that issue. There is also some new tests and a bunch of DCHECKS added while looking for the problem, as well as adding tests to make sure that a block file is accessed only from one thread (there is no problem with the current code in that regard) BUG=55605 TEST=netunittests Review URL: http://codereview.chromium.org/3430004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59711 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Move Extension::LaunchContainer to extension_constants.h.erg@google.com2010-09-162-3/+5
| | | | | | | | | | | This makes browser.h not depend on extension.h. BUG=none TEST=compiles Review URL: http://codereview.chromium.org/3399008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59588 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Implement request throttling.rvargas@google.com2010-09-144-10/+82
| | | | | | | | | | | | | Note that no throttling is performed with this change, the backend is not activating the feature. BUG=54338 TEST=none. Review URL: http://codereview.chromium.org/3416002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59437 0039d316-1c4b-4281-b951-d872f2087c98
* Disk Cache: Run another experiment: Increase the numberrvargas@google.com2010-09-135-21/+107
| | | | | | | | | | | | | | | | | of deleted entries that we keep around. I'm doubling the number of deleted entries for about 13% of the dev channed. I'm also adding a few extra histograms. BUG=none TEST=none Review URL: http://codereview.chromium.org/3343010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59243 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Fix the path for stress_cache.rvargas@google.com2010-09-091-1/+1
| | | | | | | | | | | | | | | r29136 broke the temp path used for stress_cache. I'm switching it back to the desired location (it should not interfere with the path for net_unittests). BUG=none TEST=none Review URL: http://codereview.chromium.org/3300019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59004 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Move more ctors/dtors from headers to implementation.erg@google.com2010-09-016-21/+61
| | | | | | | | | | | | | | | | | - Adding/Moving dtors of objects that have CancelableRequestConsumers shaves three megs off browser.a. - Adding/Moving dtors of objects that have ScopedRunnableMethodFactories only shaved 100k off browser.a/renderer.a. - Adding/Moving dtors of objects that used some form of base::*Timer<> was negligible; there were only a few classes that had a Timer but had a ctor/dtor in the header after the previous cleanups. BUG=none TEST=compiles Review URL: http://codereview.chromium.org/3278006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58192 0039d316-1c4b-4281-b951-d872f2087c98
* Add an optional parameter to CreatePlatformFile() to report the typedumi@chromium.org2010-08-314-5/+5
| | | | | | | | | | | | of error that occured while trying to open/create a file. TEST=none BUG=none Review URL: http://codereview.chromium.org/3223007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58045 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: For an AppCache, now we only update thervargas@google.com2010-08-279-27/+177
| | | | | | | | | | | | | | | | | | | | | | | | LRU list when an entry is created. This means that we don't update the list anymore when an entry is accessed, even if we are writing to the entry. The general idea is that now we should be able to open an AppCache and read from it without modifying the contents of the cache, so that if the browser crashes, we won't find "dirty" entries to discard. By minimizing writes to the LRU list, we reduce the chances that the list will get corrupt beyond the point where we cannot trust it anymore if the whole system crashes (and not just the browser). BUG=51870 TEST=net_unittests Review URL: http://codereview.chromium.org/3186032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57697 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Add a new uma histogram for the total internalrvargas@google.com2010-08-272-1/+4
| | | | | | | | | | | | buffers size. BUG=none TEST=none Review URL: http://codereview.chromium.org/3211003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57615 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Remove the check for no open entries at destructionrvargas@google.com2010-08-251-1/+4
| | | | | | | | | | | | | | | if we are not running a net_unittest. We have no way to enforce that the browser closes all backend entries (HttpCacheTransactions) before deleting the cache. BUG=52366 TEST=none Review URL: http://codereview.chromium.org/3119039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57422 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Extend the internal buffering performed by each entryrvargas@google.com2010-08-2311-543/+1079
| | | | | | | | | | | | | | | | | | | | | | to cover external files. We now keep a variable-size buffer and use it even after we know that the data is not going to be stored by a block-file. The backend keeps track of the total memory used by all entries and prevents that value from going over a max value that depends on the total memory available. This CL removes the tests that were checking the synchronous operation of sparse IO because that model is no longer supported by the public API, and this CL would add complexity to them (they fail due to thread safety concerns). BUG=6626 TEST=net_unittests Review URL: http://codereview.chromium.org/3167020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57082 0039d316-1c4b-4281-b951-d872f2087c98
* Remove obviously unneeded forward declarations from headers under ↵viettrungluu@chromium.org2010-08-212-4/+0
| | | | | | | | | | | src/{app,base,net}. BUG=none TEST=builds Review URL: http://codereview.chromium.org/3136025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56995 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Remove unnecessary STL #includes from src/net.viettrungluu@chromium.org2010-08-194-12/+3
| | | | | | | | | | | | This removes obviously unneeded inclusions of <map>, <set>, <string>, <vector>, etc. from src/net. BUG=none TEST=builds Review URL: http://codereview.chromium.org/3132022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56654 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Remove unneeded headers from base/ (part 6)thestig@chromium.org2010-08-191-4/+3
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/3093013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56641 0039d316-1c4b-4281-b951-d872f2087c98
* CommandLine: eliminate wstring-accepting AppendLooseValueevan@chromium.org2010-08-131-1/+1
| | | | | | | | Instead use AppendArg variants which accept a FilePath or an ASCII string. Review URL: http://codereview.chromium.org/3134008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56100 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Remove unneeded headers from base/ (part 1)thestig@chromium.org2010-08-051-1/+0
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/3071012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55034 0039d316-1c4b-4281-b951-d872f2087c98
* Convert more callers of the integer/string functions to usingbrettw@chromium.org2010-07-311-2/+4
| | | | | | | | | | string_number_conversions.h TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/3013046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54454 0039d316-1c4b-4281-b951-d872f2087c98
* More FRIEND_TEST_ALL_PREFIXES.phajdan.jr@chromium.org2010-07-301-4/+4
| | | | | | | | | TEST=none BUG=44549 Review URL: http://codereview.chromium.org/3053024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54388 0039d316-1c4b-4281-b951-d872f2087c98
* Disk Cache: Replace the backend pointer of the ChildrenDeleterrvargas@google.com2010-07-274-5/+68
| | | | | | | | | | | with a weak pointer to avoid crashing at shutdown. BUG=50082 TEST=net_unittests Review URL: http://codereview.chromium.org/3054012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53838 0039d316-1c4b-4281-b951-d872f2087c98
* `#pragma once` for app, base, chrome, gfx, ipc, net, skia, viewsthakis@chromium.org2010-07-2630-0/+30
| | | | | | | | | BUG=50273 TEST=everything still builds, build is 10% faster on windows, same speed on mac/linux TBR: erg git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53716 0039d316-1c4b-4281-b951-d872f2087c98
* Disk Cache: Cleaner way to stop evictions at destruction.rvargas@google.com2010-07-233-14/+5
| | | | | | | | | | BUG=49547 TEST=none Review URL: http://codereview.chromium.org/3008014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53421 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: fix the name of some histograms.rvargas@google.com2010-07-201-9/+9
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/2824059 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53075 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Stop evictions while performing final cleanup.rvargas@google.com2010-07-204-2/+31
| | | | | | | | | | | | | The evictions code may post tasks for further processing and that is a problem at cache destruction, so add an explicit method to stop evictions. BUG=49547 TEST=none Review URL: http://codereview.chromium.org/2854053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52964 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Protect the code against misuse...rvargas@google.com2010-07-193-6/+7
| | | | | | | | | | | | | So avoid crashing even if the destructor is not called before killing the IO thread. BUG=49271 TEST=none Review URL: http://codereview.chromium.org/3044006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52924 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Final code cleanup from the thread switch.rvargas@google.com2010-07-172-147/+147
| | | | | | | | | | | No code change. BUG=26730 TEST=none Review URL: http://codereview.chromium.org/3005006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52792 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Code cleanup after the last cl.rvargas@google.com2010-07-156-364/+316
| | | | | | | | | | BUG=26730 TEST=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52527 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Read the index and data_0 files in a singlervargas@google.com2010-07-158-86/+174
| | | | | | | | | | | | | | | | operation to reduce multiple IO operations generated by on-demand paging. Also, generate extra histograms and improve the scale of some others. BUG=none TEST=net_unittests Review URL: http://codereview.chromium.org/2891022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52506 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Switch the disk cache to use the cache_thread.rvargas@google.com2010-07-1316-220/+1449
| | | | | | | | | | | | | Add an InFlightBackendIO class that handles posting of cacheoperations back and forth between the IO thread and the cachethread. BUG=26730 TEST=unit tests Review URL: http://codereview.chromium.org/2945002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52185 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Add a few more histograms.rvargas@google.com2010-07-123-2/+42
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/2863039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52140 0039d316-1c4b-4281-b951-d872f2087c98