Index: chrome/browser/extensions/extension_storage_monitor.cc |
diff --git a/chrome/browser/extensions/extension_storage_monitor.cc b/chrome/browser/extensions/extension_storage_monitor.cc |
index 7294fbd4fc8a03d9da3bbb61cd4b0667e620df2b..487ccc83613dccea46f1db56d0cd75c2ac4350cb 100644 |
--- a/chrome/browser/extensions/extension_storage_monitor.cc |
+++ b/chrome/browser/extensions/extension_storage_monitor.cc |
@@ -84,17 +84,17 @@ const Extension* GetExtensionById(content::BrowserContext* context, |
extension_id, ExtensionRegistry::EVERYTHING); |
} |
-void LogTemporaryStorageUsage(int64_t usage, |
- storage::QuotaStatusCode status, |
- int64_t global_quota) { |
- if (status == storage::kQuotaStatusOk) { |
- int64_t per_app_quota = |
- global_quota / storage::QuotaManager::kPerHostTemporaryPortion; |
+void LogTemporaryStorageUsage( |
+ scoped_refptr<storage::QuotaManager> quota_manager, |
+ int64_t usage) { |
+ storage::TemporaryStorageConfiguration |
cmumford
2016/10/25 20:30:54
const storage::TemporaryStorageConfiguration& conf
michaeln
2016/10/26 21:47:53
Done.
|
+ config = quota_manager->storage_config(); |
+ if (config.per_host_quota > 0) { |
// Note we use COUNTS_100 (instead of PERCENT) because this can potentially |
// exceed 100%. |
UMA_HISTOGRAM_COUNTS_100( |
"Extensions.HostedAppUnlimitedStorageTemporaryStorageUsage", |
cmumford
2016/10/25 20:30:54
This doesn't change the meaning of Extensions.Host
michaeln
2016/10/26 21:47:53
i don't think it does
|
- 100.0 * usage / per_app_quota); |
+ 100.0 * usage / config.per_host_quota); |
} |
} |
@@ -238,9 +238,8 @@ class StorageEventObserver |
BrowserThread::PostTask( |
BrowserThread::IO, |
FROM_HERE, |
- base::Bind(&storage::QuotaManager::GetTemporaryGlobalQuota, |
- state.quota_manager, |
- base::Bind(&LogTemporaryStorageUsage, event.usage))); |
+ base::Bind(&LogTemporaryStorageUsage, |
+ state.quota_manager, event.usage)); |
} |
} |