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

Unified Diff: content/renderer/indexed_db_dispatcher.cc

Issue 8779003: Chromium side of IDBIndex.count() and IDBObjectStore.count() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Accomodate worker thread changes Created 9 years 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
« no previous file with comments | « content/renderer/indexed_db_dispatcher.h ('k') | content/renderer/renderer_webidbindex_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/indexed_db_dispatcher.cc
diff --git a/content/renderer/indexed_db_dispatcher.cc b/content/renderer/indexed_db_dispatcher.cc
index ef66217e9b45e377c44a52440367cee2f6c98910..d7e8d6bc0f57a1a1a46ba45856926a9d6d0cd084 100644
--- a/content/renderer/indexed_db_dispatcher.cc
+++ b/content/renderer/indexed_db_dispatcher.cc
@@ -320,6 +320,28 @@ void IndexedDBDispatcher::RequestIDBIndexOpenKeyCursor(
pending_callbacks_.Remove(params.response_id);
}
+void IndexedDBDispatcher::RequestIDBIndexCount(
+ const WebIDBKeyRange& idb_key_range,
+ WebIDBCallbacks* callbacks_ptr,
+ int32 idb_index_id,
+ const WebIDBTransaction& transaction,
+ WebExceptionCode* ec) {
+ ResetCursorPrefetchCaches();
+ scoped_ptr<WebIDBCallbacks> callbacks(callbacks_ptr);
+ IndexedDBHostMsg_IndexCount_Params params;
+ params.thread_id = CurrentWorkerId();
+ params.response_id = pending_callbacks_.Add(callbacks.release());
+ params.lower_key.Set(idb_key_range.lower());
+ params.upper_key.Set(idb_key_range.upper());
+ params.lower_open = idb_key_range.lowerOpen();
+ params.upper_open = idb_key_range.upperOpen();
+ params.idb_index_id = idb_index_id;
+ params.transaction_id = TransactionId(transaction);
+ Send(new IndexedDBHostMsg_IndexCount(params, ec));
+ if (*ec)
+ pending_callbacks_.Remove(params.response_id);
+}
+
void IndexedDBDispatcher::RequestIDBIndexGetObject(
const IndexedDBKey& key,
WebIDBCallbacks* callbacks_ptr,
@@ -449,6 +471,28 @@ void IndexedDBDispatcher::RequestIDBObjectStoreOpenCursor(
pending_callbacks_.Remove(params.response_id);
}
+void IndexedDBDispatcher::RequestIDBObjectStoreCount(
+ const WebIDBKeyRange& idb_key_range,
+ WebIDBCallbacks* callbacks_ptr,
+ int32 idb_object_store_id,
+ const WebIDBTransaction& transaction,
+ WebExceptionCode* ec) {
+ ResetCursorPrefetchCaches();
+ scoped_ptr<WebIDBCallbacks> callbacks(callbacks_ptr);
+ IndexedDBHostMsg_ObjectStoreCount_Params params;
+ params.thread_id = CurrentWorkerId();
+ params.response_id = pending_callbacks_.Add(callbacks.release());
+ params.lower_key.Set(idb_key_range.lower());
+ params.upper_key.Set(idb_key_range.upper());
+ params.lower_open = idb_key_range.lowerOpen();
+ params.upper_open = idb_key_range.upperOpen();
+ params.idb_object_store_id = idb_object_store_id;
+ params.transaction_id = TransactionId(transaction);
+ Send(new IndexedDBHostMsg_ObjectStoreCount(params, ec));
+ if (*ec)
+ pending_callbacks_.Remove(params.response_id);
+}
+
void IndexedDBDispatcher::RegisterWebIDBTransactionCallbacks(
WebIDBTransactionCallbacks* callbacks,
int32 id) {
« no previous file with comments | « content/renderer/indexed_db_dispatcher.h ('k') | content/renderer/renderer_webidbindex_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698