summaryrefslogtreecommitdiffstats
path: root/net/disk_cache
Commit message (Collapse)AuthorAgeFilesLines
...
* Disk cache: Reset mask_ when the disk cache is being restarted.rvargas@google.com2009-05-282-0/+71
| | | | | | | | | | | | | | | It is possible that the size for the index table is reduced when the cache is restarted (the available disk space could be lower than what it was when the cache was originally created). If that is the case, not resetting mask_ to 0 will prevent the mask to be set correctly for the new table size, resulting in a crash. BUG=12378 TEST=unittests Review URL: http://codereview.chromium.org/113930 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17052 0039d316-1c4b-4281-b951-d872f2087c98
* Set the disk cache file version properly if new_evictionrvargas@google.com2009-05-121-0/+5
| | | | | | | | | | | is set. BUG=none TEST=none Review URL: http://codereview.chromium.org/115271 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15918 0039d316-1c4b-4281-b951-d872f2087c98
* Close the disk cache experiment for new users.rvargas@google.com2009-05-081-18/+2
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/114014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15646 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a browser crash when reading the disk cache experiment datarvargas@google.com2009-05-041-5/+6
| | | | | | | | | | | after failing to map the index file. BUG=11414 TEST=none Review URL: http://codereview.chromium.org/100349 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15235 0039d316-1c4b-4281-b951-d872f2087c98
* Deprecate wstring version of PathService::Get() in net.thestig@chromium.org2009-05-013-11/+12
| | | | | | Review URL: http://codereview.chromium.org/100240 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15088 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a few broken histograms.rvargas@google.com2009-04-302-10/+8
| | | | | | Review URL: http://codereview.chromium.org/99214 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14984 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Set up a new experiment on the dev channel.rvargas@google.com2009-04-223-10/+85
| | | | | | | | | Enable the new eviction algorithm for 10% of the current users on the dev channel. Review URL: http://codereview.chromium.org/79064 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14229 0039d316-1c4b-4281-b951-d872f2087c98
* Stop using deprecated file_util::Trim* functions.thestig@chromium.org2009-04-211-4/+5
| | | | | | Review URL: http://codereview.chromium.org/79053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14121 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Modify the unit tests so that they test bothrvargas@google.com2009-04-179-150/+397
| | | | | | | | eviction algorithms without having to recompile the code. Review URL: http://codereview.chromium.org/79031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13909 0039d316-1c4b-4281-b951-d872f2087c98
* s/delete/delete[]/thestig@chromium.org2009-04-151-1/+1
| | | | | | Review URL: http://codereview.chromium.org/67174 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13759 0039d316-1c4b-4281-b951-d872f2087c98
* Fix strict aliasing warning in disk_cache_perftest.thestig@chromium.org2009-04-141-4/+2
| | | | | | Review URL: http://codereview.chromium.org/67144 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13717 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Enable the code that sets the max size automatically.rvargas@google.com2009-04-143-10/+69
| | | | | | | | (still limiting the ceiling). Review URL: http://codereview.chromium.org/68007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13684 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Finish the current experiment.rvargas@google.com2009-04-103-52/+24
| | | | | | Review URL: http://codereview.chromium.org/67046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13535 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: fix broken UMA reports.rvargas@google.com2009-04-093-2/+11
| | | | | | Review URL: http://codereview.chromium.org/62176 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13431 0039d316-1c4b-4281-b951-d872f2087c98
* Disk Cache: Make sure that an entry that pretends to bervargas@google.com2009-03-302-0/+20
| | | | | | | | | | | | | | | | "clean" is not really dirty. If for some reason an entry is left on disk with a pointer on the rankings node but without the dirty flag set, we now recognize it as dirty the next time we read it from disk. BUG=3987 TEST=DiskCacheTest.Backend_NotMarkedButDirty Review URL: http://codereview.chromium.org/57024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12820 0039d316-1c4b-4281-b951-d872f2087c98
* Add some includes needed by GCC 4.4.0mark@chromium.org2009-03-301-0/+1
| | | | | | | | | | | | base/string16.h uses EOF thus #include <stdio.h> net/disk_cache/trace.cc uses vsnprintf thus #include <stdio.h> Patch by Craig Schlenter <craig.schlenter@gmail.com> Review URL: http://codereview.chromium.org/46092 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12777 0039d316-1c4b-4281-b951-d872f2087c98
* Disk Cache: Second pass (and final) to allow multiple instancesrvargas@google.com2009-03-277-66/+148
| | | | | | | | | | | | | | | | | | | of BackendImpl. This cl takes care of all the histograms on the disk cache. Most of them have to be splitted in three so that we get separate data from different cache types. There are a few places where the complexity of splitting the histogram is not worth it so we just keep either all data together (if it makes sense), or just ignore data for some types of caches. note: Having multiple versions of a histogram but only one "active" for a given client is not the same as having multiple histograms working at the same time for different objects. Review URL: http://codereview.chromium.org/42682 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12692 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Add a unit test that instantiates three cachesrvargas@google.com2009-03-263-7/+50
| | | | | | | | | at the same time (for media files). Review URL: http://codereview.chromium.org/45061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12561 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: First pass to make it possible to havervargas@google.com2009-03-2511-44/+84
| | | | | | | | | | | | multiple instances of BackendImpl. We need multiple objects to be able to support media files on the cache. After this change, histograms will be the only thing that get messed up by multiple disk caches. Review URL: http://codereview.chromium.org/49027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12520 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: fix the report of first-eviction data to include onlyrvargas@google.com2009-03-251-1/+1
| | | | | | | | | | new users (so the file format has a valid create_time) Histograms from dev channel (171) are incorrect. Review URL: http://codereview.chromium.org/49032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12505 0039d316-1c4b-4281-b951-d872f2087c98
* Add a new histogram macro to replace a few explicit calls.rvargas@google.com2009-03-242-19/+17
| | | | | | | | There is no real change in functionality. Review URL: http://codereview.chromium.org/42514 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12400 0039d316-1c4b-4281-b951-d872f2087c98
* Use #pragma pack as documented to work with GCC and MSVCmark@chromium.org2009-03-241-2/+2
| | | | | | Review URL: http://codereview.chromium.org/49017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12384 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: More instrumentation for the cache.rvargas@google.com2009-03-206-15/+192
| | | | | | | | | | | | | | Now we separate data between before and after the cache is full. Also, reduce the rate at which a particular client sends data to be only once a week. The effect is that the histogram data will only have one value per client, and the same client will not be "voting" on more than one version (release) at the same time. Review URL: http://codereview.chromium.org/50063 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12218 0039d316-1c4b-4281-b951-d872f2087c98
* initialize mixed_ in the File(PlatformFile) constructor variant.ericroman@google.com2009-03-202-2/+2
| | | | | | Review URL: http://codereview.chromium.org/42419 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12193 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Store the stats only once every five minutes.rvargas@google.com2009-03-191-1/+1
| | | | | | Review URL: http://codereview.chromium.org/48171 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12070 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Instead of saving the cache stats only whenrvargas@google.com2009-03-183-11/+22
| | | | | | | | | | | | the destructor is called, store them each five minutes. From the dev channel, 15% of the runs the disk cache destructor is not called, so the stats are not that reliable without this change. Review URL: http://codereview.chromium.org/42373 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12043 0039d316-1c4b-4281-b951-d872f2087c98
* Document how we avoid running leaky tests under Purify and Valgrind,dkegel@google.com2009-03-181-0/+8
| | | | | | | | and copy Purify's list of leaky net tests for Valgrind's benefit. Review URL: http://codereview.chromium.org/42309 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12042 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: A few minor fixes to make coverity happy.rvargas@google.com2009-03-184-4/+8
| | | | | | Review URL: http://codereview.chromium.org/48155 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12028 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: First implementation of TrimDeleted() and a fewrvargas@google.com2009-03-185-10/+70
| | | | | | | | | | other fixes related to the new eviction code. As before, almost everything is disabled by default. Review URL: http://codereview.chromium.org/48112 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11995 0039d316-1c4b-4281-b951-d872f2087c98
* Remove unneeded uses of base/ref_counted.h.thestig@chromium.org2009-03-181-1/+0
| | | | | | Review URL: http://codereview.chromium.org/48105 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11974 0039d316-1c4b-4281-b951-d872f2087c98
* Fix incorrect include guards in net/, where the guard didn't match the filename.deanm@chromium.org2009-03-171-3/+3
| | | | | | | | | Also add a guard to data_url.h which was missing a guard. Review URL: http://codereview.chromium.org/42282 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11865 0039d316-1c4b-4281-b951-d872f2087c98
* Make sure that net_perftest doesn't leave temporary files.phajdan.jr@chromium.org2009-03-163-15/+39
| | | | | | | | BUG=8580 Review URL: http://codereview.chromium.org/48003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11753 0039d316-1c4b-4281-b951-d872f2087c98
* Highlights of changes:hclam@chromium.org2009-03-132-12/+11
| | | | | | | | | | | | | | | | | | | 1. Added entry to ResourceResponseHead so that it contains either a base::PlatformFile (OS_WIN) or base::FileDescriptor (OS_POSIX) for passing the file handle from browser to renderer process. 2. Also added IPC messages for reporting download progress and ACK message for it. ResourceLoaderBridge::Peer::OnDownloadProgress is added so that the peer is notified of the download progress in the renderer process. 3. Load flag to kick start the resource loading for media files. LOAD_MEDIA_RESOURCE is added so that ResourceDispatcherHost knows how to use a different ResourceHandler for handling media resource request. Review URL: http://codereview.chromium.org/27168 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11661 0039d316-1c4b-4281-b951-d872f2087c98
* Removed unneeded includes of base/scoped_ptr.h. Reduce usage from ~800 files ↵thestig@chromium.org2009-03-131-0/+1
| | | | | | | | to ~400. Review URL: http://codereview.chromium.org/46039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11651 0039d316-1c4b-4281-b951-d872f2087c98
* Remove unneeded uses of logging.h in header files.thestig@chromium.org2009-03-124-0/+4
| | | | | | Review URL: http://codereview.chromium.org/43148 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11590 0039d316-1c4b-4281-b951-d872f2087c98
* NO CODE CHANGEdeanm@chromium.org2009-03-1134-34/+0
| | | | | | | | | Normalize end of file newlines in net/. All files end in a single newline. Review URL: http://codereview.chromium.org/43079 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11442 0039d316-1c4b-4281-b951-d872f2087c98
* New disk cache eviction algorithm (partial implementation).rvargas@google.com2009-03-0613-110/+638
| | | | | | | | | | | | | | | | | | | | | | | | Disabled by a #def. When enabled, file format 2.1 is used, with a possible update from ver 2.0. If a version with this code disabled is run after the upgrade, it will just discard the file and go back to 2.0. We now put some of those extra list to use! Entries are separated into various lists depending on how often are used, and we keep track of previously evicted entries. If the new algorithm is not enabled, most of the code just goes through a different path (with the old code instead of the new one). One notable exception is OpenFollowingEntry, used to enumerate the entries on the cache; the code changed significantly to support the new version of the "cache iterator", but functionally should do the same as the current code. Review URL: http://codereview.chromium.org/27345 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11145 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes CRLF and trailing white spaces.maruel@chromium.org2009-03-055-6/+6
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10982 0039d316-1c4b-4281-b951-d872f2087c98
* Proposed change to support resource loading for media files.hclam@chromium.org2009-03-025-5/+188
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Highlights of changes: - Added methods to disk_cache::Entry: - Entry::PrepareTargetAsExternalFile(int index) Prepare a stream in an entry to use external file for storage. - Entry::GetExternalFile(int index) Get the external file backing the stream in the entry. - Added a property "CacheType type_" to HttpCache, along with setter and getter. There shall be two cache types, COMMON_CACHE and MEDIA_CACHE for distinguishing between different purpose of HttpCache. We have this property to trigger special behavior for caching needs of media files. - Added static methods to ChromeURLRequestContext - ChromeURLRequestContext::CreateOriginalForMedia Create a URLRequestContext for media files for the original profile. - ChromeURLRequestContext::CreateOffTheRecordForMedia Create a URLRequestContext for media files for off the record profile. - Added method to Profile interface. - GetRequestContextForMedia To get the request context for media files from the context. Design decissions: - Enforce writing to external file by calling methods to Entry rather than construct Backend by a different flag. Since we only want a valid and full response to go into an external file rather than redirection response or erroneous response, we should let HttpCache::Transaction to decide when to have an external file for response data. We eliminate a lot of useless external cache files. - Adding the CacheType enum and property to HttpCache, we could allow possible (?) future extensions to HttpCache to handle other different caching needs. And there's no need to add change constructors of HttpCache, but maybe we should add a specific constructor to accomodate a media HttpCache? - Adding Profile::GetRequestContextForMedia() Since we will need to use this new request context in ResourceDispatcherHost, I think the best place to keep it is in the profile. Also we will expose to user that there's a separate cache for media, so it's better to expose it in the Profile level to allow settings to the media cache, e.g. max file size, etc. Review URL: http://codereview.chromium.org/19747 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10745 0039d316-1c4b-4281-b951-d872f2087c98
* Use string for Histogram names since these are all ASCII anyway.dsh@google.com2009-02-247-24/+21
| | | | | | | | Wide-character literals cause problems between platforms. Review URL: http://codereview.chromium.org/28046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10276 0039d316-1c4b-4281-b951-d872f2087c98
* Reduce the amount of included header files. Vast change like in "Oh God! ↵maruel@chromium.org2009-02-184-28/+40
| | | | | | | | This revision changes half of the source files!". Review URL: http://codereview.chromium.org/20378 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9958 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Don't add more people to the cache size experiment.rvargas@google.com2009-02-131-10/+2
| | | | | | | | | | At this point, adding more people just add noise to the experiment. After a little over a month, most users still have not filled up their allowed cache. Review URL: http://codereview.chromium.org/20337 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9728 0039d316-1c4b-4281-b951-d872f2087c98
* Fix some purify warnings.rvargas@google.com2009-02-121-0/+4
| | | | | | Review URL: http://codereview.chromium.org/21284 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9641 0039d316-1c4b-4281-b951-d872f2087c98
* Extend the IOBuffer to the disk cache.rvargas@google.com2009-02-129-234/+298
| | | | | | | | | | | This is cleanup from bug 5325. Original code review: http://codereview.chromium.org/20134/show Review URL: http://codereview.chromium.org/20251 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9626 0039d316-1c4b-4281-b951-d872f2087c98
* Revert cl 9528 to fix mac test_shell_testsrvargas@google.com2009-02-109-267/+234
| | | | | | Review URL: http://codereview.chromium.org/21236 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9532 0039d316-1c4b-4281-b951-d872f2087c98
* Extend the IOBuffer to the disk cache.rvargas@google.com2009-02-109-234/+267
| | | | | | | | This is cleanup from bug 5325. Review URL: http://codereview.chromium.org/20134 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9528 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the windows implementation of KillProcess and WaitForSingleProcess to ↵stoyan@chromium.org2009-02-091-1/+1
| | | | | | | | not close the process handle that they do not own. Review URL: http://codereview.chromium.org/24004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9400 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Add a check to make sure that the index table mask is not bigger ↵rvargas@google.com2009-02-042-2/+14
| | | | | | | | | | than the table itself. BUG=7217 Review URL: http://codereview.chromium.org/20054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9190 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Adjust the current experiment so that the cachervargas@google.com2009-01-231-15/+18
| | | | | | | | | | size is not limited by 1% of the disk space. Also, group four was limited by the mask so it was effectively the same as group 3. Review URL: http://codereview.chromium.org/18727 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8589 0039d316-1c4b-4281-b951-d872f2087c98
* Replace cases of Append(FILE_PATH_LITERAL()) with AppendASCII("").deanm@chromium.org2009-01-221-5/+5
| | | | | | Review URL: http://codereview.chromium.org/18499 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8454 0039d316-1c4b-4281-b951-d872f2087c98