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

Unified Diff: content/browser/indexed_db/indexed_db_callbacks.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
« no previous file with comments | « no previous file | content/child/indexed_db/indexed_db_dispatcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/indexed_db/indexed_db_callbacks.cc
diff --git a/content/browser/indexed_db/indexed_db_callbacks.cc b/content/browser/indexed_db/indexed_db_callbacks.cc
index 6547fddb6898f3f81f1e8e075da5ef9c90b27a0b..f4c348765b3495e32af1580d0b84e330629131c8 100644
--- a/content/browser/indexed_db/indexed_db_callbacks.cc
+++ b/content/browser/indexed_db/indexed_db_callbacks.cc
@@ -277,17 +277,15 @@ void IndexedDBCallbacks::OnSuccess(IndexedDBValue* value,
DCHECK_EQ(kNoDatabaseCallbacks, ipc_database_callbacks_id_);
DCHECK_EQ(blink::WebIDBDataLossNone, data_loss_);
- std::string value_copy;
+ IndexedDBMsg_CallbacksSuccessValueWithKey_Params params;
+ params.ipc_thread_id = ipc_thread_id_;
+ params.ipc_callbacks_id = ipc_callbacks_id_;
+ params.primary_key = key;
+ params.key_path = key_path;
if (value && !value->empty())
- std::swap(value_copy, value->bits);
+ std::swap(params.value, value->bits);
- dispatcher_host_->Send(new IndexedDBMsg_CallbacksSuccessValueWithKey(
- ipc_thread_id_,
- ipc_callbacks_id_,
- // TODO(alecflett): Avoid a copy here.
- value_copy,
- key,
- key_path));
+ dispatcher_host_->Send(new IndexedDBMsg_CallbacksSuccessValueWithKey(params));
dispatcher_host_ = NULL;
}
@@ -300,15 +298,13 @@ void IndexedDBCallbacks::OnSuccess(IndexedDBValue* value) {
DCHECK_EQ(kNoDatabaseCallbacks, ipc_database_callbacks_id_);
DCHECK_EQ(blink::WebIDBDataLossNone, data_loss_);
- std::string value_copy;
+ IndexedDBMsg_CallbacksSuccessValue_Params params;
+ params.ipc_thread_id = ipc_thread_id_;
+ params.ipc_callbacks_id = ipc_callbacks_id_;
if (value && !value->empty())
- std::swap(value_copy, value->bits);
+ std::swap(params.value, value->bits);
- dispatcher_host_->Send(new IndexedDBMsg_CallbacksSuccessValue(
- ipc_thread_id_,
- ipc_callbacks_id_,
- // TODO(alecflett): avoid a copy here.
- value_copy));
+ dispatcher_host_->Send(new IndexedDBMsg_CallbacksSuccessValue(params));
dispatcher_host_ = NULL;
}
« no previous file with comments | « no previous file | content/child/indexed_db/indexed_db_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698