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

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

Issue 10041014: IndexedDB: API rename to allow return type of keyPath accessors to change (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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/in_process_webkit/indexed_db_dispatcher_host.h" 5 #include "content/browser/in_process_webkit/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/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "content/browser/in_process_webkit/indexed_db_callbacks.h" 10 #include "content/browser/in_process_webkit/indexed_db_callbacks.h"
(...skipping 10 matching lines...) Expand all
21 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDOMStringList.h" 21 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDOMStringList.h"
22 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBCursor.h" 22 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBCursor.h"
23 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBDatabase.h" 23 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBDatabase.h"
24 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBDatabaseError.h " 24 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBDatabaseError.h "
25 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBFactory.h" 25 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBFactory.h"
26 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBIndex.h" 26 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBIndex.h"
27 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBKeyRange.h" 27 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBKeyRange.h"
28 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBObjectStore.h" 28 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBObjectStore.h"
29 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBTransaction.h" 29 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBTransaction.h"
30 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h" 30 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h"
31 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
31 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h" 32 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h"
32 #include "webkit/database/database_util.h" 33 #include "webkit/database/database_util.h"
33 #include "webkit/glue/webkit_glue.h" 34 #include "webkit/glue/webkit_glue.h"
34 35
35 using content::BrowserMessageFilter; 36 using content::BrowserMessageFilter;
36 using content::BrowserThread; 37 using content::BrowserThread;
37 using content::UserMetricsAction; 38 using content::UserMetricsAction;
38 using webkit_database::DatabaseUtil; 39 using webkit_database::DatabaseUtil;
39 using WebKit::WebDOMStringList; 40 using WebKit::WebDOMStringList;
40 using WebKit::WebExceptionCode; 41 using WebKit::WebExceptionCode;
41 using WebKit::WebIDBCallbacks; 42 using WebKit::WebIDBCallbacks;
42 using WebKit::WebIDBCursor; 43 using WebKit::WebIDBCursor;
43 using WebKit::WebIDBDatabase; 44 using WebKit::WebIDBDatabase;
44 using WebKit::WebIDBDatabaseError; 45 using WebKit::WebIDBDatabaseError;
45 using WebKit::WebIDBIndex; 46 using WebKit::WebIDBIndex;
46 using WebKit::WebIDBKey; 47 using WebKit::WebIDBKey;
47 using WebKit::WebIDBKeyRange; 48 using WebKit::WebIDBKeyRange;
48 using WebKit::WebIDBObjectStore; 49 using WebKit::WebIDBObjectStore;
49 using WebKit::WebIDBTransaction; 50 using WebKit::WebIDBTransaction;
50 using WebKit::WebSecurityOrigin; 51 using WebKit::WebSecurityOrigin;
51 using WebKit::WebSerializedScriptValue; 52 using WebKit::WebSerializedScriptValue;
53 using WebKit::WebString;
dgrogan 2012/04/18 01:56:35 Looks like you don't (yet?) need these WebString l
52 using WebKit::WebVector; 54 using WebKit::WebVector;
53 55
54 namespace { 56 namespace {
55 57
56 template <class T> 58 template <class T>
57 void DeleteOnWebKitThread(T* obj) { 59 void DeleteOnWebKitThread(T* obj) {
58 if (!BrowserThread::DeleteSoon(BrowserThread::WEBKIT_DEPRECATED, 60 if (!BrowserThread::DeleteSoon(BrowserThread::WEBKIT_DEPRECATED,
59 FROM_HERE, obj)) 61 FROM_HERE, obj))
60 delete obj; 62 delete obj;
61 } 63 }
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 527
526 void IndexedDBDispatcherHost::IndexDispatcherHost::OnStoreName( 528 void IndexedDBDispatcherHost::IndexDispatcherHost::OnStoreName(
527 int32 object_id, string16* store_name) { 529 int32 object_id, string16* store_name) {
528 parent_->SyncGetter<string16>( 530 parent_->SyncGetter<string16>(
529 &map_, object_id, store_name, &WebIDBIndex::storeName); 531 &map_, object_id, store_name, &WebIDBIndex::storeName);
530 } 532 }
531 533
532 void IndexedDBDispatcherHost::IndexDispatcherHost::OnKeyPath( 534 void IndexedDBDispatcherHost::IndexDispatcherHost::OnKeyPath(
533 int32 object_id, NullableString16* key_path) { 535 int32 object_id, NullableString16* key_path) {
534 parent_->SyncGetter<NullableString16>( 536 parent_->SyncGetter<NullableString16>(
535 &map_, object_id, key_path, &WebIDBIndex::keyPath); 537 &map_, object_id, key_path, &WebIDBIndex::keyPathString);
536 } 538 }
537 539
538 void IndexedDBDispatcherHost::IndexDispatcherHost::OnUnique( 540 void IndexedDBDispatcherHost::IndexDispatcherHost::OnUnique(
539 int32 object_id, bool* unique) { 541 int32 object_id, bool* unique) {
540 parent_->SyncGetter<bool>(&map_, object_id, unique, &WebIDBIndex::unique); 542 parent_->SyncGetter<bool>(&map_, object_id, unique, &WebIDBIndex::unique);
541 } 543 }
542 544
543 void IndexedDBDispatcherHost::IndexDispatcherHost::OnMultiEntry( 545 void IndexedDBDispatcherHost::IndexDispatcherHost::OnMultiEntry(
544 int32 object_id, bool* multi_entry) { 546 int32 object_id, bool* multi_entry) {
545 parent_->SyncGetter<bool>( 547 parent_->SyncGetter<bool>(
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 705
704 void IndexedDBDispatcherHost::ObjectStoreDispatcherHost::OnName( 706 void IndexedDBDispatcherHost::ObjectStoreDispatcherHost::OnName(
705 int32 object_id, string16* name) { 707 int32 object_id, string16* name) {
706 parent_->SyncGetter<string16>( 708 parent_->SyncGetter<string16>(
707 &map_, object_id, name, &WebIDBObjectStore::name); 709 &map_, object_id, name, &WebIDBObjectStore::name);
708 } 710 }
709 711
710 void IndexedDBDispatcherHost::ObjectStoreDispatcherHost::OnKeyPath( 712 void IndexedDBDispatcherHost::ObjectStoreDispatcherHost::OnKeyPath(
711 int32 object_id, NullableString16* keyPath) { 713 int32 object_id, NullableString16* keyPath) {
712 parent_->SyncGetter<NullableString16>( 714 parent_->SyncGetter<NullableString16>(
713 &map_, object_id, keyPath, &WebIDBObjectStore::keyPath); 715 &map_, object_id, keyPath, &WebIDBObjectStore::keyPathString);
714 } 716 }
715 717
716 void IndexedDBDispatcherHost::ObjectStoreDispatcherHost::OnIndexNames( 718 void IndexedDBDispatcherHost::ObjectStoreDispatcherHost::OnIndexNames(
717 int32 idb_object_store_id, std::vector<string16>* index_names) { 719 int32 idb_object_store_id, std::vector<string16>* index_names) {
718 WebIDBObjectStore* idb_object_store = parent_->GetOrTerminateProcess( 720 WebIDBObjectStore* idb_object_store = parent_->GetOrTerminateProcess(
719 &map_, idb_object_store_id); 721 &map_, idb_object_store_id);
720 if (!idb_object_store) 722 if (!idb_object_store)
721 return; 723 return;
722 724
723 WebDOMStringList web_index_names = idb_object_store->indexNames(); 725 WebDOMStringList web_index_names = idb_object_store->indexNames();
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
1193 } 1195 }
1194 idb_transaction->didCompleteTaskEvents(); 1196 idb_transaction->didCompleteTaskEvents();
1195 } 1197 }
1196 1198
1197 void IndexedDBDispatcherHost::TransactionDispatcherHost::OnDestroyed( 1199 void IndexedDBDispatcherHost::TransactionDispatcherHost::OnDestroyed(
1198 int32 object_id) { 1200 int32 object_id) {
1199 transaction_size_map_.erase(object_id); 1201 transaction_size_map_.erase(object_id);
1200 transaction_url_map_.erase(object_id); 1202 transaction_url_map_.erase(object_id);
1201 parent_->DestroyObject(&map_, object_id); 1203 parent_->DestroyObject(&map_, object_id);
1202 } 1204 }
OLDNEW
« no previous file with comments | « no previous file | content/common/indexed_db/proxy_webidbindex_impl.h » ('j') | webkit/glue/idb_bindings.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698