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

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

Issue 810403004: [Storage] Blob Storage Refactoring pt 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Snapshots now created by the Handle, one more rename Created 5 years, 11 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 7a4b40134044fddc321e5762093df109a9471bcf..f717b085d4f92240aa5946d4710c613ddefa6c97 100644
--- a/content/browser/indexed_db/indexed_db_dispatcher_host.cc
+++ b/content/browser/indexed_db/indexed_db_dispatcher_host.cc
@@ -226,11 +226,12 @@ std::string IndexedDBDispatcherHost::HoldBlobData(
scoped_ptr<storage::BlobDataHandle> blob_data_handle;
if (uuid.empty()) {
uuid = base::GenerateGUID();
- scoped_refptr<storage::BlobData> blob_data = new storage::BlobData(uuid);
+ scoped_ptr<storage::BlobDataBuilder> blob_data(
michaeln 2015/01/21 01:46:41 instead of heap allocaing it, could BlobDataBuilde
dmurph 2015/01/21 22:40:11 Done.
+ new storage::BlobDataBuilder(uuid));
blob_data->set_content_type(base::UTF16ToUTF8(blob_info.type()));
blob_data->AppendFile(blob_info.file_path(), 0, blob_info.size(),
blob_info.last_modified());
- blob_data_handle = context->AddFinishedBlob(blob_data.get());
+ blob_data_handle = context->AddFinishedBlob(*blob_data.get());
michaeln 2015/01/21 01:46:41 so readers don't have to decrypt *smart.get()
dmurph 2015/01/21 22:40:11 Done.
} else {
auto iter = blob_data_handle_map_.find(uuid);
if (iter != blob_data_handle_map_.end()) {

Powered by Google App Engine
This is Rietveld 408576698