summaryrefslogtreecommitdiffstats
path: root/net/disk_cache/entry_impl.h
diff options
context:
space:
mode:
authorrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-29 18:59:03 +0000
committerrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-29 18:59:03 +0000
commite47737e2a8eb0e3f321c0c4ff39255c8f60f82d2 (patch)
tree9737555e08e63549bf628c3ba4883a6555cfab22 /net/disk_cache/entry_impl.h
parent1b570ee3cd4e89c2ff0d38098e04d3db20bc5ada (diff)
downloadchromium_src-e47737e2a8eb0e3f321c0c4ff39255c8f60f82d2.zip
chromium_src-e47737e2a8eb0e3f321c0c4ff39255c8f60f82d2.tar.gz
chromium_src-e47737e2a8eb0e3f321c0c4ff39255c8f60f82d2.tar.bz2
Disk Cache: Improve handling of dirty entries.
* Split the entry sanity checks in two parts: a critical one and a non-critical one. This allows us to return dirty entries instead of failing to open them. * Make sure that we cannot reach an entry through the index before the actual data reaches the disk (when creating an entry linked through a parent we were not respecting that). * When deleting a block from a block file, first clean it up and then update the map (avoid leaving a dirty free block if there is a crash) * Handle the case of errors when opening entries through the enumerations path. BUG=73102 TEST=net_unittests Review URL: http://codereview.chromium.org/8065015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103323 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/disk_cache/entry_impl.h')
-rw-r--r--net/disk_cache/entry_impl.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/net/disk_cache/entry_impl.h b/net/disk_cache/entry_impl.h
index d82c74d..c0fb5e1 100644
--- a/net/disk_cache/entry_impl.h
+++ b/net/disk_cache/entry_impl.h
@@ -104,8 +104,16 @@ class NET_EXPORT_PRIVATE EntryImpl
// Fixes this entry so it can be treated as valid (to delete it).
void SetPointerForInvalidEntry(int32 new_id);
+ // Returns true if this entry is so meesed up that not everything is going to
+ // be removed.
+ bool LeaveRankingsBehind();
+
// Returns false if the entry is clearly invalid.
bool SanityCheck();
+ bool DataSanityCheck();
+
+ // Attempts to make this entry reachable though the key.
+ void FixForDelete();
// Handle the pending asynchronous IO count.
void IncrementIoCount();