summaryrefslogtreecommitdiffstats
path: root/net/disk_cache
Commit message (Collapse)AuthorAgeFilesLines
* Reland code to detect corruption of histogram rangesjar@chromium.org2011-03-052-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | This code was reverted because it caused, or exposed flakiness in sync unit test code (mostly on the Mac). We need to monitor that closely as we re-land. See the reviews and history in CLs: http://codereview.chromium.org/6577013 and http://codereview.chromium.org/6591052 This code generates CRC checksums for the histogram bucket-range vectors, and guarantees they remain intact when the histogram data is about to be uploaded to UMA. If the data is corrupted, then we will fail on a CHECK(). r=mbelshe,rvargas bug=73939 Review URL: http://codereview.chromium.org/6627011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77033 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: End the throttling experiment and removervargas@google.com2011-03-035-233/+28
| | | | | | | | | | | the throttling queue BUG=54338 TEST=none Review URL: http://codereview.chromium.org/6602073 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76830 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 76239 - Crash when we notice a corruption of the histogram range-vectorrsimha@chromium.org2011-03-032-14/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reason for revert: This patch might have resulted in some flakiness in the sync bots on the chromium waterfall. The range vector is calculated once when a histogram is constructed, and should never change over the lifetime of the histogram. When it does change, it means that memory is being overwritten. We now crash (via CHECK) when there is any detected corruption of the range vector. This CL uses a more robust check-sum algorithm to detect corruption of the vector. The previous algorithm just did a sum, and was too easilly tricked by small (offsetting) changes in several ranges. Hopefully, this CRC-32 implementation will not be so easilly fooled. I had to refactor the class to ensure that each histogram was completely constructed before I registered it. The old code could sometimes register a base class (tradtional Histogram, with exponential bucket spread) and then run the derived constructor (such as when creating a LinearHistogram, with a second construction of the ranges and checksum). I now carefully avoid generating the checksum until fully constructing the instance, and then I run InitializeBuckets only once on the instance before registering it. bug=73939,74467 r=mbelshe Review URL: http://codereview.chromium.org/6577013 TBR=jar@chromium.org Review URL: http://codereview.chromium.org/6611001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76667 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 76345 - Small cleanup for previous histogram checkinrsimha@chromium.org2011-03-021-1/+1
| | | | | | | | | | | | | | | | | | | | | Reason for revert: This patch might have resulted in some flakiness in the sync bots on the chromium waterfall. CL http://codereview.chromium.org/6577013/ had a few changes suggested that were not incorporated. This CL has those name changes etc. r=rvargas Review URL: http://codereview.chromium.org/6591052 BUG=74467 TBR=jar@chromium.org Review URL: http://codereview.chromium.org/6591129 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76662 0039d316-1c4b-4281-b951-d872f2087c98
* Pure pedantry: Replace all ".size() == 0" with ".empty()".erg@google.com2011-03-021-1/+1
| | | | | | | | | BUG=carnitas TEST=compiles; existing unit tests. Review URL: http://codereview.chromium.org/6602049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76467 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Don't attempt to create another external filervargas@google.com2011-03-011-2/+6
| | | | | | | | | | | | after an unexpected failure. BUG=64807 TEST=none Review URL: http://codereview.chromium.org/6581016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76413 0039d316-1c4b-4281-b951-d872f2087c98
* Small cleanup for previous histogram checkinjar@chromium.org2011-03-011-1/+1
| | | | | | | | | | | | | | CL http://codereview.chromium.org/6577013/ had a few changes suggested that were not incorporated. This CL has those name changes etc. r=rvargas Review URL: http://codereview.chromium.org/6591052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76345 0039d316-1c4b-4281-b951-d872f2087c98
* Crash when we notice a corruption of the histogram range-vectorjar@chromium.org2011-02-282-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The range vector is calculated once when a histogram is constructed, and should never change over the lifetime of the histogram. When it does change, it means that memory is being overwritten. We now crash (via CHECK) when there is any detected corruption of the range vector. This CL uses a more robust check-sum algorithm to detect corruption of the vector. The previous algorithm just did a sum, and was too easilly tricked by small (offsetting) changes in several ranges. Hopefully, this CRC-32 implementation will not be so easilly fooled. I had to refactor the class to ensure that each histogram was completely constructed before I registered it. The old code could sometimes register a base class (tradtional Histogram, with exponential bucket spread) and then run the derived constructor (such as when creating a LinearHistogram, with a second construction of the ranges and checksum). I now carefully avoid generating the checksum until fully constructing the instance, and then I run InitializeBuckets only once on the instance before registering it. bug=73939 r=mbelshe Review URL: http://codereview.chromium.org/6577013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76239 0039d316-1c4b-4281-b951-d872f2087c98
* Mark DiskCacheBackendTest.AppCacheEnumerations as flakyphajdan.jr@chromium.org2011-02-281-1/+2
| | | | | | | | | | TBR=rvargas TEST=net_unittests BUG=74387 Review URL: http://codereview.chromium.org/6588046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76207 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: More fixes to avoid corruption.rvargas@google.com2011-02-236-85/+75
| | | | | | | | | | | | | | | | | | | | | | | | | * We now keep dirty entries in the map of open entries so that we handle better crashes when we are working with dirty entries. * EntryImpl now remembers if the entry was dirty on disk. * When we find a dirty entry while doing enumerations we now go through the regular path to delete the entry (InternalDoomEntry), and let MatchEntry delete the entry. The main problem with the old code is that it was possible to delete the entry without first removing it from the index, so a crash at that time would leave references to free addresses. * Now we correctly consider the case of not finding an entry when looking for its parent as an error. BUG=62085 TEST=net_unittests Review URL: http://codereview.chromium.org/6538006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75685 0039d316-1c4b-4281-b951-d872f2087c98
* Add stats-table counters to the disk cache so we can expose stats throughmbelshe@chromium.org2011-02-181-0/+3
| | | | | | | | | | | the benchmark lab. BUG=none TEST=none Review URL: http://codereview.chromium.org/6519042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75364 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Always initialize disabled_rvargas@google.com2011-02-161-0/+2
| | | | | | | | | BUG=73129 TEST=none Review URL: http://codereview.chromium.org/6529056 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75203 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Fix the initialization order of the backend.rvargas@google.com2011-02-162-5/+29
| | | | | | | | | | BUG=72963 TEST=net_unittests Review URL: http://codereview.chromium.org/6529007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75036 0039d316-1c4b-4281-b951-d872f2087c98
* Fix Coverity UNINIT_CTOR defect in the ChildrenDeleter constructor.wtc@chromium.org2011-02-111-1/+1
| | | | | | | | | | | R=rvargas CID=13450 BUG=none TEST=none Review URL: http://codereview.chromium.org/6495003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74565 0039d316-1c4b-4281-b951-d872f2087c98
* Disk Cache: Make sure that file descriptors are valid before calling close().rvargas@google.com2011-02-101-1/+1
| | | | | | | | | BUG=71399 TEST=none Review URL: http://codereview.chromium.org/6490007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74486 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Reset the number of fatal errors each timervargas@google.com2011-02-041-0/+5
| | | | | | | | | | | | we report it and make sure that we don't report it more than once a week. BUG=none TEST=none Review URL: http://codereview.chromium.org/6410044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73829 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 73402 - Disk cache: Disable the throttling experiment.rvargas@google.com2011-02-021-1/+12
| | | | | | | | | | | | | | | This is intended for the beta/stable channels. BUG=none TEST=none TBR=gavinp Review URL: http://codereview.chromium.org/6286036 TBR=rvargas@google.com Review URL: http://codereview.chromium.org/6250097 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73405 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Disable the throttling experiment.rvargas@google.com2011-02-021-12/+1
| | | | | | | | | | | | This is intended for the beta/stable channels. BUG=none TEST=none TBR=gavinp Review URL: http://codereview.chromium.org/6286036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73402 0039d316-1c4b-4281-b951-d872f2087c98
* More net/ method ordering.erg@google.com2011-01-265-308/+306
| | | | | | | | | BUG=68682 TEST=compiles Review URL: http://codereview.chromium.org/6339012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72710 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Prevent obscure file corruption and dealrvargas@google.com2011-01-258-33/+229
| | | | | | | | | | | | | | | | | | | | | | | | | | | with the result of that corruption. 1. Now we mark any open entry as dirty, even if we are supposed to delete the entry right away because if we crash before that, we may end up clearing the dirty flag of a dirty entry. 2. When we look for a parent of a given entry we now double check that the entry is the one that we want (and not just another entry with the same key). 3. If we have a loop on the hash collision list (result of failing to do 1 and 2 above), we figure that out. 4. Now every time we open an entry from an LRU list we end up using the same code path (with the proper handling of dirty entries). BUG=69135 TEST=net_unittests Review URL: http://codereview.chromium.org/6292011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72563 0039d316-1c4b-4281-b951-d872f2087c98
* More net/ header/implementation method reordering.erg@google.com2011-01-218-326/+354
| | | | | | | | | | | (Contains some minor de-inlining.) BUG=68682 TEST=compiles Review URL: http://codereview.chromium.org/6263010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72232 0039d316-1c4b-4281-b951-d872f2087c98
* Even more reordering the methods in headers and implementation in net/.erg@google.com2011-01-201-1/+1
| | | | | | | | | BUG=68682 TEST=compiles Review URL: http://codereview.chromium.org/6314010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71880 0039d316-1c4b-4281-b951-d872f2087c98
* .c Feature to disable field trials in old versions of Chromium. Field trialsrtenneti@chromium.org2011-01-191-4/+7
| | | | | | | | | | | | | | tests are (usually) monitored for a fixed length of time. With this change field trial tests turn them selves off (will use the default group) after the expiration time (specified in the Field Trial constructor). BUG=13463 TEST=field_trial_unittests tests this code thorougly. spdy session and testing field_trials in renderer process would be very helpful. thanks much. Review URL: http://codereview.chromium.org/6317004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71820 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Increase the throttling threshold (100->460ms) forrvargas@google.com2011-01-181-1/+1
| | | | | | | | | | | | | the current experiment. BUG=54338 TEST=none TBR=gavinp Review URL: http://codereview.chromium.org/6376002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71717 0039d316-1c4b-4281-b951-d872f2087c98
* Reland "Remove base/scoped_handle_win.h."tfarina@chromium.org2011-01-092-7/+12
| | | | | | | | | | | | | | | Fixed the problem with rlz library. Now should be fine to land this again. This reverts commit 3620d9501af7bff688862c54fdd60f7eb41797f3. Original Review URL: http://codereview.chromium.org/6126002/ BUG=None TEST=trybots Review URL: http://codereview.chromium.org/6110005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70861 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Remove base/scoped_handle_win.h stub and fix up all callers to use ↵thakis@chromium.org2011-01-072-12/+7
| | | | | | | | | | the new location and namespace." This reverts r 70795, it broke the build. TBR=vandebo git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70802 0039d316-1c4b-4281-b951-d872f2087c98
* Start reordering the methods in headers in net/.erg@google.com2011-01-078-627/+626
| | | | | | | | | | | | This patch also starts reordering some of the cc files to match their headers. More of both cleanups will be done in future patches. BUG=68682 TEST=compiles Review URL: http://codereview.chromium.org/6085013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70799 0039d316-1c4b-4281-b951-d872f2087c98
* Remove base/scoped_handle_win.h stub and fix up all callers to use the new ↵tfarina@chromium.org2011-01-072-7/+12
| | | | | | | | | | | location and namespace. BUG=None TEST=trybots Review URL: http://codereview.chromium.org/6126002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70795 0039d316-1c4b-4281-b951-d872f2087c98
* reapply r70628. It was wrongly blamed for breaking Linux valgrind bots.estade@chromium.org2011-01-0711-41/+278
| | | | | | | | | | | | | | | | | | | | | | | | | The revert was r70688. original author: Matt Menke First pass at adding http/backend cache events to the NetLog. Adds sources and events for ActiveCacheEntry and EntryImpl objects, as well as adding cache read/write events to HttpCacheTransactions. Most new read/write events are only logged when NetLog logging mode is set to log all events. Also, net-internals now merges begin and end events that have parameters, as long as only one of them has parameters. I think this increases readability, at the cost of making it a little more difficult to follow timings with just the "st" values. BUG=59382 TEST=none yet, other than updates to existing tests. Review URL: http://codereview.chromium.org/6150002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70716 0039d316-1c4b-4281-b951-d872f2087c98
* Revert r70628. It broke Linux valgrind bots. See for exampleestade@chromium.org2011-01-0711-278/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | http://build.chromium.org/p/chromium.memory/builders/Linux%20Tests%20%28valgrind%29%281%29/builds/963 First pass at adding http/backend cache events to the NetLog. Adds sources and events for ActiveCacheEntry and EntryImpl objects, as well as adding cache read/write events to HttpCacheTransactions. Most new read/write events are only logged when NetLog logging mode is set to log all events. Also, net-internals now merges begin and end events that have parameters, as long as only one of them has parameters. I think this increases readability, at the cost of making it a little more difficult to follow timings with just the "st" values. BUG=59382 TEST=none yet, other than updates to existing tests. Originally applied: http://src.chromium.org/viewvc/chrome?view=rev&revision=70618 Reverted: http://src.chromium.org/viewvc/chrome?view=rev&revision=70619 Fixed and trying again... Review URL: http://codereview.chromium.org/6125001 BUG=none TEST=linux valgrind goes green. Review URL: http://codereview.chromium.org/6142003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70688 0039d316-1c4b-4281-b951-d872f2087c98
* First pass at adding http/backend cache events to the NetLog. mmenke@chromium.org2011-01-0611-41/+278
| | | | | | | | | | | | | | | | | | | | | | | | | Adds sources and events for ActiveCacheEntry and EntryImpl objects, as well as adding cache read/write events to HttpCacheTransactions. Most new read/write events are only logged when NetLog logging mode is set to log all events. Also, net-internals now merges begin and end events that have parameters, as long as only one of them has parameters. I think this increases readability, at the cost of making it a little more difficult to follow timings with just the "st" values. BUG=59382 TEST=none yet, other than updates to existing tests. Originally applied: http://src.chromium.org/viewvc/chrome?view=rev&revision=70618 Reverted: http://src.chromium.org/viewvc/chrome?view=rev&revision=70619 Fixed and trying again... Review URL: http://codereview.chromium.org/6125001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70628 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 70618 - First pass at adding http/backend cache events to the NetLog. mmenke@chromium.org2011-01-0611-277/+41
| | | | | | | | | | | | | | | | | | | | | | | Adds sources and events for ActiveCacheEntry and EntryImpl objects, as well as adding cache read/write events to HttpCacheTransactions. Most new read/write events are only logged when NetLog logging mode is set to log all events. Also, net-internals now merges begin and end events that have parameters, as long as only one of them has parameters. I think this increases readability, at the cost of making it a little more difficult to follow timings with just the "st" values. BUG=59382 TEST=none yet, other than updates to existing tests. Review URL: http://codereview.chromium.org/4067002 TBR=mmenke@chromium.org Review URL: http://codereview.chromium.org/6005015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70619 0039d316-1c4b-4281-b951-d872f2087c98
* First pass at adding http/backend cache events to the NetLog. mmenke@chromium.org2011-01-0611-41/+277
| | | | | | | | | | | | | | | | | | | | Adds sources and events for ActiveCacheEntry and EntryImpl objects, as well as adding cache read/write events to HttpCacheTransactions. Most new read/write events are only logged when NetLog logging mode is set to log all events. Also, net-internals now merges begin and end events that have parameters, as long as only one of them has parameters. I think this increases readability, at the cost of making it a little more difficult to follow timings with just the "st" values. BUG=59382 TEST=none yet, other than updates to existing tests. Review URL: http://codereview.chromium.org/4067002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70618 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Add a few more histograms and stats to figurervargas@google.com2011-01-065-22/+45
| | | | | | | | | | | out why there are so many users with available cache space. BUG=none TEST=none Review URL: http://codereview.chromium.org/6020008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70575 0039d316-1c4b-4281-b951-d872f2087c98
* Move CancellationFlag and WaitableEvent to the synchronization subdirectory.brettw@chromium.org2011-01-021-1/+1
| | | | | | | | TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/5977010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70369 0039d316-1c4b-4281-b951-d872f2087c98
* Remove base/platform_thread.h stub and fix up all callers to use the new ↵brettw@google.com2011-01-013-15/+15
| | | | | | | | | location and namespace. TEST=none BUG=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70346 0039d316-1c4b-4281-b951-d872f2087c98
* Move base/thread.h to base/threading, fix up callers to use the new location.brettw@chromium.org2011-01-014-4/+4
| | | | | | | | TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/6028009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70345 0039d316-1c4b-4281-b951-d872f2087c98
* Move platform_thread to base/threading and put in the base namespace. I left abrettw@chromium.org2010-12-312-3/+5
| | | | | | | | | | | stub and "using" declarations in the old location to avoid having to change the entire project at once. TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/6001010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70342 0039d316-1c4b-4281-b951-d872f2087c98
* Move some misc thread-related stuff from base to base/thread and into the basebrettw@chromium.org2010-12-302-5/+5
| | | | | | | | | | namespace. This does not move the "hard" thread stuff (thread.h). TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/6079009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70315 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Change the request throttling logic so that wervargas@google.com2010-12-203-18/+16
| | | | | | | | | | | | don't post all queued requests when we stop throttling them. BUG=54338 TEST=none Review URL: http://codereview.chromium.org/5993002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69754 0039d316-1c4b-4281-b951-d872f2087c98
* Make members of Singleton<T> private and only visible to the singleton type. ↵satish@chromium.org2010-12-141-4/+7
| | | | | | | | | | | | | | | This enforces that the Singleton<T> pattern can only be used within classes which want singleton-ness. As part of this CL I have also fixed up files which got missed in my previous CLs to use a GetInstance() method and use Singleton<T> from the source file. There are a small number of places where I have also switched to LazyInstance as that was more appropriate for types used in a single source file. BUG=65298 TEST=all existing tests should continue to pass. Review URL: http://codereview.chromium.org/5682008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69107 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 68932 - Make members of Singleton<T> private and only visible to the ↵satish@chromium.org2010-12-111-7/+4
| | | | | | | | | | | | | | | | | | singleton type. This enforces that the Singleton<T> pattern can only be used within classes which want singleton-ness. As part of this CL I have also fixed up files which got missed in my previous CLs to use a GetInstance() method and use Singleton<T> from the source file. There are a small number of places where I have also switched to LazyInstance as that was more appropriate for types used in a single source file. BUG=65298 TEST=all existing tests should continue to pass. Review URL: http://codereview.chromium.org/5682008 TBR=satish@chromium.org Review URL: http://codereview.chromium.org/5721005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68936 0039d316-1c4b-4281-b951-d872f2087c98
* Make members of Singleton<T> private and only visible to the singleton type. ↵satish@chromium.org2010-12-111-4/+7
| | | | | | | | | | | | | | | This enforces that the Singleton<T> pattern can only be used within classes which want singleton-ness. As part of this CL I have also fixed up files which got missed in my previous CLs to use a GetInstance() method and use Singleton<T> from the source file. There are a small number of places where I have also switched to LazyInstance as that was more appropriate for types used in a single source file. BUG=65298 TEST=all existing tests should continue to pass. Review URL: http://codereview.chromium.org/5682008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68932 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 68899 - Disk cache: Remove the request throttling experiment.rvargas@google.com2010-12-101-1/+10
| | | | | | | | | | | | | | This is intended for the beta/stable branch. BUG=none TEST=none Review URL: http://codereview.chromium.org/5628006 TBR=rvargas@google.com Review URL: http://codereview.chromium.org/5700005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68900 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Remove the request throttling experiment.rvargas@google.com2010-12-101-10/+1
| | | | | | | | | | | This is intended for the beta/stable branch. BUG=none TEST=none Review URL: http://codereview.chromium.org/5628006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68899 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Flush the data for child entries before startingrvargas@google.com2010-12-034-5/+54
| | | | | | | | | | | | to delete the parent (sparse) entry. BUG=64954 TEST=net_unittests Review URL: http://codereview.chromium.org/5585004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68186 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: A dirty entry can point to a list thatrvargas@google.com2010-11-173-38/+101
| | | | | | | | | | | | | | | is not the actual list where the entry is stored. This CL recognizes that case and hanldes removing that entry from the lists, without saying that there is critical corruption. BUG=38859 TEST=net_unittests Review URL: http://codereview.chromium.org/5119001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66518 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Cleanup file_posix so that it uses the latestrvargas@google.com2010-11-171-159/+74
| | | | | | | | | | | | version of InFlightIO & Co. BUG=55629 TEST=current tests. Review URL: http://codereview.chromium.org/4956001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66497 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Remove the queue for backend operations andrvargas@google.com2010-11-045-56/+143
| | | | | | | | | | | | change the queue of entry operations so that the operation that is posted is kept on the list. BUG=54338 TEST=net_unittests Review URL: http://codereview.chromium.org/3744007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65118 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Don't return zeros when reading from an entryrvargas@google.com2010-11-042-10/+34
| | | | | | | | | | | | | | | | | | | | | that has a buffer with an offset beyond the start of the read. The read logic was incorrectly calculating the eof for an entry as the current size minus the unreported size, so it was assuming that a buffer with a large offset was always extending the file... so it was returning zeros for the data. Now we don't attempt to keep buffers that extend a file, and the eof computation was fixed to be just the current lenght. BUG=59275 TEST=net_unittests Review URL: http://codereview.chromium.org/4289004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65074 0039d316-1c4b-4281-b951-d872f2087c98