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

Unified Diff: content/browser/indexed_db/indexed_db_dispatcher_host.cc

Issue 470373002: IndexedDB: Measure the total database open time. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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: content/browser/indexed_db/indexed_db_dispatcher_host.cc
diff --git a/content/browser/indexed_db/indexed_db_dispatcher_host.cc b/content/browser/indexed_db/indexed_db_dispatcher_host.cc
index 0cdde9d016e8fd3520056202f5adef2cddf770b8..8de50ba8f13230c22a83ab20ec718b6f0bd88b70 100644
--- a/content/browser/indexed_db/indexed_db_dispatcher_host.cc
+++ b/content/browser/indexed_db/indexed_db_dispatcher_host.cc
@@ -291,6 +291,7 @@ void IndexedDBDispatcherHost::OnIDBFactoryGetDatabaseNames(
void IndexedDBDispatcherHost::OnIDBFactoryOpen(
const IndexedDBHostMsg_FactoryOpen_Params& params) {
DCHECK(indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread());
+ base::TimeTicks begin_time = base::TimeTicks::Now();
jsbell 2014/08/14 22:58:06 Why a temporary here rather than just passing in N
cmumford 2014/08/14 23:53:03 Just being cautious. The stack value is super smal
jsbell 2014/08/15 00:05:16 It's fine as is, and I agree with your logic. :)
base::FilePath indexed_db_path = indexed_db_context_->data_path();
GURL origin_url =
@@ -307,6 +308,7 @@ void IndexedDBDispatcherHost::OnIDBFactoryOpen(
params.ipc_database_callbacks_id,
host_transaction_id,
origin_url);
+ callbacks->SetDatbaseOpenStartTime(begin_time);
scoped_refptr<IndexedDBDatabaseCallbacks> database_callbacks =
new IndexedDBDatabaseCallbacks(
this, params.ipc_thread_id, params.ipc_database_callbacks_id);

Powered by Google App Engine
This is Rietveld 408576698