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

Unified Diff: chrome/browser/ui/webui/quota_internals/quota_internals_proxy.cc

Issue 1782053004: Change how the quota system computes the total poolsize for temporary storage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 3 years, 10 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
« no previous file with comments | « chrome/browser/ui/webui/quota_internals/quota_internals_proxy.h ('k') | chrome/test/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/quota_internals/quota_internals_proxy.cc
diff --git a/chrome/browser/ui/webui/quota_internals/quota_internals_proxy.cc b/chrome/browser/ui/webui/quota_internals/quota_internals_proxy.cc
index 11decea02d34f53440021b2054e8380856eba05a..2e88070bc6cc3642940e7e9f93288e96426b05d1 100644
--- a/chrome/browser/ui/webui/quota_internals/quota_internals_proxy.cc
+++ b/chrome/browser/ui/webui/quota_internals/quota_internals_proxy.cc
@@ -32,19 +32,12 @@ void QuotaInternalsProxy::RequestInfo(
return;
}
quota_manager_ = quota_manager;
- {
- // crbug.com/349708
- TRACE_EVENT0("io", "QuotaInternalsProxy::RequestInfo");
- quota_manager_->GetAvailableSpace(
- base::Bind(&QuotaInternalsProxy::DidGetAvailableSpace,
- weak_factory_.GetWeakPtr()));
- }
+ quota_manager_->GetQuotaSettings(base::Bind(
+ &QuotaInternalsProxy::DidGetSettings, weak_factory_.GetWeakPtr()));
- quota_manager_->GetTemporaryGlobalQuota(
- base::Bind(&QuotaInternalsProxy::DidGetGlobalQuota,
- weak_factory_.GetWeakPtr(),
- storage::kStorageTypeTemporary));
+ quota_manager_->GetStorageCapacity(base::Bind(
+ &QuotaInternalsProxy::DidGetCapacity, weak_factory_.GetWeakPtr()));
quota_manager_->GetGlobalUsage(
storage::kStorageTypeTemporary,
@@ -101,23 +94,18 @@ RELAY_TO_HANDLER(ReportStatistics, const Statistics&)
#undef RELAY_TO_HANDLER
-void QuotaInternalsProxy::DidGetAvailableSpace(storage::QuotaStatusCode status,
- int64_t space) {
- // crbug.com/349708
- TRACE_EVENT0("io", "QuotaInternalsProxy::DidGetAvailableSpace");
-
- if (status == storage::kQuotaStatusOk)
- ReportAvailableSpace(space);
+void QuotaInternalsProxy::DidGetSettings(
+ const storage::QuotaSettings& settings) {
+ // TODO(michaeln): also report the other config fields
+ GlobalStorageInfo info(storage::kStorageTypeTemporary);
+ info.set_quota(settings.pool_size);
+ ReportGlobalInfo(info);
}
-void QuotaInternalsProxy::DidGetGlobalQuota(storage::StorageType type,
- storage::QuotaStatusCode status,
- int64_t quota) {
- if (status == storage::kQuotaStatusOk) {
- GlobalStorageInfo info(type);
- info.set_quota(quota);
- ReportGlobalInfo(info);
- }
+void QuotaInternalsProxy::DidGetCapacity(int64_t total_space,
+ int64_t available_space) {
+ // TODO(michaeln): also report total_space
+ ReportAvailableSpace(available_space);
}
void QuotaInternalsProxy::DidGetGlobalUsage(storage::StorageType type,
« no previous file with comments | « chrome/browser/ui/webui/quota_internals/quota_internals_proxy.h ('k') | chrome/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698