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

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: 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..413ce6b35d36f76af72bd1194781e940593a41ba 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)
@@ -527,6 +531,19 @@ void IndexedDBDispatcher::OnSuccessIDBDatabase(int32 thread_id,
pending_callbacks_.Remove(response_id);
}
+void IndexedDBDispatcher::OnSuccessIDBDatabaseDeleted(
dgrogan 2012/10/17 01:21:00 Does this guy have an IPC_MESSAGE_HANDLER line?
+ int32 thread_id,
+ int32 response_id,
+ int32 database_id) {
+ DCHECK_EQ(thread_id, CurrentWorkerId());
+ WebIDBCallbacks* callbacks = pending_callbacks_.Lookup(response_id);
+ if (!callbacks)
+ return;
+ DCHECK_EQ(databases_.count(database_id), 1u);
+ callbacks->onSuccess();
+ pending_callbacks_.Remove(response_id);
+}
+
void IndexedDBDispatcher::OnSuccessIndexedDBKey(
int32 thread_id,
int32 response_id,
@@ -588,6 +605,27 @@ void IndexedDBDispatcher::OnSuccessSerializedScriptValueWithKey(
pending_callbacks_.Remove(response_id);
}
+void IndexedDBDispatcher::OnSuccessInteger(
+ int32 thread_id, int32 response_id,
+ int64 value) {
+ 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