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

Unified Diff: content/browser/fileapi/chrome_blob_storage_context.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/fileapi/chrome_blob_storage_context.cc
diff --git a/content/browser/fileapi/chrome_blob_storage_context.cc b/content/browser/fileapi/chrome_blob_storage_context.cc
index f085242f689eab0c8f37a6079d4ae9664fdc946a..127b6cedf810641d4562fe640ce4e7bb78dfb393 100644
--- a/content/browser/fileapi/chrome_blob_storage_context.cc
+++ b/content/browser/fileapi/chrome_blob_storage_context.cc
@@ -24,8 +24,7 @@ const char kBlobStorageContextKeyName[] = "content_blob_storage_context";
class BlobHandleImpl : public BlobHandle {
public:
explicit BlobHandleImpl(scoped_ptr<storage::BlobDataHandle> handle)
- : handle_(handle.Pass()) {
- }
+ : handle_(handle.Pass()) {}
~BlobHandleImpl() override {}
@@ -69,11 +68,12 @@ scoped_ptr<BlobHandle> ChromeBlobStorageContext::CreateMemoryBackedBlob(
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
std::string 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 maybe rename the local to blob_data_builder
dmurph 2015/01/21 22:40:11 Done.
+ new storage::BlobDataBuilder(uuid));
blob_data->AppendData(data, length);
scoped_ptr<storage::BlobDataHandle> blob_data_handle =
- context_->AddFinishedBlob(blob_data.get());
+ context_->AddFinishedBlob(*blob_data.get());
if (!blob_data_handle)
return scoped_ptr<BlobHandle>();

Powered by Google App Engine
This is Rietveld 408576698