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) { |