Chromium Code Reviews| 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)); |
| } |