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

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

Issue 2626173003: Calculate the size of all cache entries between two points in time. (Closed)
Patch Set: revert cache_storage_cache_unittest.cc Created 3 years, 11 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/memory/mem_backend_impl.cc ('k') | net/disk_cache/simple/simple_backend_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3516847e1f72be9a2402edb5a417dce552a2cbd1..a0b4b9c42820e8b05f6dcd3639e5a534af077424 100644
--- a/net/disk_cache/simple/simple_backend_impl.h
+++ b/net/disk_cache/simple/simple_backend_impl.h
@@ -110,6 +110,10 @@ class NET_EXPORT_PRIVATE SimpleBackendImpl : public Backend,
int DoomEntriesSince(base::Time initial_time,
const CompletionCallback& callback) override;
int CalculateSizeOfAllEntries(const CompletionCallback& callback) override;
+ int CalculateSizeOfEntriesBetween(
+ base::Time initial_time,
+ base::Time end_time,
+ const CompletionCallback& callback) override;
std::unique_ptr<Iterator> CreateIterator() override;
void GetStats(base::StringPairs* stats) override;
void OnExternalCacheHit(const std::string& key) override;
@@ -148,6 +152,13 @@ class NET_EXPORT_PRIVATE SimpleBackendImpl : public Backend,
void IndexReadyForSizeCalculation(const CompletionCallback& callback,
int result);
+ // Calculates the size all cache entries between |initial_time| and
+ // |end_time|. Invoked when the index is ready.
+ void IndexReadyForSizeBetweenCalculation(base::Time initial_time,
+ base::Time end_time,
+ const CompletionCallback& callback,
+ int result);
+
// Try to create the directory if it doesn't exist. This must run on the IO
// thread.
static DiskStatResult InitCacheStructureOnDisk(
« no previous file with comments | « net/disk_cache/memory/mem_backend_impl.cc ('k') | net/disk_cache/simple/simple_backend_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698