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>2009-07-07 19:47:08 +0000
committerrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-07 19:47:08 +0000
commitc4c32fd86f36a5d282424eb3a4876f0601f8f097 (patch)
tree580af26d6d69af57f7b1c63b9fbb97fc42ef1877 /net/disk_cache/entry_impl.h
parenta5624da1a85ae1e2785d8534018329e5a144e1fc (diff)
downloadchromium_src-c4c32fd86f36a5d282424eb3a4876f0601f8f097.zip
chromium_src-c4c32fd86f36a5d282424eb3a4876f0601f8f097.tar.gz
chromium_src-c4c32fd86f36a5d282424eb3a4876f0601f8f097.tar.bz2
Disk cache: Keep a map of all open entries.
We still have a few crashes when for some reason we believe an entry is not dirty and we follow the pointer stored by its rankings node only to crash while accessing the memory. I have no explanation to why the dirty id matches the current one (a page boundary issue maybe?), but having a map with all open entries solves the issue of having to follow pointers from disk. BUG=15596, b/1120346 TEST=unittests Review URL: http://codereview.chromium.org/149218 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20067 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, 4 insertions, 4 deletions
diff --git a/net/disk_cache/entry_impl.h b/net/disk_cache/entry_impl.h
index 89c9573..ad254e0 100644
--- a/net/disk_cache/entry_impl.h
+++ b/net/disk_cache/entry_impl.h
@@ -76,10 +76,10 @@ class EntryImpl : public Entry, public base::RefCounted<EntryImpl> {
// Reloads the rankings node information.
bool LoadNodeAddress();
- // Reloads the data for this entry. If there is already an object in memory
- // for the entry, the returned value is a pointer to that entry, otherwise
- // it is the passed in entry. On failure returns NULL.
- static EntryImpl* Update(EntryImpl* entry);
+ // Updates the stored data to reflect the run-time information for this entry.
+ // Returns false if the data could not be updated. The purpose of this method
+ // is to be able to detect entries that are currently in use.
+ bool Update();
// Returns true if this entry is marked as dirty on disk.
bool IsDirty(int32 current_id);