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

Unified Diff: content/browser/indexed_db/indexed_db_dispatcher_host.cc

Issue 197753011: Add IndexedDBValue wrapper class to group blob info with bits. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed a bit of extra blob_info stuff that leaked in. Created 6 years, 9 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/browser/indexed_db/indexed_db_dispatcher_host.cc
diff --git a/content/browser/indexed_db/indexed_db_dispatcher_host.cc b/content/browser/indexed_db/indexed_db_dispatcher_host.cc
index f105a6c0d947427920bb6fb2e305573129829199..aae9811ac9b55fd59d99eae1e433b57e32a95630 100644
--- a/content/browser/indexed_db/indexed_db_dispatcher_host.cc
+++ b/content/browser/indexed_db/indexed_db_dispatcher_host.cc
@@ -15,6 +15,7 @@
#include "content/browser/indexed_db/indexed_db_cursor.h"
#include "content/browser/indexed_db/indexed_db_database_callbacks.h"
#include "content/browser/indexed_db/indexed_db_metadata.h"
+#include "content/browser/indexed_db/indexed_db_value.h"
#include "content/browser/renderer_host/render_message_filter.h"
#include "content/common/indexed_db/indexed_db_messages.h"
#include "content/public/browser/browser_thread.h"
@@ -535,11 +536,12 @@ void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnPut(
int64 host_transaction_id = parent_->HostTransactionId(params.transaction_id);
// TODO(alecflett): Avoid a copy here.
- std::string value_copy(params.value);
+ IndexedDBValue value;
+ value.bits = params.value;
connection->database()->Put(
host_transaction_id,
params.object_store_id,
- &value_copy,
+ &value,
make_scoped_ptr(new IndexedDBKey(params.key)),
static_cast<IndexedDBDatabase::PutMode>(params.put_mode),
callbacks,

Powered by Google App Engine
This is Rietveld 408576698