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

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

Issue 10197001: IndexedDB: chromium side of IDBCursor.advance(). (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Reuse the CallbacksSuccessCursorContinue message 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 b725a7d7d400d3a7e9341bd69f2628320bd9c826..cc5d18caa9defa5ebf31dc70b4648be3527f9548 100644
--- a/content/common/indexed_db/indexed_db_dispatcher.cc
+++ b/content/common/indexed_db/indexed_db_dispatcher.cc
@@ -80,6 +80,8 @@ void IndexedDBDispatcher::OnMessageReceived(const IPC::Message& msg) {
IPC_BEGIN_MESSAGE_MAP(IndexedDBDispatcher, msg)
IPC_MESSAGE_HANDLER(IndexedDBMsg_CallbacksSuccessIDBCursor,
OnSuccessOpenCursor)
+ IPC_MESSAGE_HANDLER(IndexedDBMsg_CallbacksSuccessCursorAdvance,
+ OnSuccessCursorContinue)
IPC_MESSAGE_HANDLER(IndexedDBMsg_CallbacksSuccessCursorContinue,
OnSuccessCursorContinue)
IPC_MESSAGE_HANDLER(IndexedDBMsg_CallbacksSuccessCursorPrefetch,
@@ -136,6 +138,23 @@ void IndexedDBDispatcher::RequestIDBCursorUpdate(
pending_callbacks_.Remove(response_id);
}
+void IndexedDBDispatcher::RequestIDBCursorAdvance(
+ unsigned long count,
+ WebIDBCallbacks* callbacks_ptr,
+ int32 idb_cursor_id,
+ WebExceptionCode* ec) {
+ // Reset all cursor prefetch caches except for this cursor.
+ ResetCursorPrefetchCaches(idb_cursor_id);
+
+ scoped_ptr<WebIDBCallbacks> callbacks(callbacks_ptr);
+
+ int32 response_id = pending_callbacks_.Add(callbacks.release());
+ Send(new IndexedDBHostMsg_CursorAdvance(idb_cursor_id, CurrentWorkerId(),
+ response_id, count, ec));
+ if (*ec)
+ pending_callbacks_.Remove(response_id);
+}
+
void IndexedDBDispatcher::RequestIDBCursorContinue(
const IndexedDBKey& key,
WebIDBCallbacks* callbacks_ptr,
« 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