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

Unified Diff: net/http/http_stream_factory_impl_job_controller.cc

Issue 2894723002: Revert of Return Request as unique_ptr from JobController::Start(). (Closed)
Patch Set: Created 3 years, 7 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: net/http/http_stream_factory_impl_job_controller.cc
diff --git a/net/http/http_stream_factory_impl_job_controller.cc b/net/http/http_stream_factory_impl_job_controller.cc
index ec02a873b57a5baf31225b7b8e4d420d07a1b426..6dfbfa6555f5655f50a2a05225b77529cf977c2d 100644
--- a/net/http/http_stream_factory_impl_job_controller.cc
+++ b/net/http/http_stream_factory_impl_job_controller.cc
@@ -115,8 +115,7 @@
return factory_->for_websockets_;
}
-std::unique_ptr<HttpStreamFactoryImpl::Request>
-HttpStreamFactoryImpl::JobController::Start(
+HttpStreamFactoryImpl::Request* HttpStreamFactoryImpl::JobController::Start(
HttpStreamRequest::Delegate* delegate,
WebSocketHandshakeStreamBase::CreateHelper*
websocket_handshake_stream_create_helper,
@@ -129,12 +128,9 @@
stream_type_ = stream_type;
priority_ = priority;
- auto request = base::MakeUnique<Request>(
- request_info_.url, this, delegate,
- websocket_handshake_stream_create_helper, source_net_log, stream_type);
- // Keep a raw pointer but release ownership of Request instance.
- request_ = request.get();
-
+ request_ = new Request(request_info_.url, this, delegate,
+ websocket_handshake_stream_create_helper,
+ source_net_log, stream_type);
// Associates |net_log_| with |source_net_log|.
source_net_log.AddEvent(NetLogEventType::HTTP_STREAM_JOB_CONTROLLER_BOUND,
net_log_.source().ToEventParametersCallback());
@@ -142,7 +138,7 @@
source_net_log.source().ToEventParametersCallback());
RunLoop(OK);
- return request;
+ return request_;
}
void HttpStreamFactoryImpl::JobController::Preconnect(int num_streams) {
« no previous file with comments | « net/http/http_stream_factory_impl_job_controller.h ('k') | net/http/http_stream_factory_impl_job_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698