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

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

Issue 1074493002: IndexedDB: Added IDBObjectStore.getAll() implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Limiting response size to 10 MB Created 5 years, 8 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/indexed_db/indexed_db_dispatcher_host.cc
diff --git a/content/browser/indexed_db/indexed_db_dispatcher_host.cc b/content/browser/indexed_db/indexed_db_dispatcher_host.cc
index a2e55ef93e6bba3a2088b40e210851db722819bf..b8e3945e4918f8e367db7ba3e2d6375a12d226f4 100644
--- a/content/browser/indexed_db/indexed_db_dispatcher_host.cc
+++ b/content/browser/indexed_db/indexed_db_dispatcher_host.cc
@@ -508,6 +508,7 @@ bool IndexedDBDispatcherHost::DatabaseDispatcherHost::OnMessageReceived(
OnVersionChangeIgnored)
IPC_MESSAGE_HANDLER(IndexedDBHostMsg_DatabaseDestroyed, OnDestroyed)
IPC_MESSAGE_HANDLER(IndexedDBHostMsg_DatabaseGet, OnGet)
+ IPC_MESSAGE_HANDLER(IndexedDBHostMsg_DatabaseGetAll, OnGetAll)
IPC_MESSAGE_HANDLER(IndexedDBHostMsg_DatabasePut, OnPutWrapper)
IPC_MESSAGE_HANDLER(IndexedDBHostMsg_DatabaseSetIndexKeys, OnSetIndexKeys)
IPC_MESSAGE_HANDLER(IndexedDBHostMsg_DatabaseSetIndexesReady,
@@ -646,6 +647,23 @@ void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnGet(
callbacks);
}
+void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnGetAll(
+ const IndexedDBHostMsg_DatabaseGetAll_Params& params) {
+ DCHECK(
+ parent_->indexed_db_context_->TaskRunner()->RunsTasksOnCurrentThread());
+ IndexedDBConnection* connection =
+ parent_->GetOrTerminateProcess(&map_, params.ipc_database_id);
+ if (!connection || !connection->IsConnected())
+ return;
+
+ scoped_refptr<IndexedDBCallbacks> callbacks(new IndexedDBCallbacks(
+ parent_, params.ipc_thread_id, params.ipc_callbacks_id));
+ connection->database()->GetAll(
+ parent_->HostTransactionId(params.transaction_id), params.object_store_id,
+ make_scoped_ptr(new IndexedDBKeyRange(params.key_range)),
+ params.max_count, callbacks);
+}
+
void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnPutWrapper(
const IndexedDBHostMsg_DatabasePut_Params& params) {
std::vector<storage::BlobDataHandle*> handles;

Powered by Google App Engine
This is Rietveld 408576698