summaryrefslogtreecommitdiffstats
path: root/content/browser/quota_dispatcher_host.cc
diff options
context:
space:
mode:
authoroshima <oshima@chromium.org>2015-10-09 18:16:46 -0700
committerCommit bot <commit-bot@chromium.org>2015-10-10 01:17:26 +0000
commitfbe0354f403ff793ccacd4d1e162583c11bd58db (patch)
tree6eca4ea5fcbaaf3ff15b01cb99db50d8ceb085e7 /content/browser/quota_dispatcher_host.cc
parent87397e0140327124f38096d1fc88190a6154a9fd (diff)
downloadchromium_src-fbe0354f403ff793ccacd4d1e162583c11bd58db.zip
chromium_src-fbe0354f403ff793ccacd4d1e162583c11bd58db.tar.gz
chromium_src-fbe0354f403ff793ccacd4d1e162583c11bd58db.tar.bz2
Add trace to the caller of QuotaManager::GetAvailableSpace and its callbacks (where possible).
BUG=349708 R=kinuko@chromium.org TBR=tzik@chromium.org Review URL: https://codereview.chromium.org/1394563002 Cr-Commit-Position: refs/heads/master@{#353449}
Diffstat (limited to 'content/browser/quota_dispatcher_host.cc')
-rw-r--r--content/browser/quota_dispatcher_host.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/content/browser/quota_dispatcher_host.cc b/content/browser/quota_dispatcher_host.cc
index 3cbfee2..234eb54 100644
--- a/content/browser/quota_dispatcher_host.cc
+++ b/content/browser/quota_dispatcher_host.cc
@@ -7,6 +7,7 @@
#include "base/bind.h"
#include "base/memory/weak_ptr.h"
#include "base/numerics/safe_conversions.h"
+#include "base/trace_event/trace_event.h"
#include "content/common/quota_messages.h"
#include "content/public/browser/quota_permission_context.h"
#include "net/base/net_util.h"
@@ -71,6 +72,11 @@ class QuotaDispatcherHost::QueryUsageAndQuotaDispatcher
~QueryUsageAndQuotaDispatcher() override {}
void QueryStorageUsageAndQuota(const GURL& origin, StorageType type) {
+ // crbug.com/349708
+ TRACE_EVENT0("io",
+ "QuotaDispatcherHost::QueryUsageAndQuotaDispatcher"
+ "::QueryStorageUsageAndQuota");
+
quota_manager()->GetUsageAndQuotaForWebApps(
origin, type,
base::Bind(&QueryUsageAndQuotaDispatcher::DidQueryStorageUsageAndQuota,
@@ -82,6 +88,10 @@ class QuotaDispatcherHost::QueryUsageAndQuotaDispatcher
QuotaStatusCode status, int64 usage, int64 quota) {
if (!dispatcher_host())
return;
+ // crbug.com/349708
+ TRACE_EVENT0("io", "QuotaDispatcherHost::RequestQuotaDispatcher"
+ "::DidQueryStorageUsageAndQuota");
+
if (status != storage::kQuotaStatusOk) {
dispatcher_host()->Send(new QuotaMsg_DidFail(request_id(), status));
} else {
@@ -116,6 +126,8 @@ class QuotaDispatcherHost::RequestQuotaDispatcher
void Start() {
DCHECK(dispatcher_host());
+ // crbug.com/349708
+ TRACE_EVENT0("io", "QuotaDispatcherHost::RequestQuotaDispatcher::Start");
DCHECK(params_.storage_type == storage::kStorageTypeTemporary ||
params_.storage_type == storage::kStorageTypePersistent);