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

Unified Diff: net/http/http_stream_factory_impl_job_controller.cc

Issue 2904643002: Remove some naked |new| statements in favor of MakeUnique. (Closed)
Patch Set: Revert changes in one test where it caused a crash. 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 1e7ea76ade0fcbbf8bf9106caa33ab44ac0352c3..b23470229c3543532a51f1e722091ef68a865467 100644
--- a/net/http/http_stream_factory_impl_job_controller.cc
+++ b/net/http/http_stream_factory_impl_job_controller.cc
@@ -477,21 +477,19 @@ void HttpStreamFactoryImpl::JobController::OnNewSpdySessionReady(
MarkRequestComplete(was_alpn_negotiated, negotiated_protocol, using_spdy);
- std::unique_ptr<HttpStream> stream;
- std::unique_ptr<BidirectionalStreamImpl> bidirectional_stream_impl;
-
if (for_websockets()) {
// TODO(ricea): Re-instate this code when WebSockets over SPDY is
// implemented.
NOTREACHED();
} else if (job->stream_type() == HttpStreamRequest::BIDIRECTIONAL_STREAM) {
- bidirectional_stream_impl = job->ReleaseBidirectionalStream();
+ std::unique_ptr<BidirectionalStreamImpl> bidirectional_stream_impl =
+ job->ReleaseBidirectionalStream();
DCHECK(bidirectional_stream_impl);
delegate_->OnBidirectionalStreamImplReady(
used_ssl_config, used_proxy_info,
bidirectional_stream_impl.release());
} else {
- stream = job->ReleaseStream();
+ std::unique_ptr<HttpStream> stream = job->ReleaseStream();
DCHECK(stream);
delegate_->OnStreamReady(used_ssl_config, used_proxy_info,
stream.release());

Powered by Google App Engine
This is Rietveld 408576698