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

Unified Diff: chrome/browser/browsing_data/cache_counter.cc

Issue 2626223002: Show the exact cache size for time ranges if supported (Closed)
Patch Set: fix chromeos build 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: chrome/browser/browsing_data/cache_counter.cc
diff --git a/chrome/browser/browsing_data/cache_counter.cc b/chrome/browser/browsing_data/cache_counter.cc
index 384193e86449091ccb09b6af4663432a1bb241f9..75292b6b76bf982b38b3192abe4a3797e64148ac 100644
--- a/chrome/browser/browsing_data/cache_counter.cc
+++ b/chrome/browser/browsing_data/cache_counter.cc
@@ -31,19 +31,18 @@ const char* CacheCounter::GetPrefName() const {
}
void CacheCounter::Count() {
- bool is_upper_limit = !GetPeriodStart().is_null();
base::WeakPtr<browsing_data::ConditionalCacheCountingHelper> counter =
browsing_data::ConditionalCacheCountingHelper::CreateForRange(
content::BrowserContext::GetDefaultStoragePartition(profile_),
- base::Time(), base::Time::Max())
+ GetPeriodStart(), base::Time::Max())
->CountAndDestroySelfWhenFinished(
base::Bind(&CacheCounter::OnCacheSizeCalculated,
- weak_ptr_factory_.GetWeakPtr(), is_upper_limit));
+ weak_ptr_factory_.GetWeakPtr()));
pending_ = true;
}
-void CacheCounter::OnCacheSizeCalculated(bool is_upper_limit,
- int64_t result_bytes) {
+void CacheCounter::OnCacheSizeCalculated(int64_t result_bytes,
+ bool is_upper_limit) {
pending_ = false;
// A value less than 0 means a net error code.

Powered by Google App Engine
This is Rietveld 408576698