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

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

Issue 11194026: Flush out IPC for onSuccess() / onSuccess(long long) (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Remove dead code Created 8 years, 2 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/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 ccd1152d7cc4ac929bed64d8bdf0bcdb537062f4..fdc911b6e56ac65d2cfddebd0bc867621bd39210 100644
--- a/content/common/indexed_db/indexed_db_dispatcher.cc
+++ b/content/common/indexed_db/indexed_db_dispatcher.cc
@@ -101,6 +101,10 @@ void IndexedDBDispatcher::OnMessageReceived(const IPC::Message& msg) {
OnSuccessSerializedScriptValue)
IPC_MESSAGE_HANDLER(IndexedDBMsg_CallbacksSuccessSerializedScriptValueWithKey,
OnSuccessSerializedScriptValueWithKey)
+ IPC_MESSAGE_HANDLER(IndexedDBMsg_CallbacksSuccessInteger,
+ OnSuccessInteger)
+ IPC_MESSAGE_HANDLER(IndexedDBMsg_CallbacksSuccessUndefined,
+ OnSuccessUndefined)
IPC_MESSAGE_HANDLER(IndexedDBMsg_CallbacksError, OnError)
IPC_MESSAGE_HANDLER(IndexedDBMsg_CallbacksBlocked, OnBlocked)
IPC_MESSAGE_HANDLER(IndexedDBMsg_CallbacksIntBlocked, OnIntBlocked)
@@ -588,6 +592,27 @@ void IndexedDBDispatcher::OnSuccessSerializedScriptValueWithKey(
pending_callbacks_.Remove(response_id);
}
+void IndexedDBDispatcher::OnSuccessInteger(
+ int32 thread_id, int32 response_id,
+ int64 value) {
jsbell 2012/10/17 17:24:01 This can probably fit on the previous line
+ DCHECK_EQ(thread_id, CurrentWorkerId());
+ WebIDBCallbacks* callbacks = pending_callbacks_.Lookup(response_id);
+ if (!callbacks)
+ return;
+ callbacks->onSuccess(value);
+ pending_callbacks_.Remove(response_id);
+}
+
+void IndexedDBDispatcher::OnSuccessUndefined(
+ int32 thread_id, int32 response_id) {
+ DCHECK_EQ(thread_id, CurrentWorkerId());
+ WebIDBCallbacks* callbacks = pending_callbacks_.Lookup(response_id);
+ if (!callbacks)
+ return;
+ callbacks->onSuccess();
+ pending_callbacks_.Remove(response_id);
+}
+
void IndexedDBDispatcher::OnSuccessOpenCursor(
const IndexedDBMsg_CallbacksSuccessIDBCursor_Params& p) {
DCHECK_EQ(p.thread_id, CurrentWorkerId());

Powered by Google App Engine
This is Rietveld 408576698