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

Unified Diff: content/common/indexed_db/indexed_db_dispatcher.cc

Issue 10759012: Chromium side of plumbing for passing renderer-generated keys through IPC (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Include unit tests too Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: content/common/indexed_db/indexed_db_dispatcher.cc
diff --git a/content/common/indexed_db/indexed_db_dispatcher.cc b/content/common/indexed_db/indexed_db_dispatcher.cc
index c51574e3eb49a7dd599fd2e9afa78dfedc675c20..e308357b062e96aeb710841797266c67e067bc07 100644
--- a/content/common/indexed_db/indexed_db_dispatcher.cc
+++ b/content/common/indexed_db/indexed_db_dispatcher.cc
@@ -421,6 +421,8 @@ void IndexedDBDispatcher::RequestIDBObjectStorePut(
WebIDBCallbacks* callbacks_ptr,
int32 idb_object_store_id,
const WebIDBTransaction& transaction,
+ const WebKit::WebVector<WebKit::WebString>& index_names,
+ const WebKit::WebVector<WebKit::WebVector<WebKit::WebIDBKey> >& index_keys,
WebExceptionCode* ec) {
ResetCursorPrefetchCaches();
scoped_ptr<WebIDBCallbacks> callbacks(callbacks_ptr);
@@ -437,6 +439,18 @@ void IndexedDBDispatcher::RequestIDBObjectStorePut(
params.key = key;
params.put_mode = put_mode;
params.transaction_id = TransactionId(transaction);
+ params.index_names.resize(index_names.size());
+ for (size_t i = 0; i < index_names.size(); ++i) {
+ params.index_names[i] = index_names[i];
+ }
+
+ params.index_keys.resize(index_keys.size());
+ for (size_t i = 0; i < index_keys.size(); ++i) {
+ params.index_keys[i].resize(index_keys[i].size());
+ for (size_t j = 0; j < index_keys[i].size(); ++j) {
+ params.index_keys[i][j] = content::IndexedDBKey(index_keys[i][j]);
+ }
+ }
Send(new IndexedDBHostMsg_ObjectStorePut(params, ec));
if (*ec)
pending_callbacks_.Remove(params.response_id);
« no previous file with comments | « content/common/indexed_db/indexed_db_dispatcher.h ('k') | content/common/indexed_db/indexed_db_dispatcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698