Index: chrome/browser/browsing_data/cache_counter.h |
diff --git a/chrome/browser/browsing_data/cache_counter.h b/chrome/browser/browsing_data/cache_counter.h |
index b8963ef366185dec680741693053adc22ad0f7e2..4c96943871727c206b40be3439233d84adfe5f66 100644 |
--- a/chrome/browser/browsing_data/cache_counter.h |
+++ b/chrome/browser/browsing_data/cache_counter.h |
@@ -12,8 +12,29 @@ |
class Profile; |
+namespace browsing_data { |
+class ConditionalCacheCountingHelper; |
+} |
+ |
class CacheCounter : public browsing_data::BrowsingDataCounter { |
public: |
+ class CacheResult : public FinishedResult { |
+ public: |
+ CacheResult(const CacheCounter* source, |
+ int64_t cache_size, |
+ bool is_upper_limit); |
+ ~CacheResult() override; |
+ |
+ int64_t cache_size() const { return cache_size_; } |
+ bool is_upper_limit() const { return is_upper_limit_; } |
+ |
+ private: |
+ int64_t cache_size_; |
+ bool is_upper_limit_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(CacheResult); |
+ }; |
+ |
explicit CacheCounter(Profile* profile); |
~CacheCounter() override; |
@@ -30,7 +51,9 @@ class CacheCounter : public browsing_data::BrowsingDataCounter { |
base::WeakPtrFactory<CacheCounter> weak_ptr_factory_; |
void Count() override; |
- void OnCacheSizeCalculated(int64_t bytes); |
+ void OnCacheSizeCalculated(bool is_upper_limit, int64_t bytes); |
+ void FetchEstimate( |
+ base::WeakPtr<browsing_data::ConditionalCacheCountingHelper>); |
}; |
#endif // CHROME_BROWSER_BROWSING_DATA_CACHE_COUNTER_H_ |