summaryrefslogtreecommitdiffstats
path: root/content/common
diff options
context:
space:
mode:
authoralecflett@chromium.org <alecflett@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-26 23:37:37 +0000
committeralecflett@chromium.org <alecflett@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-26 23:37:37 +0000
commit9919178d30c364af176145bbd1ce616ee0c51757 (patch)
tree1716e70f4b681eec51c83bb1f650bde50eeddd34 /content/common
parent36df8e311ebab69d38618b955db473ac6d447d20 (diff)
downloadchromium_src-9919178d30c364af176145bbd1ce616ee0c51757.zip
chromium_src-9919178d30c364af176145bbd1ce616ee0c51757.tar.gz
chromium_src-9919178d30c364af176145bbd1ce616ee0c51757.tar.bz2
Plumb through the rest of OnSuccessWithKey
BUG=129471 TEST= Review URL: https://chromiumcodereview.appspot.com/10834039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148653 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common')
-rw-r--r--content/common/indexed_db/indexed_db_dispatcher.cc16
-rw-r--r--content/common/indexed_db/indexed_db_dispatcher.h7
2 files changed, 23 insertions, 0 deletions
diff --git a/content/common/indexed_db/indexed_db_dispatcher.cc b/content/common/indexed_db/indexed_db_dispatcher.cc
index e308357..be3903d 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());
diff --git a/content/common/indexed_db/indexed_db_dispatcher.h b/content/common/indexed_db/indexed_db_dispatcher.h
index 03fa7de..250b1f3 100644
--- a/content/common/indexed_db/indexed_db_dispatcher.h
+++ b/content/common/indexed_db/indexed_db_dispatcher.h
@@ -37,6 +37,7 @@ class WebIDBTransaction;
namespace content {
class IndexedDBKey;
+class IndexedDBKeyPath;
class IndexedDBKeyRange;
class SerializedScriptValue;
}
@@ -242,6 +243,12 @@ class CONTENT_EXPORT IndexedDBDispatcher
int32 thread_id,
int32 response_id,
const content::SerializedScriptValue& value);
+ void OnSuccessSerializedScriptValueWithKey(
+ int32 thread_id,
+ int32 response_id,
+ const content::SerializedScriptValue& value,
+ const content::IndexedDBKey& primary_key,
+ const content::IndexedDBKeyPath& key_path);
void OnError(int32 thread_id,
int32 response_id,
int code,