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

Unified Diff: net/disk_cache/disk_cache.h

Issue 1304363013: Add a size estimation mechanism to StoragePartitionHttpCacheDataRemover. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: static_cast 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/blockfile/in_flight_backend_io.cc ('k') | net/disk_cache/disk_cache_test_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/disk_cache.h
diff --git a/net/disk_cache/disk_cache.h b/net/disk_cache/disk_cache.h
index 84c1ee99516654258486494a8afeacfb70ddc31d..3f7f0035fc5c2736f52fafbe01f71488216590d8 100644
--- a/net/disk_cache/disk_cache.h
+++ b/net/disk_cache/disk_cache.h
@@ -145,6 +145,12 @@ class NET_EXPORT Backend {
virtual int DoomEntriesSince(base::Time initial_time,
const CompletionCallback& callback) = 0;
+ // Calculate the total size of the cache. The return value is the size in
+ // bytes or a net error code. If this method returns ERR_IO_PENDING,
+ // the |callback| will be invoked when the operation completes.
+ virtual int CalculateSizeOfAllEntries(
+ const CompletionCallback& callback) = 0;
+
// Returns an iterator which will enumerate all entries of the cache in an
// undefined order.
virtual scoped_ptr<Iterator> CreateIterator() = 0;
« no previous file with comments | « net/disk_cache/blockfile/in_flight_backend_io.cc ('k') | net/disk_cache/disk_cache_test_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698