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

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

Issue 1238393003: [IndexedDB] Adding traces, perf tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: forgot to start the old test Created 5 years, 3 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
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 #include "content/browser/indexed_db/indexed_db_callbacks.h" 5 #include "content/browser/indexed_db/indexed_db_callbacks.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
11 #include "base/time/time.h" 11 #include "base/time/time.h"
12 #include "content/browser/child_process_security_policy_impl.h" 12 #include "content/browser/child_process_security_policy_impl.h"
13 #include "content/browser/fileapi/fileapi_message_filter.h" 13 #include "content/browser/fileapi/fileapi_message_filter.h"
14 #include "content/browser/indexed_db/indexed_db_blob_info.h" 14 #include "content/browser/indexed_db/indexed_db_blob_info.h"
15 #include "content/browser/indexed_db/indexed_db_connection.h" 15 #include "content/browser/indexed_db/indexed_db_connection.h"
16 #include "content/browser/indexed_db/indexed_db_context_impl.h" 16 #include "content/browser/indexed_db/indexed_db_context_impl.h"
17 #include "content/browser/indexed_db/indexed_db_cursor.h" 17 #include "content/browser/indexed_db/indexed_db_cursor.h"
18 #include "content/browser/indexed_db/indexed_db_database_callbacks.h" 18 #include "content/browser/indexed_db/indexed_db_database_callbacks.h"
19 #include "content/browser/indexed_db/indexed_db_database_error.h" 19 #include "content/browser/indexed_db/indexed_db_database_error.h"
20 #include "content/browser/indexed_db/indexed_db_metadata.h" 20 #include "content/browser/indexed_db/indexed_db_metadata.h"
21 #include "content/browser/indexed_db/indexed_db_return_value.h" 21 #include "content/browser/indexed_db/indexed_db_return_value.h"
22 #include "content/browser/indexed_db/indexed_db_tracing.h"
22 #include "content/browser/indexed_db/indexed_db_value.h" 23 #include "content/browser/indexed_db/indexed_db_value.h"
23 #include "content/common/indexed_db/indexed_db_constants.h" 24 #include "content/common/indexed_db/indexed_db_constants.h"
24 #include "content/common/indexed_db/indexed_db_messages.h" 25 #include "content/common/indexed_db/indexed_db_messages.h"
25 #include "storage/browser/blob/blob_storage_context.h" 26 #include "storage/browser/blob/blob_storage_context.h"
26 #include "storage/browser/blob/shareable_file_reference.h" 27 #include "storage/browser/blob/shareable_file_reference.h"
27 #include "storage/browser/quota/quota_manager.h" 28 #include "storage/browser/quota/quota_manager.h"
28 29
29 using storage::ShareableFileReference; 30 using storage::ShareableFileReference;
30 31
31 namespace content { 32 namespace content {
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 if (!blob_info.release_callback().is_null()) 238 if (!blob_info.release_callback().is_null())
238 shareable_file->AddFinalReleaseCallback(blob_info.release_callback()); 239 shareable_file->AddFinalReleaseCallback(blob_info.release_callback());
239 } 240 }
240 return dispatcher_host->HoldBlobData(blob_info); 241 return dispatcher_host->HoldBlobData(blob_info);
241 } 242 }
242 243
243 static bool CreateAllBlobs( 244 static bool CreateAllBlobs(
244 const std::vector<IndexedDBBlobInfo>& blob_info, 245 const std::vector<IndexedDBBlobInfo>& blob_info,
245 std::vector<IndexedDBMsg_BlobOrFileInfo>* blob_or_file_info, 246 std::vector<IndexedDBMsg_BlobOrFileInfo>* blob_or_file_info,
246 scoped_refptr<IndexedDBDispatcherHost> dispatcher_host) { 247 scoped_refptr<IndexedDBDispatcherHost> dispatcher_host) {
248 IDB_TRACE("IndexedDBCallbacks::CreateAllBlobs");
247 DCHECK_EQ(blob_info.size(), blob_or_file_info->size()); 249 DCHECK_EQ(blob_info.size(), blob_or_file_info->size());
248 size_t i; 250 size_t i;
249 if (!dispatcher_host->blob_storage_context()) 251 if (!dispatcher_host->blob_storage_context())
250 return false; 252 return false;
251 for (i = 0; i < blob_info.size(); ++i) { 253 for (i = 0; i < blob_info.size(); ++i) {
252 (*blob_or_file_info)[i].uuid = 254 (*blob_or_file_info)[i].uuid =
253 CreateBlobData(blob_info[i], 255 CreateBlobData(blob_info[i],
254 dispatcher_host, 256 dispatcher_host,
255 dispatcher_host->Context()->TaskRunner()); 257 dispatcher_host->Context()->TaskRunner());
256 } 258 }
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 ipc_thread_id_, ipc_callbacks_id_)); 608 ipc_thread_id_, ipc_callbacks_id_));
607 dispatcher_host_ = NULL; 609 dispatcher_host_ = NULL;
608 } 610 }
609 611
610 void IndexedDBCallbacks::SetConnectionOpenStartTime( 612 void IndexedDBCallbacks::SetConnectionOpenStartTime(
611 const base::TimeTicks& start_time) { 613 const base::TimeTicks& start_time) {
612 connection_open_start_time_ = start_time; 614 connection_open_start_time_ = start_time;
613 } 615 }
614 616
615 } // namespace content 617 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/indexed_db/indexed_db_backing_store.cc ('k') | content/browser/indexed_db/indexed_db_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698