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

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

Issue 227693008: New IPC message parameters for IDB/Blob support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Roll in Chris's feedback Created 6 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/child/indexed_db/indexed_db_dispatcher.cc
diff --git a/content/child/indexed_db/indexed_db_dispatcher.cc b/content/child/indexed_db/indexed_db_dispatcher.cc
index 438f32707a84808ff61418574e9983bec7449bc9..4c131fc801a3e0262e6b326ff921e4661ea83100 100644
--- a/content/child/indexed_db/indexed_db_dispatcher.cc
+++ b/content/child/indexed_db/indexed_db_dispatcher.cc
@@ -501,38 +501,33 @@ void IndexedDBDispatcher::OnSuccessStringList(
pending_callbacks_.Remove(ipc_callbacks_id);
}
-void IndexedDBDispatcher::OnSuccessValue(int32 ipc_thread_id,
- int32 ipc_callbacks_id,
- const std::string& value) {
- DCHECK_EQ(ipc_thread_id, CurrentWorkerId());
- WebIDBCallbacks* callbacks = pending_callbacks_.Lookup(ipc_callbacks_id);
+void IndexedDBDispatcher::OnSuccessValue(
+ const IndexedDBMsg_CallbacksSuccessValue_Params& p) {
+ DCHECK_EQ(p.ipc_thread_id, CurrentWorkerId());
+ WebIDBCallbacks* callbacks = pending_callbacks_.Lookup(p.ipc_callbacks_id);
if (!callbacks)
return;
WebData web_value;
- if (value.size())
- web_value.assign(&*value.begin(), value.size());
+ if (!p.value.empty())
+ web_value.assign(&*p.value.begin(), p.value.size());
callbacks->onSuccess(web_value);
- pending_callbacks_.Remove(ipc_callbacks_id);
- cursor_transaction_ids_.erase(ipc_callbacks_id);
+ pending_callbacks_.Remove(p.ipc_callbacks_id);
+ cursor_transaction_ids_.erase(p.ipc_callbacks_id);
}
void IndexedDBDispatcher::OnSuccessValueWithKey(
- int32 ipc_thread_id,
- int32 ipc_callbacks_id,
- const std::string& value,
- const IndexedDBKey& primary_key,
- const IndexedDBKeyPath& key_path) {
- DCHECK_EQ(ipc_thread_id, CurrentWorkerId());
- WebIDBCallbacks* callbacks = pending_callbacks_.Lookup(ipc_callbacks_id);
+ const IndexedDBMsg_CallbacksSuccessValueWithKey_Params& p) {
+ DCHECK_EQ(p.ipc_thread_id, CurrentWorkerId());
+ WebIDBCallbacks* callbacks = pending_callbacks_.Lookup(p.ipc_callbacks_id);
if (!callbacks)
return;
WebData web_value;
- if (value.size())
- web_value.assign(&*value.begin(), value.size());
+ if (p.value.size())
+ web_value.assign(&*p.value.begin(), p.value.size());
callbacks->onSuccess(web_value,
- WebIDBKeyBuilder::Build(primary_key),
- WebIDBKeyPathBuilder::Build(key_path));
- pending_callbacks_.Remove(ipc_callbacks_id);
+ WebIDBKeyBuilder::Build(p.primary_key),
+ WebIDBKeyPathBuilder::Build(p.key_path));
+ pending_callbacks_.Remove(p.ipc_callbacks_id);
}
void IndexedDBDispatcher::OnSuccessInteger(int32 ipc_thread_id,
« no previous file with comments | « content/child/indexed_db/indexed_db_dispatcher.h ('k') | content/child/indexed_db/indexed_db_dispatcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698