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

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

Issue 1401923006: Reland of Implement cache counting for the simple and memory backends - with fixed test. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comment about APP_CACHE. Created 5 years, 2 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 | « net/disk_cache/simple/simple_index.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/simple/simple_index.cc
diff --git a/net/disk_cache/simple/simple_index.cc b/net/disk_cache/simple/simple_index.cc
index fd01abd89946aa2c455c50865b96adbae50c9a10..555780119d3f147341c4cb40a8bd600f0ca42d21 100644
--- a/net/disk_cache/simple/simple_index.cc
+++ b/net/disk_cache/simple/simple_index.cc
@@ -239,6 +239,11 @@ int32 SimpleIndex::GetEntryCount() const {
return entries_set_.size();
}
+uint64 SimpleIndex::GetCacheSize() const {
+ DCHECK(initialized_);
+ return cache_size_;
+}
+
void SimpleIndex::Insert(uint64 entry_hash) {
DCHECK(io_thread_checker_.CalledOnValidThread());
// Upon insert we don't know yet the size of the entry.
« no previous file with comments | « net/disk_cache/simple/simple_index.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698