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

Unified Diff: content/browser/in_process_webkit/indexed_db_dispatcher_host.cc

Issue 10830228: Chromium glue for Preemptive cursors and passing keys from renderer to browser (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Moved dispatching to static methods, async messages Created 8 years, 4 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/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);
}
« no previous file with comments | « content/browser/in_process_webkit/indexed_db_dispatcher_host.h ('k') | content/common/indexed_db/indexed_db_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698