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

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

Issue 1394563002: Add trace to the caller of QuotaManager::GetAvailableSpace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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/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 1e0ab13a662f7a3c3310e4be0836770e49eea278..8dfe2e8fe49037c2a21b54f9e05477eae9e8249c 100644
--- a/chrome/browser/ui/webui/quota_internals/quota_internals_proxy.cc
+++ b/chrome/browser/ui/webui/quota_internals/quota_internals_proxy.cc
@@ -8,6 +8,7 @@
#include <string>
#include "base/bind.h"
+#include "base/trace_event/trace_event.h"
#include "chrome/browser/ui/webui/quota_internals/quota_internals_handler.h"
#include "chrome/browser/ui/webui/quota_internals/quota_internals_types.h"
#include "net/base/net_util.h"
@@ -30,11 +31,15 @@ void QuotaInternalsProxy::RequestInfo(
base::Bind(&QuotaInternalsProxy::RequestInfo, this, quota_manager));
return;
}
-
quota_manager_ = quota_manager;
- quota_manager_->GetAvailableSpace(
- base::Bind(&QuotaInternalsProxy::DidGetAvailableSpace,
- weak_factory_.GetWeakPtr()));
+ {
+ // crbug.com/349708
+ TRACE_EVENT0("io", "QuotaInternalsProxy::RequestInfo");
+
+ quota_manager_->GetAvailableSpace(
+ base::Bind(&QuotaInternalsProxy::DidGetAvailableSpace,
+ weak_factory_.GetWeakPtr()));
+ }
quota_manager_->GetTemporaryGlobalQuota(
base::Bind(&QuotaInternalsProxy::DidGetGlobalQuota,
@@ -98,6 +103,9 @@ RELAY_TO_HANDLER(ReportStatistics, const Statistics&)
void QuotaInternalsProxy::DidGetAvailableSpace(storage::QuotaStatusCode status,
int64 space) {
+ // crbug.com/349708
+ TRACE_EVENT0("io", "QuotaInternalsProxy::DidGetAvailableSpace");
+
if (status == storage::kQuotaStatusOk)
ReportAvailableSpace(space);
}

Powered by Google App Engine
This is Rietveld 408576698