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

Unified Diff: content/browser/in_process_webkit/indexed_db_dispatcher_host.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
Index: content/browser/in_process_webkit/indexed_db_dispatcher_host.cc
diff --git a/content/browser/in_process_webkit/indexed_db_dispatcher_host.cc b/content/browser/in_process_webkit/indexed_db_dispatcher_host.cc
index 3a3d1296987f6b4ddb4acd99fbfe752350fc0b39..6d42d5c25ab980554433c9fc1e5e8ffa7db4668b 100644
--- a/content/browser/in_process_webkit/indexed_db_dispatcher_host.cc
+++ b/content/browser/in_process_webkit/indexed_db_dispatcher_host.cc
@@ -966,6 +966,7 @@ bool IndexedDBDispatcherHost::CursorDispatcherHost::OnMessageReceived(
message, *msg_is_ok)
IPC_MESSAGE_HANDLER(IndexedDBHostMsg_CursorDirection, OnDirection)
IPC_MESSAGE_HANDLER(IndexedDBHostMsg_CursorUpdate, OnUpdate)
+ IPC_MESSAGE_HANDLER(IndexedDBHostMsg_CursorAdvance, OnAdvance)
IPC_MESSAGE_HANDLER(IndexedDBHostMsg_CursorContinue, OnContinue)
IPC_MESSAGE_HANDLER(IndexedDBHostMsg_CursorPrefetch, OnPrefetch)
IPC_MESSAGE_HANDLER(IndexedDBHostMsg_CursorPrefetchReset, OnPrefetchReset)
@@ -1036,6 +1037,26 @@ void IndexedDBDispatcherHost::CursorDispatcherHost::OnUpdate(
*ec);
}
+void IndexedDBDispatcherHost::CursorDispatcherHost::OnAdvance(
+ int32 cursor_id,
+ int32 thread_id,
+ int32 response_id,
+ unsigned long count,
+ WebKit::WebExceptionCode* ec) {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::WEBKIT_DEPRECATED));
+ WebIDBCursor* idb_cursor = parent_->GetOrTerminateProcess(&map_, cursor_id);
+ if (!idb_cursor)
+ return;
+
+ *ec = 0;
+ idb_cursor->advance(count,
+ new IndexedDBCallbacks<WebIDBCursor>(parent_,
+ thread_id,
+ response_id,
+ cursor_id),
+ *ec);
+}
+
void IndexedDBDispatcherHost::CursorDispatcherHost::OnContinue(
int32 cursor_id,
int32 thread_id,
« no previous file with comments | « content/browser/in_process_webkit/indexed_db_dispatcher_host.h ('k') | content/common/indexed_db/indexed_db_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698