rva...@chromium.org
unread,Jan 10, 2013, 8:51:31 PM1/10/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to gav...@chromium.org, chromium...@chromium.org, cbentze...@chromium.org, dari...@chromium.org, gavin...@chromium.org
Reviewers: gavinp,
Description:
Disk cache: Improve the documentation related to proper use of enumerations.
BUG=168870
TEST=none
Please review this at
https://codereview.chromium.org/11848003/
SVN Base: svn://
svn.chromium.org/chrome/trunk/src/
Affected files:
M net/disk_cache/disk_cache.h
Index: net/disk_cache/disk_cache.h
===================================================================
--- net/disk_cache/disk_cache.h (revision 175363)
+++ net/disk_cache/disk_cache.h (working copy)
@@ -127,7 +127,12 @@
// remain valid until the operation completes.
//
// NOTE: This method does not modify the last_used field of the entry,
and
- // therefore it does not impact the eviction ranking of the entry.
+ // therefore it does not impact the eviction ranking of the entry.
However,
+ // an enumeration will go through all entries on the cache only if the
cache
+ // is not modified while the enumeration is taking place. Significantly
+ // altering the entry pointed by |iter| (for example, deleting the
entry) will
+ // invalidate |iter|. Performing operations on an entry that modify the
entry
+ // may result in loops in the enumeration, skipped entries or similar.
virtual int OpenNextEntry(void** iter, Entry** next_entry,
const CompletionCallback& callback) = 0;