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

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

Issue 12217049: Proxy WebData-based WebIDBDatabase::put (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 d48cbdd1e38b06213986670d7b897367f2215c46..15504f17b371e3513093b7a188abd690fbb3cacb 100644
--- a/content/common/indexed_db/indexed_db_dispatcher.cc
+++ b/content/common/indexed_db/indexed_db_dispatcher.cc
@@ -385,7 +385,7 @@ void IndexedDBDispatcher::RequestIDBDatabaseGet(
}
-void IndexedDBDispatcher::RequestIDBDatabasePut(
+void IndexedDBDispatcher::RequestIDBDatabasePutOld(
int32 ipc_database_id,
int64 transaction_id,
int64 object_store_id,
@@ -397,7 +397,7 @@ void IndexedDBDispatcher::RequestIDBDatabasePut(
const WebKit::WebVector<WebKit::WebVector<
WebKit::WebIDBKey> >& index_keys) {
ResetCursorPrefetchCaches();
- IndexedDBHostMsg_DatabasePut_Params params;
+ IndexedDBHostMsg_DatabasePutOld_Params params;
init_params(params, callbacks);
params.ipc_database_id = ipc_database_id;
params.transaction_id = transaction_id;
@@ -420,6 +420,43 @@ void IndexedDBDispatcher::RequestIDBDatabasePut(
params.index_keys[i][j] = IndexedDBKey(index_keys[i][j]);
}
}
+ Send(new IndexedDBHostMsg_DatabasePutOld(params));
+}
+
+void IndexedDBDispatcher::RequestIDBDatabasePut(
+ int32 ipc_database_id,
+ int64 transaction_id,
+ int64 object_store_id,
+ const WebKit::WebData& value,
jsbell 2013/02/07 00:06:07 ditto
+ const IndexedDBKey& key,
+ WebKit::WebIDBDatabase::PutMode put_mode,
jsbell 2013/02/07 00:06:07 And this webKit:: prefix shouldn't be necessary be
+ WebKit::WebIDBCallbacks* callbacks,
jsbell 2013/02/07 00:06:07 Or this one, etc.
+ const WebKit::WebVector<long long>& index_ids,
+ const WebKit::WebVector<WebKit::WebVector<
+ WebKit::WebIDBKey> >& index_keys) {
+ ResetCursorPrefetchCaches();
+ IndexedDBHostMsg_DatabasePut_Params params;
+ init_params(params, callbacks);
+ params.ipc_database_id = ipc_database_id;
+ params.transaction_id = transaction_id;
+ params.object_store_id = object_store_id;
+
+ params.value.assign(value.data(), value.data() + value.size());
+ params.key = key;
+ params.put_mode = put_mode;
+
+ COMPILE_ASSERT(sizeof(params.index_ids[0]) ==
+ sizeof(index_ids[0]), Cant_copy);
+ params.index_ids.assign(index_ids.data(),
+ index_ids.data() + index_ids.size());
+
+ 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] = IndexedDBKey(index_keys[i][j]);
+ }
+ }
Send(new IndexedDBHostMsg_DatabasePut(params));
}

Powered by Google App Engine
This is Rietveld 408576698