| 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 e53ff88f170ddc5d33909b6fa0160a9788fadd52..0ac37d4b8b9ee71940d6c8bcb2b0259a9b195224 100644
|
| --- a/net/http/http_stream_factory_impl_job_controller.cc
|
| +++ b/net/http/http_stream_factory_impl_job_controller.cc
|
| @@ -119,7 +119,8 @@ bool HttpStreamFactoryImpl::JobController::for_websockets() {
|
| return factory_->for_websockets_;
|
| }
|
|
|
| -HttpStreamFactoryImpl::Request* HttpStreamFactoryImpl::JobController::Start(
|
| +std::unique_ptr<HttpStreamFactoryImpl::Request>
|
| +HttpStreamFactoryImpl::JobController::Start(
|
| HttpStreamRequest::Delegate* delegate,
|
| WebSocketHandshakeStreamBase::CreateHelper*
|
| websocket_handshake_stream_create_helper,
|
| @@ -132,9 +133,12 @@ HttpStreamFactoryImpl::Request* HttpStreamFactoryImpl::JobController::Start(
|
| stream_type_ = stream_type;
|
| priority_ = priority;
|
|
|
| - request_ = new Request(request_info_.url, this, delegate,
|
| - websocket_handshake_stream_create_helper,
|
| - source_net_log, stream_type);
|
| + 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();
|
| +
|
| // Associates |net_log_| with |source_net_log|.
|
| source_net_log.AddEvent(NetLogEventType::HTTP_STREAM_JOB_CONTROLLER_BOUND,
|
| net_log_.source().ToEventParametersCallback());
|
| @@ -142,7 +146,7 @@ HttpStreamFactoryImpl::Request* HttpStreamFactoryImpl::JobController::Start(
|
| source_net_log.source().ToEventParametersCallback());
|
|
|
| RunLoop(OK);
|
| - return request_;
|
| + return request;
|
| }
|
|
|
| void HttpStreamFactoryImpl::JobController::Preconnect(int num_streams) {
|
|
|