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

Unified Diff: net/disk_cache/simple/simple_disk_format.cc

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_disk_format.cc
diff --git a/net/disk_cache/simple/simple_disk_format.cc b/net/disk_cache/simple/simple_disk_format.cc
index 65ac8a20128ead89e7c426b16567c15543ed691a..0a254dd30a38ce311bef5ef9d9c6dc9f4bf4b4c1 100644
--- a/net/disk_cache/simple/simple_disk_format.cc
+++ b/net/disk_cache/simple/simple_disk_format.cc
@@ -28,11 +28,15 @@ std::string GetEntryHashForKey(const std::string& key) {
namespace SimpleIndexFile {
EntryMetadata::EntryMetadata() :
- last_used_time(0) {}
+ last_used_time(0),
+ entry_size(0) {
+}
EntryMetadata::EntryMetadata(const std::string& hash_key_p,
- base::Time last_used_time_p) :
- last_used_time(last_used_time_p.ToInternalValue()) {
+ base::Time last_used_time_p,
+ uint64 entry_size_p) :
+ last_used_time(last_used_time_p.ToInternalValue()),
+ entry_size(entry_size_p) {
DCHECK_EQ(kEntryHashKeySize, implicit_cast<int>(hash_key_p.size()));
hash_key_p.copy(hash_key, kEntryHashKeySize);
}

Powered by Google App Engine
This is Rietveld 408576698