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

Unified Diff: net/http/http_stream_factory_impl.cc

Issue 2893713004: Return Request as unique_ptr from JobController::Start(). (Closed)
Patch Set: Fix conflict with https://crrev.com/2887773006. 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
« no previous file with comments | « net/http/http_stream_factory_impl.h ('k') | net/http/http_stream_factory_impl_job_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_stream_factory_impl.cc
diff --git a/net/http/http_stream_factory_impl.cc b/net/http/http_stream_factory_impl.cc
index c1b6eadc86ab4bdb8422a79cf39b308dd43e57cd..b3ca1f76952737b0d6300aa0a181bd2e89699c52 100644
--- a/net/http/http_stream_factory_impl.cc
+++ b/net/http/http_stream_factory_impl.cc
@@ -6,6 +6,7 @@
#include <string>
#include <tuple>
+#include <utility>
#include "base/logging.h"
#include "base/memory/ptr_util.h"
@@ -45,7 +46,7 @@ HttpStreamFactoryImpl::~HttpStreamFactoryImpl() {
job_controller_set_.size());
}
-HttpStreamRequest* HttpStreamFactoryImpl::RequestStream(
+std::unique_ptr<HttpStreamRequest> HttpStreamFactoryImpl::RequestStream(
const HttpRequestInfo& request_info,
RequestPriority priority,
const SSLConfig& server_ssl_config,
@@ -61,7 +62,8 @@ HttpStreamRequest* HttpStreamFactoryImpl::RequestStream(
enable_alternative_services, net_log);
}
-HttpStreamRequest* HttpStreamFactoryImpl::RequestWebSocketHandshakeStream(
+std::unique_ptr<HttpStreamRequest>
+HttpStreamFactoryImpl::RequestWebSocketHandshakeStream(
const HttpRequestInfo& request_info,
RequestPriority priority,
const SSLConfig& server_ssl_config,
@@ -79,7 +81,8 @@ HttpStreamRequest* HttpStreamFactoryImpl::RequestWebSocketHandshakeStream(
enable_alternative_services, net_log);
}
-HttpStreamRequest* HttpStreamFactoryImpl::RequestBidirectionalStreamImpl(
+std::unique_ptr<HttpStreamRequest>
+HttpStreamFactoryImpl::RequestBidirectionalStreamImpl(
const HttpRequestInfo& request_info,
RequestPriority priority,
const SSLConfig& server_ssl_config,
@@ -97,7 +100,7 @@ HttpStreamRequest* HttpStreamFactoryImpl::RequestBidirectionalStreamImpl(
enable_alternative_services, net_log);
}
-HttpStreamRequest* HttpStreamFactoryImpl::RequestStreamInternal(
+std::unique_ptr<HttpStreamRequest> HttpStreamFactoryImpl::RequestStreamInternal(
const HttpRequestInfo& request_info,
RequestPriority priority,
const SSLConfig& server_ssl_config,
@@ -117,11 +120,9 @@ HttpStreamRequest* HttpStreamFactoryImpl::RequestStreamInternal(
enable_alternative_services, server_ssl_config, proxy_ssl_config);
JobController* job_controller_raw_ptr = job_controller.get();
job_controller_set_.insert(std::move(job_controller));
- Request* request = job_controller_raw_ptr->Start(
- delegate, websocket_handshake_stream_create_helper, net_log, stream_type,
- priority);
-
- return request;
+ return job_controller_raw_ptr->Start(delegate,
+ websocket_handshake_stream_create_helper,
+ net_log, stream_type, priority);
}
void HttpStreamFactoryImpl::PreconnectStreams(
« no previous file with comments | « net/http/http_stream_factory_impl.h ('k') | net/http/http_stream_factory_impl_job_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698