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

Unified Diff: content/child/web_url_loader_impl.cc

Issue 2254173002: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
Index: content/child/web_url_loader_impl.cc
diff --git a/content/child/web_url_loader_impl.cc b/content/child/web_url_loader_impl.cc
index 98e9fa4ad0183d358ce45b6c66e210cac62e589f..a1bca7fff1e9830559040fa5509a82376e461a05 100644
--- a/content/child/web_url_loader_impl.cc
+++ b/content/child/web_url_loader_impl.cc
@@ -558,7 +558,7 @@ void WebURLLoaderImpl::Context::Start(const WebURLRequest& request,
TRACE_EVENT_FLAG_FLOW_OUT);
request_id_ = resource_dispatcher_->StartAsync(
request_info, request_body.get(),
- base::WrapUnique(new WebURLLoaderImpl::RequestPeerImpl(this)),
+ base::MakeUnique<WebURLLoaderImpl::RequestPeerImpl>(this),
request.getLoadingIPCType(), url_loader_factory_);
if (defers_loading_ != NOT_DEFERRING)
@@ -673,9 +673,9 @@ void WebURLLoaderImpl::Context::OnReceivedResponse(
mode = SharedMemoryDataConsumerHandle::kApplyBackpressure;
}
- auto read_handle = base::WrapUnique(new SharedMemoryDataConsumerHandle(
+ auto read_handle = base::MakeUnique<SharedMemoryDataConsumerHandle>(
mode, base::Bind(&Context::CancelBodyStreaming, this),
- &body_stream_writer_));
+ &body_stream_writer_);
// Here |body_stream_writer_| has an indirect reference to |this| and that
// creates a reference cycle, but it is not a problem because the cycle
@@ -871,7 +871,7 @@ void WebURLLoaderImpl::Context::HandleDataURL() {
auto size = data.size();
if (size != 0)
OnReceivedData(
- base::WrapUnique(new FixedReceivedData(data.data(), size, 0, size)));
+ base::MakeUnique<FixedReceivedData>(data.data(), size, 0, size));
}
OnCompletedRequest(error_code, false, false, info.security_info,
« no previous file with comments | « content/child/web_data_consumer_handle_impl_unittest.cc ('k') | content/child/web_url_loader_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698