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

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

Issue 13913010: Add Cache size to the Simple Index. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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_index.h
diff --git a/net/disk_cache/simple/simple_index.h b/net/disk_cache/simple/simple_index.h
index 867e051d4f28e63ba4b7fc43632dbd998eba6506..f07476d2409d41988bbeba0dd91b1bc27f540ec6 100644
--- a/net/disk_cache/simple/simple_index.h
+++ b/net/disk_cache/simple/simple_index.h
@@ -47,6 +47,8 @@ class SimpleIndex
void Cleanup();
gavinp 2013/04/10 10:33:23 While we're here, can we comment this method? I fo
felipeg 2013/04/10 11:45:35 I changed its name in the other CL
+ bool UpdateEntrySize(const std::string& key, uint64 entry_size);
gavinp 2013/04/10 10:33:23 I think this deserves a short comment describing w
felipeg 2013/04/10 11:45:35 Done.
+
private:
// TODO(felipeg): This way we are storing the hash_key string twice (as the
// hash_map::key and as a member of EntryMetadata. We could save space if we
@@ -73,6 +75,7 @@ class SimpleIndex
const base::FilePath path_;
EntrySet entries_set_;
+ uint64 cache_size_; // Total cache storage size in bytes.
base::FilePath index_filename_;
base::PlatformFile index_file_;

Powered by Google App Engine
This is Rietveld 408576698