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

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: Yet still happier clang, I hope. 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
« no previous file with comments | « content/browser/indexed_db/indexed_db_database.cc ('k') | content/browser/indexed_db/indexed_db_value.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_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 4ec31fcaee401fd221c67b8dbabfd5e7301fa7ab..b627393c8de2635f504d0d9d4b5a5fc710dc238b 100644
--- a/content/browser/indexed_db/indexed_db_dispatcher_host.cc
+++ b/content/browser/indexed_db/indexed_db_dispatcher_host.cc
@@ -17,6 +17,7 @@
#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_pending_connection.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"
@@ -564,11 +565,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,
« no previous file with comments | « content/browser/indexed_db/indexed_db_database.cc ('k') | content/browser/indexed_db/indexed_db_value.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698