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

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: Fixed copyright 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 bbfe9eed61f27a89114688dfec301af527137484..02bf1977907d8cb56e95ef1844e5865073f926c9 100644
--- a/content/browser/indexed_db/indexed_db_dispatcher_host.cc
+++ b/content/browser/indexed_db/indexed_db_dispatcher_host.cc
@@ -27,6 +27,7 @@
#include "content/public/browser/user_metrics.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/result_codes.h"
+#include "storage/browser/blob/blob_data_builder.h"
#include "storage/browser/blob/blob_storage_context.h"
#include "storage/browser/database/database_util.h"
#include "storage/common/database/database_identifier.h"
@@ -226,11 +227,11 @@ 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);
- 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());
+ storage::BlobDataBuilder blob_data_builder(uuid);
+ blob_data_builder.set_content_type(base::UTF16ToUTF8(blob_info.type()));
+ blob_data_builder.AppendFile(blob_info.file_path(), 0, blob_info.size(),
+ blob_info.last_modified());
+ blob_data_handle = context->AddFinishedBlob(blob_data_builder);
} 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