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

Unified Diff: storage/browser/blob/blob_storage_context.cc

Issue 1098853003: [BlobAsync] Patch 4: Browser Classes & Logic. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Missed duplicate invalid test Created 5 years 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 | « storage/browser/blob/blob_storage_context.h ('k') | storage/common/data_element.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: storage/browser/blob/blob_storage_context.cc
diff --git a/storage/browser/blob/blob_storage_context.cc b/storage/browser/blob/blob_storage_context.cc
index 711469690d33f4c88e45f0647ec2ee91a8118360..27db3cf23708a8a2b8b048a32b6fc8be1c8902b8 100644
--- a/storage/browser/blob/blob_storage_context.cc
+++ b/storage/browser/blob/blob_storage_context.cc
@@ -93,32 +93,38 @@ scoped_ptr<BlobDataHandle> BlobStorageContext::GetBlobDataFromPublicURL(
}
scoped_ptr<BlobDataHandle> BlobStorageContext::AddFinishedBlob(
- BlobDataBuilder* external_builder) {
+ const BlobDataBuilder& external_builder) {
TRACE_EVENT0("Blob", "Context::AddFinishedBlob");
- StartBuildingBlob(external_builder->uuid_);
- BlobMap::iterator found = blob_map_.find(external_builder->uuid_);
+ StartBuildingBlob(external_builder.uuid_);
+ BlobMap::iterator found = blob_map_.find(external_builder.uuid_);
DCHECK(found != blob_map_.end());
BlobMapEntry* entry = found->second;
InternalBlobData::Builder* target_blob_builder = entry->data_builder.get();
DCHECK(target_blob_builder);
target_blob_builder->set_content_disposition(
- external_builder->content_disposition_);
- for (const auto& blob_item : external_builder->items_) {
- if (!AppendAllocatedBlobItem(external_builder->uuid_, blob_item,
+ external_builder.content_disposition_);
+ for (const auto& blob_item : external_builder.items_) {
+ if (!AppendAllocatedBlobItem(external_builder.uuid_, blob_item,
target_blob_builder)) {
BlobEntryExceededMemory(entry);
break;
}
}
- FinishBuildingBlob(external_builder->uuid_, external_builder->content_type_);
+ FinishBuildingBlob(external_builder.uuid_, external_builder.content_type_);
scoped_ptr<BlobDataHandle> handle =
- GetBlobDataFromUUID(external_builder->uuid_);
- DecrementBlobRefCount(external_builder->uuid_);
+ GetBlobDataFromUUID(external_builder.uuid_);
+ DecrementBlobRefCount(external_builder.uuid_);
return handle.Pass();
}
+scoped_ptr<BlobDataHandle> BlobStorageContext::AddFinishedBlob(
+ const BlobDataBuilder* builder) {
+ DCHECK(builder);
+ return AddFinishedBlob(*builder);
+}
+
bool BlobStorageContext::RegisterPublicBlobURL(const GURL& blob_url,
const std::string& uuid) {
DCHECK(!BlobUrlHasRef(blob_url));
« no previous file with comments | « storage/browser/blob/blob_storage_context.h ('k') | storage/common/data_element.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698