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

Unified Diff: chrome/browser/ui/webui/options/chromeos/storage_manager_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/options/chromeos/storage_manager_handler.cc
diff --git a/chrome/browser/ui/webui/options/chromeos/storage_manager_handler.cc b/chrome/browser/ui/webui/options/chromeos/storage_manager_handler.cc
index a6f21af5c3d0137bf2c270698c055c7064f82aa6..ba7c607b567c13f57f353eebb5a41931b19ff88d 100644
--- a/chrome/browser/ui/webui/options/chromeos/storage_manager_handler.cc
+++ b/chrome/browser/ui/webui/options/chromeos/storage_manager_handler.cc
@@ -305,8 +305,8 @@ void StorageManagerHandler::UpdateBrowsingDataSize() {
content::BrowserContext::GetDefaultStoragePartition(profile),
base::Time(), base::Time::Max())
->CountAndDestroySelfWhenFinished(
- base::Bind(&StorageManagerHandler::OnGetBrowsingDataSize,
- weak_ptr_factory_.GetWeakPtr(), false));
+ base::Bind(&StorageManagerHandler::OnGetCacheSize,
+ weak_ptr_factory_.GetWeakPtr()));
// Fetch the size of site data in browsing data.
if (!site_data_size_collector_.get()) {
@@ -334,6 +334,11 @@ void StorageManagerHandler::UpdateBrowsingDataSize() {
weak_ptr_factory_.GetWeakPtr(), true));
}
+void StorageManagerHandler::OnGetCacheSize(int64_t size, bool is_upper_limit) {
+ DCHECK(!is_upper_limit);
+ OnGetBrowsingDataSize(false, size);
+}
+
void StorageManagerHandler::OnGetBrowsingDataSize(bool is_site_data,
int64_t size) {
if (is_site_data) {

Powered by Google App Engine
This is Rietveld 408576698