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 30e54fae6a715026e7c2900518b403a148bf4f35..9aa8637f2e687f240d8c6a4476c6ea57a0021e46 100644 |
| --- a/content/common/indexed_db/indexed_db_dispatcher.cc |
| +++ b/content/common/indexed_db/indexed_db_dispatcher.cc |
| @@ -448,6 +448,49 @@ void IndexedDBDispatcher::RequestIDBObjectStorePut( |
| pending_callbacks_.Remove(params.response_id); |
| } |
| +void IndexedDBDispatcher::RequestIDBObjectStoreSetIndexKeys( |
| + int32 idb_object_store_id, |
| + const IndexedDBKey& primary_key, |
| + const WebKit::WebVector<WebKit::WebString>& web_index_names, |
| + const WebKit::WebVector<WebKit::WebVector<WebKit::WebIDBKey> >& |
| + web_index_keys, |
| + const WebKit::WebIDBTransaction& transaction) { |
| + |
| + std::vector<string16> index_names(web_index_names.size()); |
|
dgrogan
2012/08/08 23:02:50
It looks like you could move this code to the call
alecflett
2012/08/09 20:54:18
Done.
|
| + for (size_t i = 0; i < web_index_names.size(); ++i) { |
| + index_names[i] = web_index_names[i]; |
| + } |
| + |
| + std::vector<std::vector<content::IndexedDBKey> > |
| + index_keys(web_index_keys.size()); |
| + for (size_t i = 0; i < web_index_keys.size(); ++i) { |
| + index_keys[i].resize(web_index_keys[i].size()); |
| + for (size_t j = 0; j < web_index_keys[i].size(); ++j) { |
| + index_keys[i][j] = content::IndexedDBKey(web_index_keys[i][j]); |
| + } |
| + } |
| + Send(new IndexedDBHostMsg_ObjectStoreSetIndexKeys( |
| + idb_object_store_id, |
| + primary_key, |
| + index_names, |
| + index_keys, |
| + TransactionId(transaction))); |
| +} |
| + |
| +void IndexedDBDispatcher::RequestIDBObjectStoreSetIndexesReady( |
| + int32 idb_object_store_id, |
| + const WebKit::WebVector<WebKit::WebString>& index_names, |
| + const WebKit::WebIDBTransaction& transaction) { |
| + std::vector<string16> index_name_list(index_names.size()); |
| + for (size_t i = 0; i < index_names.size(); ++i) { |
| + index_name_list[i] = index_names[i]; |
| + } |
| + |
| + Send(new IndexedDBHostMsg_ObjectStoreSetIndexesReady( |
| + idb_object_store_id, |
| + index_name_list, TransactionId(transaction))); |
| +} |
| + |
| void IndexedDBDispatcher::RequestIDBObjectStoreDelete( |
| const IndexedDBKeyRange& key_range, |
| WebIDBCallbacks* callbacks_ptr, |
| @@ -483,9 +526,10 @@ void IndexedDBDispatcher::RequestIDBObjectStoreClear( |
| void IndexedDBDispatcher::RequestIDBObjectStoreOpenCursor( |
| const WebIDBKeyRange& idb_key_range, |
| - unsigned short direction, |
| + WebKit::WebIDBCursor::Direction direction, |
| WebIDBCallbacks* callbacks_ptr, |
| int32 idb_object_store_id, |
| + WebKit::WebIDBTransaction::TaskType task_type, |
| const WebIDBTransaction& transaction, |
| WebExceptionCode* ec) { |
| ResetCursorPrefetchCaches(); |
| @@ -496,6 +540,7 @@ void IndexedDBDispatcher::RequestIDBObjectStoreOpenCursor( |
| params.key_range = IndexedDBKeyRange(idb_key_range); |
| params.direction = direction; |
| params.idb_object_store_id = idb_object_store_id; |
| + params.task_type = task_type; |
| params.transaction_id = TransactionId(transaction); |
| Send(new IndexedDBHostMsg_ObjectStoreOpenCursor(params, ec)); |
| if (*ec) |