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

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

Issue 10834039: Plumb through the rest of OnSuccessWithKey (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 5 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') | no next file » | 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 e308357b062e96aeb710841797266c67e067bc07..be3903dc127607a4342ddcffa663514a39b64009 100644
--- a/content/common/indexed_db/indexed_db_dispatcher.cc
+++ b/content/common/indexed_db/indexed_db_dispatcher.cc
@@ -22,6 +22,7 @@
using base::ThreadLocalPointer;
using content::IndexedDBKey;
+using content::IndexedDBKeyPath;
using content::IndexedDBKeyRange;
using content::SerializedScriptValue;
using WebKit::WebDOMStringList;
@@ -99,6 +100,8 @@ void IndexedDBDispatcher::OnMessageReceived(const IPC::Message& msg) {
OnSuccessStringList)
IPC_MESSAGE_HANDLER(IndexedDBMsg_CallbacksSuccessSerializedScriptValue,
OnSuccessSerializedScriptValue)
+ IPC_MESSAGE_HANDLER(IndexedDBMsg_CallbacksSuccessSerializedScriptValueWithKey,
+ OnSuccessSerializedScriptValueWithKey)
IPC_MESSAGE_HANDLER(IndexedDBMsg_CallbacksError, OnError)
IPC_MESSAGE_HANDLER(IndexedDBMsg_CallbacksBlocked, OnBlocked)
IPC_MESSAGE_HANDLER(IndexedDBMsg_TransactionCallbacksAbort, OnAbort)
@@ -605,6 +608,19 @@ void IndexedDBDispatcher::OnSuccessSerializedScriptValue(
pending_callbacks_.Remove(response_id);
}
+void IndexedDBDispatcher::OnSuccessSerializedScriptValueWithKey(
+ int32 thread_id, int32 response_id,
+ const SerializedScriptValue& value,
+ const IndexedDBKey& primary_key,
+ const IndexedDBKeyPath& key_path) {
+ DCHECK_EQ(thread_id, CurrentWorkerId());
+ WebIDBCallbacks* callbacks = pending_callbacks_.Lookup(response_id);
+ if (!callbacks)
+ return;
+ callbacks->onSuccess(value, primary_key, key_path);
+ pending_callbacks_.Remove(response_id);
+}
+
void IndexedDBDispatcher::OnSuccessOpenCursor(
const IndexedDBMsg_CallbacksSuccessIDBCursor_Params& p) {
DCHECK_EQ(p.thread_id, CurrentWorkerId());
« no previous file with comments | « content/common/indexed_db/indexed_db_dispatcher.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698