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

Unified Diff: net/disk_cache/blockfile/backend_impl.h

Issue 583293002: Do not leak when iterator outlives disk cache backend. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cacheenums-again
Patch Set: cleaner ownership Created 6 years, 3 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 | net/disk_cache/blockfile/backend_impl.cc » ('j') | net/disk_cache/blockfile/backend_impl.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/blockfile/backend_impl.h
diff --git a/net/disk_cache/blockfile/backend_impl.h b/net/disk_cache/blockfile/backend_impl.h
index 775374e2c3bcbf39f347e4dc1a68a938274b6087..1abc66dae8e84703b039bc8b94d5e3bb7c0876a6 100644
--- a/net/disk_cache/blockfile/backend_impl.h
+++ b/net/disk_cache/blockfile/backend_impl.h
@@ -74,14 +74,14 @@ class NET_EXPORT_PRIVATE BackendImpl : public Backend {
int SyncDoomEntriesBetween(base::Time initial_time,
base::Time end_time);
int SyncDoomEntriesSince(base::Time initial_time);
- int SyncOpenNextEntry(void** iter, Entry** next_entry);
- void SyncEndEnumeration(void* iter);
+ int SyncOpenNextEntry(Rankings::Iterator* iterator, Entry** next_entry);
+ void SyncEndEnumeration(scoped_ptr<Rankings::Iterator> iterator);
void SyncOnExternalCacheHit(const std::string& key);
// Open or create an entry for the given |key| or |iter|.
EntryImpl* OpenEntryImpl(const std::string& key);
EntryImpl* CreateEntryImpl(const std::string& key);
- EntryImpl* OpenNextEntryImpl(void** iter);
+ EntryImpl* OpenNextEntryImpl(Rankings::Iterator* iter);
// Sets the maximum size for the total amount of data stored by this instance.
bool SetMaxSize(int max_bytes);
« no previous file with comments | « no previous file | net/disk_cache/blockfile/backend_impl.cc » ('j') | net/disk_cache/blockfile/backend_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698