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

Unified Diff: content/browser/loader/upload_data_stream_builder.cc

Issue 492603002: Move SetUserData of BlobDataHandles from UploadDataStreamBuilder to ResourceDispatcherHostImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: added comments in upload_data_stream_builder.h Created 6 years, 4 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/loader/upload_data_stream_builder.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/loader/upload_data_stream_builder.cc
diff --git a/content/browser/loader/upload_data_stream_builder.cc b/content/browser/loader/upload_data_stream_builder.cc
index 0f61c3aa54ad8d345e9659a1daaf6d1c932c968d..47526bed6b41fbd274e5d4632ae20819a524bf90 100644
--- a/content/browser/loader/upload_data_stream_builder.cc
+++ b/content/browser/loader/upload_data_stream_builder.cc
@@ -64,7 +64,6 @@ class FileElementReader : public net::UploadFileElementReader {
};
void ResolveBlobReference(
- ResourceRequestBody* body,
storage::BlobStorageContext* blob_context,
const ResourceRequestBody::Element& element,
std::vector<const ResourceRequestBody::Element*>* resolved_elements) {
@@ -85,11 +84,6 @@ void ResolveBlobReference(
DCHECK_NE(BlobData::Item::TYPE_BLOB, item.type());
resolved_elements->push_back(&item);
}
-
- // Ensure the blob and any attached shareable files survive until
- // upload completion. The |body| takes ownership of |handle|.
- const void* key = handle.get();
- body->SetUserData(key, handle.release());
}
} // namespace
@@ -104,7 +98,7 @@ scoped_ptr<net::UploadDataStream> UploadDataStreamBuilder::Build(
for (size_t i = 0; i < body->elements()->size(); ++i) {
const ResourceRequestBody::Element& element = (*body->elements())[i];
if (element.type() == ResourceRequestBody::Element::TYPE_BLOB)
- ResolveBlobReference(body, blob_context, element, &resolved_elements);
+ ResolveBlobReference(blob_context, element, &resolved_elements);
else
resolved_elements.push_back(&element);
}
« no previous file with comments | « content/browser/loader/upload_data_stream_builder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698