summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/sync_file_system/local/canned_syncable_file_system.cc4
-rw-r--r--chrome/browser/ui/webui/quota_internals/quota_internals_proxy.cc16
-rw-r--r--content/browser/appcache/appcache_storage_impl.cc6
-rw-r--r--content/browser/indexed_db/indexed_db_context_impl.cc5
-rw-r--r--content/browser/quota_dispatcher_host.cc12
-rw-r--r--content/browser/renderer_host/database_message_filter.cc4
-rw-r--r--storage/browser/fileapi/file_system_operation_impl.cc32
-rw-r--r--storage/browser/fileapi/sandbox_file_stream_writer.cc11
-rw-r--r--storage/browser/quota/quota_callbacks.h4
-rw-r--r--storage/browser/quota/quota_manager.cc38
-rw-r--r--storage/browser/quota/quota_manager_proxy.cc8
-rw-r--r--storage/browser/quota/storage_monitor.cc20
12 files changed, 155 insertions, 5 deletions
diff --git a/chrome/browser/sync_file_system/local/canned_syncable_file_system.cc b/chrome/browser/sync_file_system/local/canned_syncable_file_system.cc
index 9eb24c7..ab18150f 100644
--- a/chrome/browser/sync_file_system/local/canned_syncable_file_system.cc
+++ b/chrome/browser/sync_file_system/local/canned_syncable_file_system.cc
@@ -16,6 +16,7 @@
#include "base/single_thread_task_runner.h"
#include "base/task_runner_util.h"
#include "base/thread_task_runner_handle.h"
+#include "base/trace_event/trace_event.h"
#include "chrome/browser/sync_file_system/file_change.h"
#include "chrome/browser/sync_file_system/local/local_file_change_tracker.h"
#include "chrome/browser/sync_file_system/local/local_file_sync_context.h"
@@ -715,6 +716,9 @@ void CannedSyncableFileSystem::DoGetUsageAndQuota(
int64* usage,
int64* quota,
const storage::StatusCallback& callback) {
+ // crbug.com/349708
+ TRACE_EVENT0("io", "CannedSyncableFileSystem::DoGetUsageAndQuota");
+
EXPECT_TRUE(io_task_runner_->RunsTasksOnCurrentThread());
EXPECT_TRUE(is_filesystem_opened_);
DCHECK(quota_manager_.get());
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 1e0ab13..8dfe2e8 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);
}
diff --git a/content/browser/appcache/appcache_storage_impl.cc b/content/browser/appcache/appcache_storage_impl.cc
index 7f1ee9a..067d19a 100644
--- a/content/browser/appcache/appcache_storage_impl.cc
+++ b/content/browser/appcache/appcache_storage_impl.cc
@@ -19,6 +19,7 @@
#include "base/stl_util.h"
#include "base/strings/string_util.h"
#include "base/thread_task_runner_handle.h"
+#include "base/trace_event/trace_event.h"
#include "content/browser/appcache/appcache.h"
#include "content/browser/appcache/appcache_database.h"
#include "content/browser/appcache/appcache_entry.h"
@@ -664,6 +665,11 @@ void AppCacheStorageImpl::StoreGroupAndCacheTask::GetQuotaThenSchedule() {
return;
}
+ // crbug.com/349708
+ TRACE_EVENT0(
+ "io",
+ "AppCacheStorageImpl::StoreGroupAndCacheTask::GetQuotaThenSchedule");
+
// We have to ask the quota manager for the value.
storage_->pending_quota_queries_.insert(this);
quota_manager->GetUsageAndQuota(
diff --git a/content/browser/indexed_db/indexed_db_context_impl.cc b/content/browser/indexed_db/indexed_db_context_impl.cc
index dbc041f..4b3342e 100644
--- a/content/browser/indexed_db/indexed_db_context_impl.cc
+++ b/content/browser/indexed_db/indexed_db_context_impl.cc
@@ -18,6 +18,7 @@
#include "base/strings/utf_string_conversions.h"
#include "base/threading/thread_restrictions.h"
#include "base/time/time.h"
+#include "base/trace_event/trace_event.h"
#include "base/values.h"
#include "content/browser/browser_main_loop.h"
#include "content/browser/indexed_db/indexed_db_connection.h"
@@ -597,6 +598,10 @@ void IndexedDBContextImpl::QueryAvailableQuota(const GURL& origin_url) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
if (!quota_manager_proxy() || !quota_manager_proxy()->quota_manager())
return;
+
+ // crbug.com/349708
+ TRACE_EVENT0("io", "IndexedDBContextImpl::QueryAvailableQuota");
+
quota_manager_proxy()->quota_manager()->GetUsageAndQuota(
origin_url,
storage::kStorageTypeTemporary,
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);
diff --git a/content/browser/renderer_host/database_message_filter.cc b/content/browser/renderer_host/database_message_filter.cc
index cf0e228..5796de5 100644
--- a/content/browser/renderer_host/database_message_filter.cc
+++ b/content/browser/renderer_host/database_message_filter.cc
@@ -11,6 +11,7 @@
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/threading/thread.h"
+#include "base/trace_event/trace_event.h"
#include "content/browser/bad_message.h"
#include "content/common/database_messages.h"
#include "content/public/browser/user_metrics.h"
@@ -261,6 +262,9 @@ void DatabaseMessageFilter::OnDatabaseGetSpaceAvailable(
return;
}
+ // crbug.com/349708
+ TRACE_EVENT0("io", "DatabaseMessageFilter::OnDatabaseGetSpaceAvailable");
+
quota_manager->GetUsageAndQuota(
storage::GetOriginFromIdentifier(origin_identifier),
storage::kStorageTypeTemporary,
diff --git a/storage/browser/fileapi/file_system_operation_impl.cc b/storage/browser/fileapi/file_system_operation_impl.cc
index 30d8561..79cf89e 100644
--- a/storage/browser/fileapi/file_system_operation_impl.cc
+++ b/storage/browser/fileapi/file_system_operation_impl.cc
@@ -8,6 +8,7 @@
#include "base/single_thread_task_runner.h"
#include "base/strings/utf_string_conversions.h"
#include "base/time/time.h"
+#include "base/trace_event/trace_event.h"
#include "net/base/escape.h"
#include "net/url_request/url_request.h"
#include "storage/browser/blob/shareable_file_reference.h"
@@ -63,7 +64,11 @@ FileSystemOperationImpl::~FileSystemOperationImpl() {
void FileSystemOperationImpl::CreateFile(const FileSystemURL& url,
bool exclusive,
const StatusCallback& callback) {
+ // crbug.com/349708
+ TRACE_EVENT0("io", "FileSystemOperationImpl::CreateFile");
+
DCHECK(SetPendingOperationType(kOperationCreateFile));
+
GetUsageAndQuotaThenRunTask(
url,
base::Bind(&FileSystemOperationImpl::DoCreateFile,
@@ -76,6 +81,10 @@ void FileSystemOperationImpl::CreateDirectory(const FileSystemURL& url,
bool recursive,
const StatusCallback& callback) {
DCHECK(SetPendingOperationType(kOperationCreateDirectory));
+
+ // crbug.com/349708
+ TRACE_EVENT0("io", "FileSystemOperationImpl::CreateDirectory");
+
GetUsageAndQuotaThenRunTask(
url,
base::Bind(&FileSystemOperationImpl::DoCreateDirectory,
@@ -190,6 +199,10 @@ void FileSystemOperationImpl::Write(
void FileSystemOperationImpl::Truncate(const FileSystemURL& url, int64 length,
const StatusCallback& callback) {
DCHECK(SetPendingOperationType(kOperationTruncate));
+
+ // crbug.com/349708
+ TRACE_EVENT0("io", "FileSystemOperationImpl::Truncate");
+
GetUsageAndQuotaThenRunTask(
url,
base::Bind(&FileSystemOperationImpl::DoTruncate,
@@ -202,6 +215,10 @@ void FileSystemOperationImpl::TouchFile(const FileSystemURL& url,
const base::Time& last_modified_time,
const StatusCallback& callback) {
DCHECK(SetPendingOperationType(kOperationTouchFile));
+
+ // crbug.com/349708
+ TRACE_EVENT0("io", "FileSystemOperationImpl::TouchFile");
+
async_file_util_->Touch(
operation_context_.Pass(), url,
last_access_time, last_modified_time,
@@ -220,6 +237,10 @@ void FileSystemOperationImpl::OpenFile(const FileSystemURL& url,
base::Closure());
return;
}
+
+ // crbug.com/349708
+ TRACE_EVENT0("io", "FileSystemOperationImpl::OpenFile");
+
GetUsageAndQuotaThenRunTask(
url,
base::Bind(&FileSystemOperationImpl::DoOpenFile,
@@ -262,6 +283,10 @@ void FileSystemOperationImpl::CopyInForeignFile(
const FileSystemURL& dest_url,
const StatusCallback& callback) {
DCHECK(SetPendingOperationType(kOperationCopyInForeignFile));
+
+ // crbug.com/349708
+ TRACE_EVENT0("io", "FileSystemOperationImpl::CopyInForeinFile");
+
GetUsageAndQuotaThenRunTask(
dest_url,
base::Bind(&FileSystemOperationImpl::DoCopyInForeignFile,
@@ -299,6 +324,9 @@ void FileSystemOperationImpl::CopyFileLocal(
DCHECK(SetPendingOperationType(kOperationCopy));
DCHECK(src_url.IsInSameFileSystem(dest_url));
+ // crbug.com/349708
+ TRACE_EVENT0("io", "FileSystemOperationImpl::CopyFileLocal");
+
GetUsageAndQuotaThenRunTask(
dest_url,
base::Bind(&FileSystemOperationImpl::DoCopyFileLocal,
@@ -314,6 +342,10 @@ void FileSystemOperationImpl::MoveFileLocal(
const StatusCallback& callback) {
DCHECK(SetPendingOperationType(kOperationMove));
DCHECK(src_url.IsInSameFileSystem(dest_url));
+
+ // crbug.com/349708
+ TRACE_EVENT0("io", "FileSystemOperationImpl::MoveFileLocal");
+
GetUsageAndQuotaThenRunTask(
dest_url,
base::Bind(&FileSystemOperationImpl::DoMoveFileLocal,
diff --git a/storage/browser/fileapi/sandbox_file_stream_writer.cc b/storage/browser/fileapi/sandbox_file_stream_writer.cc
index 7474894..d6895c8 100644
--- a/storage/browser/fileapi/sandbox_file_stream_writer.cc
+++ b/storage/browser/fileapi/sandbox_file_stream_writer.cc
@@ -6,6 +6,7 @@
#include "base/files/file_util_proxy.h"
#include "base/sequenced_task_runner.h"
+#include "base/trace_event/trace_event.h"
#include "net/base/io_buffer.h"
#include "net/base/net_errors.h"
#include "storage/browser/fileapi/file_observers.h"
@@ -151,6 +152,9 @@ void SandboxFileStreamWriter::DidCreateSnapshotFile(
return;
}
+ // crbug.com/349708
+ TRACE_EVENT0("io", "SandboxFileStreamWriter::DidCreateSnapshotFile");
+
DCHECK(quota_manager_proxy->quota_manager());
quota_manager_proxy->quota_manager()->GetUsageAndQuota(
url_.origin(),
@@ -168,10 +172,17 @@ void SandboxFileStreamWriter::DidGetUsageAndQuota(
return;
if (status != storage::kQuotaStatusOk) {
LOG(WARNING) << "Got unexpected quota error : " << status;
+
+ // crbug.com/349708
+ TRACE_EVENT0("io", "SandboxFileStreamWriter::DidGetUsageAndQuota FAILED");
+
callback.Run(net::ERR_FAILED);
return;
}
+ // crbug.com/349708
+ TRACE_EVENT0("io", "SandboxFileStreamWriter::DidGetUsageAndQuota OK");
+
allowed_bytes_to_write_ = quota - usage;
callback.Run(net::OK);
}
diff --git a/storage/browser/quota/quota_callbacks.h b/storage/browser/quota/quota_callbacks.h
index 36bca1e..4746c5e 100644
--- a/storage/browser/quota/quota_callbacks.h
+++ b/storage/browser/quota/quota_callbacks.h
@@ -60,6 +60,10 @@ class CallbackQueue {
callbacks_.swap(other->callbacks_);
}
+ size_t size() const {
+ return callbacks_.size();
+ }
+
private:
std::vector<CallbackType> callbacks_;
};
diff --git a/storage/browser/quota/quota_manager.cc b/storage/browser/quota/quota_manager.cc
index 52f7280..674b1ec 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", "CallSystemGetAmountOfFreeDiskSpace");
+
// 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;
@@ -430,6 +438,9 @@ class UsageAndQuotaCallbackDispatcher
}
void Completed() override {
+ // crbug.com/349708
+ TRACE_EVENT0("io", "UsageAndQuotaCallbackDispatcher::Completed");
+
DCHECK(!has_usage_ || usage_and_quota_.usage >= 0);
DCHECK(!has_global_limited_usage_ ||
usage_and_quota_.global_limited_usage >= 0);
@@ -472,6 +483,9 @@ class QuotaManager::GetUsageInfoTask : public QuotaTask {
protected:
void Run() override {
+ // crbug.com/349708
+ TRACE_EVENT0("io", "QuotaManager::GetUsageInfoTask::Run");
+
remaining_trackers_ = 3;
// This will populate cached hosts and usage info.
manager()->GetUsageTracker(kStorageTypeTemporary)->GetGlobalUsage(
@@ -489,6 +503,9 @@ class QuotaManager::GetUsageInfoTask : public QuotaTask {
}
void Completed() override {
+ // crbug.com/349708
+ TRACE_EVENT0("io", "QuotaManager::GetUsageInfoTask::Completed");
+
callback_.Run(entries_);
DeleteSoon();
}
@@ -566,11 +583,17 @@ class QuotaManager::OriginDataDeleter : public QuotaTask {
void Completed() override {
if (error_count_ == 0) {
+ // crbug.com/349708
+ TRACE_EVENT0("io", "QuotaManager::OriginDataDeleter::Completed Ok");
+
// Only remove the entire origin if we didn't skip any client types.
if (skipped_clients_ == 0)
manager()->DeleteOriginFromDatabase(origin_, type_);
callback_.Run(kQuotaStatusOk);
} else {
+ // crbug.com/349708
+ TRACE_EVENT0("io", "QuotaManager::OriginDataDeleter::Completed Error");
+
callback_.Run(kQuotaErrorInvalidModification);
}
DeleteSoon();
@@ -640,8 +663,14 @@ class QuotaManager::HostDataDeleter : public QuotaTask {
void Completed() override {
if (error_count_ == 0) {
+ // crbug.com/349708
+ TRACE_EVENT0("io", "QuotaManager::HostDataDeleter::Completed Ok");
+
callback_.Run(kQuotaStatusOk);
} else {
+ // crbug.com/349708
+ TRACE_EVENT0("io", "QuotaManager::HostDataDeleter::Completed Error");
+
callback_.Run(kQuotaErrorInvalidModification);
}
DeleteSoon();
@@ -960,6 +989,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 +1493,9 @@ void QuotaManager::EvictOriginData(const GURL& origin,
void QuotaManager::GetUsageAndQuotaForEviction(
const UsageAndQuotaCallback& callback) {
+ // crbug.com/349708
+ TRACE_EVENT0("io", "QuotaManager::GetUsageAndQuotaForEviction");
+
DCHECK(io_thread_->BelongsToCurrentThread());
LazyInitialize();
@@ -1602,6 +1636,10 @@ void QuotaManager::DidInitializeTemporaryOriginsInfo(bool success) {
}
void QuotaManager::DidGetAvailableSpace(int64 space) {
+ // crbug.com/349708
+ TRACE_EVENT1("io", "QuotaManager::DidGetAvailableSpace",
+ "n_callbacks", available_space_callbacks_.size());
+
available_space_callbacks_.Run(kQuotaStatusOk, space);
}
diff --git a/storage/browser/quota/quota_manager_proxy.cc b/storage/browser/quota/quota_manager_proxy.cc
index c8ccefc..921eab2 100644
--- a/storage/browser/quota/quota_manager_proxy.cc
+++ b/storage/browser/quota/quota_manager_proxy.cc
@@ -10,6 +10,7 @@
#include "base/single_thread_task_runner.h"
#include "base/strings/string_number_conversions.h"
#include "base/task_runner_util.h"
+#include "base/trace_event/trace_event.h"
namespace storage {
@@ -27,6 +28,9 @@ void DidGetUsageAndQuota(
callback, status, usage, quota));
return;
}
+
+ // crbug.com/349708
+ TRACE_EVENT0("io", "QuotaManagerProxy DidGetUsageAndQuota");
callback.Run(status, usage, quota);
}
@@ -137,6 +141,10 @@ void QuotaManagerProxy::GetUsageAndQuota(
DidGetUsageAndQuota(original_task_runner, callback, kQuotaErrorAbort, 0, 0);
return;
}
+
+ // crbug.com/349708
+ TRACE_EVENT0("io", "QuotaManagerProxy::GetUsageAndQuota");
+
manager_->GetUsageAndQuota(
origin, type,
base::Bind(&DidGetUsageAndQuota,
diff --git a/storage/browser/quota/storage_monitor.cc b/storage/browser/quota/storage_monitor.cc
index f312bd3..2ce2122 100644
--- a/storage/browser/quota/storage_monitor.cc
+++ b/storage/browser/quota/storage_monitor.cc
@@ -7,6 +7,7 @@
#include <algorithm>
#include "base/stl_util.h"
+#include "base/trace_event/trace_event.h"
#include "net/base/net_util.h"
#include "storage/browser/quota/quota_manager.h"
#include "storage/common/quota/quota_status_code.h"
@@ -39,6 +40,10 @@ int StorageObserverList::ObserverCount() const {
}
void StorageObserverList::OnStorageChange(const StorageObserver::Event& event) {
+ // crbug.com/349708
+ TRACE_EVENT0("io",
+ "HostStorageObserversStorageObserverList::OnStorageChange");
+
for (StorageObserverStateMap::iterator it = observers_.begin();
it != observers_.end(); ++it) {
it->second.requires_update = true;
@@ -49,6 +54,9 @@ void StorageObserverList::OnStorageChange(const StorageObserver::Event& event) {
void StorageObserverList::MaybeDispatchEvent(
const StorageObserver::Event& event) {
+ // crbug.com/349708
+ TRACE_EVENT0("io", "StorageObserverList::MaybeDispatchEvent");
+
notification_timer_.Stop();
base::TimeDelta min_delay = base::TimeDelta::Max();
bool all_observers_notified = true;
@@ -66,6 +74,10 @@ void StorageObserverList::MaybeDispatchEvent(
it->second.last_notification_time = current_time;
if (it->second.origin == event.filter.origin) {
+ // crbug.com/349708
+ TRACE_EVENT0("io",
+ "StorageObserverList::MaybeDispatchEvent OnStorageEvent1");
+
it->first->OnStorageEvent(event);
} else {
// When the quota and usage of an origin is requested, QuotaManager
@@ -75,6 +87,11 @@ void StorageObserverList::MaybeDispatchEvent(
// registered.
StorageObserver::Event dispatch_event(event);
dispatch_event.filter.origin = it->second.origin;
+
+ // crbug.com/349708
+ TRACE_EVENT0("io",
+ "StorageObserverList::MaybeDispatchEvent OnStorageEvent2");
+
it->first->OnStorageEvent(dispatch_event);
}
} else {
@@ -183,6 +200,8 @@ void HostStorageObservers::StartInitialization(
const StorageObserver::Filter& filter) {
if (initialized_ || initializing_)
return;
+ // crbug.com/349708
+ TRACE_EVENT0("io", "HostStorageObservers::StartInitialization");
initializing_ = true;
quota_manager_->GetUsageAndQuotaForWebApps(
@@ -201,7 +220,6 @@ void HostStorageObservers::GotHostUsageAndQuota(
initializing_ = false;
if (status != kQuotaStatusOk)
return;
-
initialized_ = true;
cached_quota_ = quota;
cached_usage_ = usage + usage_deltas_during_init_;