Chromium Code Reviews| Index: storage/browser/quota/quota_manager.cc |
| diff --git a/storage/browser/quota/quota_manager.cc b/storage/browser/quota/quota_manager.cc |
| index 52f728086b7169b02f5b62831cf50f7108b6c619..cf94e82e65a648655a72749bcb99d0ce75d9e39d 100644 |
| --- a/storage/browser/quota/quota_manager.cc |
| +++ b/storage/browser/quota/quota_manager.cc |
| @@ -19,6 +19,7 @@ |
| #include "base/sys_info.h" |
| #include "base/task_runner_util.h" |
| #include "base/time/time.h" |
| +#include "base/trace_event/trace_event.h" |
| #include "net/base/net_util.h" |
| #include "storage/browser/quota/client_usage_tracker.h" |
| #include "storage/browser/quota/quota_manager_proxy.h" |
| @@ -188,6 +189,9 @@ bool UpdateModifiedTimeOnDBThread(const GURL& origin, |
| } |
| int64 CallSystemGetAmountOfFreeDiskSpace(const base::FilePath& profile_path) { |
| + // crbug.com/349708 |
| + TRACE_EVENT0("io", "QuotaManager::GetUsageAndQuotaForEviction"); |
| + |
| // Ensure the profile path exists. |
| if (!base::CreateDirectory(profile_path)) { |
| LOG(WARNING) << "Create directory failed for path" << profile_path.value(); |
| @@ -410,6 +414,10 @@ class UsageAndQuotaCallbackDispatcher |
| } |
| void DidGetAvailableSpace(QuotaStatusCode status, int64 space) { |
| + // crbug.com/349708 |
| + TRACE_EVENT0( |
| + "io", "UsageAndQuotaCallbackDispatcher::DidGetAvailableSpace"); |
| + |
| DCHECK_GE(space, 0); |
| if (status_ == kQuotaStatusUnknown || status_ == kQuotaStatusOk) |
| status_ = status; |
| @@ -960,6 +968,8 @@ void QuotaManager::DeleteHostData(const std::string& host, |
| void QuotaManager::GetAvailableSpace(const AvailableSpaceCallback& callback) { |
| if (!available_space_callbacks_.Add(callback)) |
| return; |
| + // crbug.com/349708 |
| + TRACE_EVENT0("io", "QuotaManager::GetAvailableSpace"); |
| PostTaskAndReplyWithResult(db_thread_.get(), |
| FROM_HERE, |
| @@ -1462,6 +1472,9 @@ void QuotaManager::EvictOriginData(const GURL& origin, |
| void QuotaManager::GetUsageAndQuotaForEviction( |
| const UsageAndQuotaCallback& callback) { |
| + // crbug.com/349708 |
| + TRACE_EVENT0("io", "QuotaManager::GetUsageAndQuotaForEviction"); |
|
michaeln
2015/10/09 19:00:05
fyi: i think many of the quota systems async apis
oshima
2015/10/09 21:07:00
We can tell it from the stack in the trace. I did
|
| + |
| DCHECK(io_thread_->BelongsToCurrentThread()); |
| LazyInitialize(); |
| @@ -1602,6 +1615,9 @@ void QuotaManager::DidInitializeTemporaryOriginsInfo(bool success) { |
| } |
| void QuotaManager::DidGetAvailableSpace(int64 space) { |
| + // crbug.com/349708 |
| + TRACE_EVENT0("io", "QuotaManager::DidGetAvailableSpace"); |
| + |
| available_space_callbacks_.Run(kQuotaStatusOk, space); |
| } |