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

Unified Diff: components/browsing_data/content/conditional_cache_counting_helper.h

Issue 2626223002: Show the exact cache size for time ranges if supported (Closed)
Patch Set: rebase 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
Index: components/browsing_data/content/conditional_cache_counting_helper.h
diff --git a/components/browsing_data/content/conditional_cache_counting_helper.h b/components/browsing_data/content/conditional_cache_counting_helper.h
index d40fba6e20a5ef57fd7ae6f3aedb053ec80fe6b1..dff721d2c00596ad1e4bb5c64119c35d17a0ec50 100644
--- a/components/browsing_data/content/conditional_cache_counting_helper.h
+++ b/components/browsing_data/content/conditional_cache_counting_helper.h
@@ -24,8 +24,9 @@ namespace browsing_data {
// Helper to count the size of the http cache data from a StoragePartition.
class ConditionalCacheCountingHelper {
public:
- // Returns the number bytes in the selected range.
- typedef base::Callback<void(int64_t)> CacheCountCallback;
+ // Returns the number bytes in the selected range and if this value is an
+ // upper estimate.
+ typedef base::Callback<void(int64_t, bool)> CacheCountCallback;
static ConditionalCacheCountingHelper* CreateForRange(
content::StoragePartition* storage_partition,
@@ -70,6 +71,7 @@ class ConditionalCacheCountingHelper {
// via a callback. This is either the sum of size of the the two cache
// backends, or an error code if the calculation failed.
int64_t calculation_result_;
+ bool is_upper_limit_;
CacheCountCallback result_callback_;
const base::Time begin_time_;

Powered by Google App Engine
This is Rietveld 408576698