Index: content/browser/in_process_webkit/indexed_db_dispatcher_host.cc |
diff --git a/content/browser/in_process_webkit/indexed_db_dispatcher_host.cc b/content/browser/in_process_webkit/indexed_db_dispatcher_host.cc |
index dbc9f56c7596df9b88103473c8e04a357b7235df..e828dd435634596a3adf99d2f684e46e31dd1a7b 100644 |
--- a/content/browser/in_process_webkit/indexed_db_dispatcher_host.cc |
+++ b/content/browser/in_process_webkit/indexed_db_dispatcher_host.cc |
@@ -643,6 +643,10 @@ bool IndexedDBDispatcherHost::ObjectStoreDispatcherHost::OnMessageReceived( |
message, *msg_is_ok) |
IPC_MESSAGE_HANDLER(IndexedDBHostMsg_ObjectStoreGet, OnGet) |
IPC_MESSAGE_HANDLER(IndexedDBHostMsg_ObjectStorePut, OnPut) |
+ IPC_MESSAGE_HANDLER(IndexedDBHostMsg_ObjectStoreSetIndexKeys, |
+ OnSetIndexKeys) |
+ IPC_MESSAGE_HANDLER(IndexedDBHostMsg_ObjectStoreSetIndexesReady, |
+ OnSetIndexesReady) |
IPC_MESSAGE_HANDLER(IndexedDBHostMsg_ObjectStoreDelete, OnDelete) |
IPC_MESSAGE_HANDLER(IndexedDBHostMsg_ObjectStoreClear, OnClear) |
IPC_MESSAGE_HANDLER(IndexedDBHostMsg_ObjectStoreCreateIndex, OnCreateIndex) |
@@ -710,6 +714,38 @@ void IndexedDBDispatcherHost::ObjectStoreDispatcherHost::OnPut( |
(*map)[params.transaction_id] += size; |
} |
+void IndexedDBDispatcherHost::ObjectStoreDispatcherHost::OnSetIndexKeys( |
+ int32 idb_object_store_id, |
+ const content::IndexedDBKey& primary_key, |
+ const std::vector<string16>& index_names, |
+ const std::vector<std::vector<content::IndexedDBKey> >& index_keys, |
+ int32 transaction_id) { |
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT_DEPRECATED)); |
+ WebIDBObjectStore* idb_object_store = parent_->GetOrTerminateProcess( |
+ &map_, idb_object_store_id); |
+ WebIDBTransaction* idb_transaction = parent_->GetOrTerminateProcess( |
+ &parent_->transaction_dispatcher_host_->map_, transaction_id); |
+ if (!idb_transaction || !idb_object_store) |
+ return; |
+ idb_object_store->setIndexKeys(primary_key, index_names, |
+ index_keys, *idb_transaction); |
+} |
+ |
+void IndexedDBDispatcherHost::ObjectStoreDispatcherHost::OnSetIndexesReady( |
+ int32 idb_object_store_id, |
+ const std::vector<string16>& index_names, |
+ int32 transaction_id) { |
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT_DEPRECATED)); |
+ WebIDBObjectStore* idb_object_store = parent_->GetOrTerminateProcess( |
+ &map_, idb_object_store_id); |
+ WebIDBTransaction* idb_transaction = parent_->GetOrTerminateProcess( |
+ &parent_->transaction_dispatcher_host_->map_, transaction_id); |
+ if (!idb_transaction || !idb_object_store) |
+ return; |
+ |
+ idb_object_store->setIndexesReady(index_names, *idb_transaction); |
+} |
+ |
void IndexedDBDispatcherHost::ObjectStoreDispatcherHost::OnDelete( |
int idb_object_store_id, |
int32 thread_id, |
@@ -828,6 +864,7 @@ void IndexedDBDispatcherHost::ObjectStoreDispatcherHost::OnOpenCursor( |
params.response_id, -1)); |
idb_object_store->openCursor( |
params.key_range, params.direction, callbacks.release(), |
+ params.task_type, |
*idb_transaction, *ec); |
} |