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

Unified Diff: net/disk_cache/simple/simple_backend_impl.h

Issue 478573003: Connect SimpleCache Backend active_entries_ more closely to Entry lifetime. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove inline destructor Created 6 years, 4 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
Index: net/disk_cache/simple/simple_backend_impl.h
diff --git a/net/disk_cache/simple/simple_backend_impl.h b/net/disk_cache/simple/simple_backend_impl.h
index f65f56611ff1e75a5e6a11b5d5b46703f1a03c81..0a5f5b80c783e69e827099076995d38662821a24 100644
--- a/net/disk_cache/simple/simple_backend_impl.h
+++ b/net/disk_cache/simple/simple_backend_impl.h
@@ -66,10 +66,6 @@ class NET_EXPORT_PRIVATE SimpleBackendImpl : public Backend,
// Returns the maximum file size permitted in this backend.
int GetMaxFileSize() const;
- // Removes |entry| from the |active_entries_| set, forcing future Open/Create
- // operations to construct a new object.
- void OnDeactivated(const SimpleEntryImpl* entry);
-
// Flush our SequencedWorkerPool.
static void FlushWorkerPoolForTesting();
@@ -109,11 +105,14 @@ class NET_EXPORT_PRIVATE SimpleBackendImpl : public Backend,
virtual void OnExternalCacheHit(const std::string& key) OVERRIDE;
private:
- typedef base::hash_map<uint64, base::WeakPtr<SimpleEntryImpl> > EntryMap;
+ typedef base::hash_map<uint64, SimpleEntryImpl*> EntryMap;
typedef base::Callback<void(base::Time mtime, uint64 max_size, int result)>
InitializeIndexCallback;
+ class EntryDisconnector;
+ friend class EntryDisconnector;
+
// Return value of InitCacheStructureOnDisk().
struct DiskStatResult {
base::Time cache_dir_mtime;

Powered by Google App Engine
This is Rietveld 408576698