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

Unified Diff: chrome/browser/ui/webui/settings/chromeos/device_storage_handler.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/ui/webui/settings/chromeos/device_storage_handler.cc
diff --git a/chrome/browser/ui/webui/settings/chromeos/device_storage_handler.cc b/chrome/browser/ui/webui/settings/chromeos/device_storage_handler.cc
index b1d991a30e983c11a87cfb91860e61f3d833985c..345cbe192c108962d78d8314736e82cd80132ca4 100644
--- a/chrome/browser/ui/webui/settings/chromeos/device_storage_handler.cc
+++ b/chrome/browser/ui/webui/settings/chromeos/device_storage_handler.cc
@@ -237,8 +237,7 @@ void StorageHandler::UpdateBrowsingDataSize() {
content::BrowserContext::GetDefaultStoragePartition(profile),
base::Time(), base::Time::Max())
->CountAndDestroySelfWhenFinished(
- base::Bind(&StorageHandler::OnGetBrowsingDataSize,
- base::Unretained(this), false));
+ base::Bind(&StorageHandler::OnGetCacheSize, base::Unretained(this)));
// Fetch the size of site data in browsing data.
if (!site_data_size_collector_.get()) {
@@ -266,6 +265,11 @@ void StorageHandler::UpdateBrowsingDataSize() {
base::Unretained(this), true));
}
+void StorageHandler::OnGetCacheSize(int64_t size, bool is_upper_limit) {
+ DCHECK(!is_upper_limit);
+ OnGetBrowsingDataSize(false, size);
+}
+
void StorageHandler::OnGetBrowsingDataSize(bool is_site_data, int64_t size) {
if (is_site_data) {
has_browser_site_data_size_ = true;

Powered by Google App Engine
This is Rietveld 408576698