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

Side by Side Diff: content/browser/indexed_db/indexed_db_callbacks.h

Issue 470373002: IndexedDB: Measure the total database open time. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: One histogram per event type 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 unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/indexed_db/indexed_db_callbacks.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CALLBACKS_H_ 5 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CALLBACKS_H_
6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CALLBACKS_H_ 6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CALLBACKS_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 // IndexedDBDatabase::Count 99 // IndexedDBDatabase::Count
100 // IndexedDBFactory::DeleteDatabase 100 // IndexedDBFactory::DeleteDatabase
101 virtual void OnSuccess(int64 value); 101 virtual void OnSuccess(int64 value);
102 102
103 // IndexedDBDatabase::Delete 103 // IndexedDBDatabase::Delete
104 // IndexedDBCursor::Continue / Advance (when complete) 104 // IndexedDBCursor::Continue / Advance (when complete)
105 virtual void OnSuccess(); 105 virtual void OnSuccess();
106 106
107 blink::WebIDBDataLoss data_loss() const { return data_loss_; } 107 blink::WebIDBDataLoss data_loss() const { return data_loss_; }
108 108
109 void SetConnectionOpenStartTime(const base::TimeTicks& start_time);
110
109 protected: 111 protected:
110 virtual ~IndexedDBCallbacks(); 112 virtual ~IndexedDBCallbacks();
111 113
112 private: 114 private:
113 void RegisterBlobsAndSend(const std::vector<IndexedDBBlobInfo>& blob_info, 115 void RegisterBlobsAndSend(const std::vector<IndexedDBBlobInfo>& blob_info,
114 const base::Closure& callback); 116 const base::Closure& callback);
115 117
116 friend class base::RefCounted<IndexedDBCallbacks>; 118 friend class base::RefCounted<IndexedDBCallbacks>;
117 119
118 // Originally from IndexedDBCallbacks: 120 // Originally from IndexedDBCallbacks:
119 scoped_refptr<IndexedDBDispatcherHost> dispatcher_host_; 121 scoped_refptr<IndexedDBDispatcherHost> dispatcher_host_;
120 int32 ipc_callbacks_id_; 122 int32 ipc_callbacks_id_;
121 int32 ipc_thread_id_; 123 int32 ipc_thread_id_;
122 124
123 // IndexedDBCursor callbacks ------------------------ 125 // IndexedDBCursor callbacks ------------------------
124 int32 ipc_cursor_id_; 126 int32 ipc_cursor_id_;
125 127
126 // IndexedDBDatabase callbacks ------------------------ 128 // IndexedDBDatabase callbacks ------------------------
127 int64 host_transaction_id_; 129 int64 host_transaction_id_;
128 GURL origin_url_; 130 GURL origin_url_;
129 int32 ipc_database_id_; 131 int32 ipc_database_id_;
130 int32 ipc_database_callbacks_id_; 132 int32 ipc_database_callbacks_id_;
131 133
132 // Stored in OnDataLoss, merged with OnUpgradeNeeded response. 134 // Stored in OnDataLoss, merged with OnUpgradeNeeded response.
133 blink::WebIDBDataLoss data_loss_; 135 blink::WebIDBDataLoss data_loss_;
134 std::string data_loss_message_; 136 std::string data_loss_message_;
135 137
136 // The "blocked" event should be sent at most once per request. 138 // The "blocked" event should be sent at most once per request.
137 bool sent_blocked_; 139 bool sent_blocked_;
140 base::TimeTicks conn_open_start_time_;
jsbell 2014/08/18 18:25:50 nit: Avoid uncommon abbreviations in names (sorry,
138 DISALLOW_COPY_AND_ASSIGN(IndexedDBCallbacks); 141 DISALLOW_COPY_AND_ASSIGN(IndexedDBCallbacks);
139 }; 142 };
140 143
141 } // namespace content 144 } // namespace content
142 145
143 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CALLBACKS_H_ 146 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CALLBACKS_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/indexed_db/indexed_db_callbacks.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698