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

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: 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..bf7ff6b62d3ca9f5dac5c19b0c0fc09e529affc7 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.size())
cmumford 2014/04/08 21:47:26 Nit: was here before, but size() is O(n), but empt
ericu 2014/04/08 22:07:11 As discussed in person, size() is likely O(1), but
+ 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,

Powered by Google App Engine
This is Rietveld 408576698