Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1595)

Unified Diff: net/disk_cache/disk_cache.h

Issue 11848003: Disk cache: Improve the documentation related to proper use of enumerations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
gavinp 2013/01/14 15:20:13 Good to spell this out. The only nit is the use o
virtual int OpenNextEntry(void** iter, Entry** next_entry,
const CompletionCallback& callback) = 0;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698