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

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

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: 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 12373dc3b99e50b0152231a0b96686547c74de24..1c2f5e8082501f1ab61a4ad42595c26268998e6d 100644
--- a/chrome/browser/browsing_data/cache_counter.cc
+++ b/chrome/browser/browsing_data/cache_counter.cc
@@ -30,18 +30,17 @@ 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()));
}
-void CacheCounter::OnCacheSizeCalculated(bool is_upper_limit,
- int64_t result_bytes) {
+void CacheCounter::OnCacheSizeCalculated(int64_t result_bytes,
+ bool is_upper_limit) {
// A value less than 0 means a net error code.
if (result_bytes < 0)
return;
« no previous file with comments | « chrome/browser/browsing_data/cache_counter.h ('k') | chrome/browser/browsing_data/cache_counter_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698