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

Side by Side Diff: content/common/indexed_db/proxy_webidbobjectstore_impl.cc

Issue 10332204: IPC plumbing for IDBObjectStore.autoIncrement (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch that actually compiles and passes tests Created 8 years, 7 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
« no previous file with comments | « content/common/indexed_db/proxy_webidbobjectstore_impl.h ('k') | no next file » | 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 #include "content/common/indexed_db/proxy_webidbobjectstore_impl.h" 5 #include "content/common/indexed_db/proxy_webidbobjectstore_impl.h"
6 6
7 #include "content/common/indexed_db/indexed_db_messages.h" 7 #include "content/common/indexed_db/indexed_db_messages.h"
8 #include "content/public/common/serialized_script_value.h" 8 #include "content/public/common/serialized_script_value.h"
9 #include "content/common/indexed_db/indexed_db_dispatcher.h" 9 #include "content/common/indexed_db/indexed_db_dispatcher.h"
10 #include "content/common/indexed_db/proxy_webidbindex_impl.h" 10 #include "content/common/indexed_db/proxy_webidbindex_impl.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 new IndexedDBHostMsg_ObjectStoreIndexNames( 66 new IndexedDBHostMsg_ObjectStoreIndexNames(
67 idb_object_store_id_, &result)); 67 idb_object_store_id_, &result));
68 WebDOMStringList web_result; 68 WebDOMStringList web_result;
69 for (std::vector<string16>::const_iterator it = result.begin(); 69 for (std::vector<string16>::const_iterator it = result.begin();
70 it != result.end(); ++it) { 70 it != result.end(); ++it) {
71 web_result.append(*it); 71 web_result.append(*it);
72 } 72 }
73 return web_result; 73 return web_result;
74 } 74 }
75 75
76 bool RendererWebIDBObjectStoreImpl::autoIncrement() const {
77 bool result;
78 IndexedDBDispatcher::Send(
79 new IndexedDBHostMsg_ObjectStoreAutoIncrement(
80 idb_object_store_id_, &result));
81 return result;
82 }
83
76 void RendererWebIDBObjectStoreImpl::get( 84 void RendererWebIDBObjectStoreImpl::get(
77 const WebIDBKeyRange& key_range, 85 const WebIDBKeyRange& key_range,
78 WebIDBCallbacks* callbacks, 86 WebIDBCallbacks* callbacks,
79 const WebIDBTransaction& transaction, 87 const WebIDBTransaction& transaction,
80 WebExceptionCode& ec) { 88 WebExceptionCode& ec) {
81 IndexedDBDispatcher* dispatcher = 89 IndexedDBDispatcher* dispatcher =
82 IndexedDBDispatcher::ThreadSpecificInstance(); 90 IndexedDBDispatcher::ThreadSpecificInstance();
83 dispatcher->RequestIDBObjectStoreGet( 91 dispatcher->RequestIDBObjectStoreGet(
84 content::IndexedDBKeyRange(key_range), callbacks, 92 content::IndexedDBKeyRange(key_range), callbacks,
85 idb_object_store_id_, transaction, &ec); 93 idb_object_store_id_, transaction, &ec);
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 const WebIDBKeyRange& idb_key_range, 202 const WebIDBKeyRange& idb_key_range,
195 WebIDBCallbacks* callbacks, 203 WebIDBCallbacks* callbacks,
196 const WebIDBTransaction& transaction, 204 const WebIDBTransaction& transaction,
197 WebExceptionCode& ec) { 205 WebExceptionCode& ec) {
198 IndexedDBDispatcher* dispatcher = 206 IndexedDBDispatcher* dispatcher =
199 IndexedDBDispatcher::ThreadSpecificInstance(); 207 IndexedDBDispatcher::ThreadSpecificInstance();
200 dispatcher->RequestIDBObjectStoreCount( 208 dispatcher->RequestIDBObjectStoreCount(
201 idb_key_range, callbacks, idb_object_store_id_, 209 idb_key_range, callbacks, idb_object_store_id_,
202 transaction, &ec); 210 transaction, &ec);
203 } 211 }
OLDNEW
« no previous file with comments | « content/common/indexed_db/proxy_webidbobjectstore_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698