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

Unified Diff: content/common/indexed_db/indexed_db_dispatcher.cc

Issue 10083053: IndexedDB: Support get/getKey(keyRange) (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: address nits Created 8 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
« no previous file with comments | « content/common/indexed_db/indexed_db_dispatcher.h ('k') | content/common/indexed_db/indexed_db_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/indexed_db/indexed_db_dispatcher.cc
diff --git a/content/common/indexed_db/indexed_db_dispatcher.cc b/content/common/indexed_db/indexed_db_dispatcher.cc
index a914f9e22ccabf9fe136d2d050fe8b0cac14a8a4..ccb123fb8147b5f2d753b3c256d7369652938de4 100644
--- a/content/common/indexed_db/indexed_db_dispatcher.cc
+++ b/content/common/indexed_db/indexed_db_dispatcher.cc
@@ -369,6 +369,23 @@ void IndexedDBDispatcher::RequestIDBIndexGetObject(
pending_callbacks_.Remove(response_id);
}
+void IndexedDBDispatcher::RequestIDBIndexGetObjectByRange(
+ const IndexedDBKeyRange& key_range,
+ WebIDBCallbacks* callbacks_ptr,
+ int32 idb_index_id,
+ const WebIDBTransaction& transaction,
+ WebExceptionCode* ec) {
+ ResetCursorPrefetchCaches();
+ scoped_ptr<WebIDBCallbacks> callbacks(callbacks_ptr);
+ int32 response_id = pending_callbacks_.Add(callbacks.release());
+ Send(new IndexedDBHostMsg_IndexGetObjectByRange(
+ idb_index_id, CurrentWorkerId(),
+ response_id, key_range,
+ TransactionId(transaction), ec));
+ if (*ec)
+ pending_callbacks_.Remove(response_id);
+}
+
void IndexedDBDispatcher::RequestIDBIndexGetKey(
const IndexedDBKey& key,
WebIDBCallbacks* callbacks_ptr,
@@ -385,6 +402,22 @@ void IndexedDBDispatcher::RequestIDBIndexGetKey(
pending_callbacks_.Remove(response_id);
}
+void IndexedDBDispatcher::RequestIDBIndexGetKeyByRange(
+ const IndexedDBKeyRange& key_range,
+ WebIDBCallbacks* callbacks_ptr,
+ int32 idb_index_id,
+ const WebIDBTransaction& transaction,
+ WebExceptionCode* ec) {
+ ResetCursorPrefetchCaches();
+ scoped_ptr<WebIDBCallbacks> callbacks(callbacks_ptr);
+ int32 response_id = pending_callbacks_.Add(callbacks.release());
+ Send(new IndexedDBHostMsg_IndexGetKeyByRange(
+ idb_index_id, CurrentWorkerId(), response_id, key_range,
+ TransactionId(transaction), ec));
+ if (*ec)
+ pending_callbacks_.Remove(response_id);
+}
+
void IndexedDBDispatcher::RequestIDBObjectStoreGet(
const IndexedDBKey& key,
WebIDBCallbacks* callbacks_ptr,
@@ -402,6 +435,23 @@ void IndexedDBDispatcher::RequestIDBObjectStoreGet(
pending_callbacks_.Remove(response_id);
}
+void IndexedDBDispatcher::RequestIDBObjectStoreGetByRange(
+ const IndexedDBKeyRange& key_range,
+ WebIDBCallbacks* callbacks_ptr,
+ int32 idb_object_store_id,
+ const WebIDBTransaction& transaction,
+ WebExceptionCode* ec) {
+ ResetCursorPrefetchCaches();
+ scoped_ptr<WebIDBCallbacks> callbacks(callbacks_ptr);
+
+ int32 response_id = pending_callbacks_.Add(callbacks.release());
+ Send(new IndexedDBHostMsg_ObjectStoreGetByRange(
+ idb_object_store_id, CurrentWorkerId(), response_id,
+ key_range, TransactionId(transaction), ec));
+ if (*ec)
+ pending_callbacks_.Remove(response_id);
+}
+
void IndexedDBDispatcher::RequestIDBObjectStorePut(
const content::SerializedScriptValue& value,
const IndexedDBKey& key,
« no previous file with comments | « content/common/indexed_db/indexed_db_dispatcher.h ('k') | content/common/indexed_db/indexed_db_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698