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

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

Issue 311263014: IndexedDB: Fix trivial cpplint.py errors (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 6 years, 6 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 | Annotate | Revision Log
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_dispatcher_host.h" 5 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/memory/scoped_vector.h" 10 #include "base/memory/scoped_vector.h"
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 metadata.id = web_metadata.id; 237 metadata.id = web_metadata.id;
238 metadata.name = web_metadata.name; 238 metadata.name = web_metadata.name;
239 metadata.version = web_metadata.version; 239 metadata.version = web_metadata.version;
240 metadata.int_version = web_metadata.int_version; 240 metadata.int_version = web_metadata.int_version;
241 metadata.max_object_store_id = web_metadata.max_object_store_id; 241 metadata.max_object_store_id = web_metadata.max_object_store_id;
242 242
243 for (content::IndexedDBDatabaseMetadata::ObjectStoreMap::const_iterator iter = 243 for (content::IndexedDBDatabaseMetadata::ObjectStoreMap::const_iterator iter =
244 web_metadata.object_stores.begin(); 244 web_metadata.object_stores.begin();
245 iter != web_metadata.object_stores.end(); 245 iter != web_metadata.object_stores.end();
246 ++iter) { 246 ++iter) {
247
248 const content::IndexedDBObjectStoreMetadata& web_store_metadata = 247 const content::IndexedDBObjectStoreMetadata& web_store_metadata =
249 iter->second; 248 iter->second;
250 ::IndexedDBObjectStoreMetadata idb_store_metadata; 249 ::IndexedDBObjectStoreMetadata idb_store_metadata;
251 idb_store_metadata.id = web_store_metadata.id; 250 idb_store_metadata.id = web_store_metadata.id;
252 idb_store_metadata.name = web_store_metadata.name; 251 idb_store_metadata.name = web_store_metadata.name;
253 idb_store_metadata.keyPath = web_store_metadata.key_path; 252 idb_store_metadata.keyPath = web_store_metadata.key_path;
254 idb_store_metadata.autoIncrement = web_store_metadata.auto_increment; 253 idb_store_metadata.autoIncrement = web_store_metadata.auto_increment;
255 idb_store_metadata.max_index_id = web_store_metadata.max_index_id; 254 idb_store_metadata.max_index_id = web_store_metadata.max_index_id;
256 255
257 for (content::IndexedDBObjectStoreMetadata::IndexMap::const_iterator 256 for (content::IndexedDBObjectStoreMetadata::IndexMap::const_iterator
(...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after
895 !handled || 894 !handled ||
896 parent_->indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread()); 895 parent_->indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread());
897 896
898 return handled; 897 return handled;
899 } 898 }
900 899
901 void IndexedDBDispatcherHost::CursorDispatcherHost::OnAdvance( 900 void IndexedDBDispatcherHost::CursorDispatcherHost::OnAdvance(
902 int32 ipc_cursor_id, 901 int32 ipc_cursor_id,
903 int32 ipc_thread_id, 902 int32 ipc_thread_id,
904 int32 ipc_callbacks_id, 903 int32 ipc_callbacks_id,
905 unsigned long count) { 904 uint32 count) {
906 DCHECK( 905 DCHECK(
907 parent_->indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread()); 906 parent_->indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread());
908 IndexedDBCursor* idb_cursor = 907 IndexedDBCursor* idb_cursor =
909 parent_->GetOrTerminateProcess(&map_, ipc_cursor_id); 908 parent_->GetOrTerminateProcess(&map_, ipc_cursor_id);
910 if (!idb_cursor) 909 if (!idb_cursor)
911 return; 910 return;
912 911
913 idb_cursor->Advance( 912 idb_cursor->Advance(
914 count, 913 count,
915 new IndexedDBCallbacks( 914 new IndexedDBCallbacks(
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
975 } 974 }
976 975
977 void IndexedDBDispatcherHost::CursorDispatcherHost::OnDestroyed( 976 void IndexedDBDispatcherHost::CursorDispatcherHost::OnDestroyed(
978 int32 ipc_object_id) { 977 int32 ipc_object_id) {
979 DCHECK( 978 DCHECK(
980 parent_->indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread()); 979 parent_->indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread());
981 parent_->DestroyObject(&map_, ipc_object_id); 980 parent_->DestroyObject(&map_, ipc_object_id);
982 } 981 }
983 982
984 } // namespace content 983 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/indexed_db/indexed_db_dispatcher_host.h ('k') | content/browser/indexed_db/indexed_db_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698