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

Unified Diff: net/http/http_stream_factory_impl.cc

Issue 2814633003: Extract Proxy Resolution out of HttpStreamFactoryImpl::Job (Closed)
Patch Set: fix remaining tests Created 3 years, 8 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.cc
diff --git a/net/http/http_stream_factory_impl.cc b/net/http/http_stream_factory_impl.cc
index 48bfd1ddbf6f9d87ad0bd5a3cc3de8d4557795c6..5cb542f8e6d3df334a2e30495efdcbd74b945cb5 100644
--- a/net/http/http_stream_factory_impl.cc
+++ b/net/http/http_stream_factory_impl.cc
@@ -46,6 +46,7 @@ class DefaultJobFactory : public HttpStreamFactoryImpl::JobFactory {
HttpNetworkSession* session,
const HttpRequestInfo& request_info,
RequestPriority priority,
+ ProxyInfo proxy_info,
const SSLConfig& server_ssl_config,
const SSLConfig& proxy_ssl_config,
HostPortPair destination,
@@ -53,9 +54,9 @@ class DefaultJobFactory : public HttpStreamFactoryImpl::JobFactory {
bool enable_ip_based_pooling,
NetLog* net_log) override {
return new HttpStreamFactoryImpl::Job(
- delegate, job_type, session, request_info, priority, server_ssl_config,
- proxy_ssl_config, destination, origin_url, enable_ip_based_pooling,
- net_log);
+ delegate, job_type, session, request_info, priority, proxy_info,
+ server_ssl_config, proxy_ssl_config, destination, origin_url,
+ enable_ip_based_pooling, net_log);
}
HttpStreamFactoryImpl::Job* CreateJob(
@@ -64,6 +65,7 @@ class DefaultJobFactory : public HttpStreamFactoryImpl::JobFactory {
HttpNetworkSession* session,
const HttpRequestInfo& request_info,
RequestPriority priority,
+ ProxyInfo proxy_info,
const SSLConfig& server_ssl_config,
const SSLConfig& proxy_ssl_config,
HostPortPair destination,
@@ -72,9 +74,9 @@ class DefaultJobFactory : public HttpStreamFactoryImpl::JobFactory {
bool enable_ip_based_pooling,
NetLog* net_log) override {
return new HttpStreamFactoryImpl::Job(
- delegate, job_type, session, request_info, priority, server_ssl_config,
- proxy_ssl_config, destination, origin_url, alternative_service,
- ProxyServer(), enable_ip_based_pooling, net_log);
+ delegate, job_type, session, request_info, priority, proxy_info,
+ server_ssl_config, proxy_ssl_config, destination, origin_url,
+ alternative_service, ProxyServer(), enable_ip_based_pooling, net_log);
}
HttpStreamFactoryImpl::Job* CreateJob(
@@ -83,6 +85,7 @@ class DefaultJobFactory : public HttpStreamFactoryImpl::JobFactory {
HttpNetworkSession* session,
const HttpRequestInfo& request_info,
RequestPriority priority,
+ ProxyInfo proxy_info,
const SSLConfig& server_ssl_config,
const SSLConfig& proxy_ssl_config,
HostPortPair destination,
@@ -91,9 +94,10 @@ class DefaultJobFactory : public HttpStreamFactoryImpl::JobFactory {
bool enable_ip_based_pooling,
NetLog* net_log) override {
return new HttpStreamFactoryImpl::Job(
- delegate, job_type, session, request_info, priority, server_ssl_config,
- proxy_ssl_config, destination, origin_url, AlternativeService(),
- alternative_proxy_server, enable_ip_based_pooling, net_log);
+ delegate, job_type, session, request_info, priority, proxy_info,
+ server_ssl_config, proxy_ssl_config, destination, origin_url,
+ AlternativeService(), alternative_proxy_server, enable_ip_based_pooling,
+ net_log);
}
};
@@ -181,12 +185,12 @@ HttpStreamRequest* HttpStreamFactoryImpl::RequestStreamInternal(
auto job_controller = base::MakeUnique<JobController>(
this, delegate, session_, job_factory_.get(), request_info,
/* is_preconnect = */ false, enable_ip_based_pooling,
- enable_alternative_services);
+ 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(
- request_info, delegate, websocket_handshake_stream_create_helper, net_log,
- stream_type, priority, server_ssl_config, proxy_ssl_config);
+ delegate, websocket_handshake_stream_create_helper, net_log, stream_type,
+ priority);
return request;
}
@@ -209,11 +213,11 @@ void HttpStreamFactoryImpl::PreconnectStreams(
this, nullptr, session_, job_factory_.get(), request_info,
/* is_preconnect = */ true,
/* enable_ip_based_pooling = */ true,
- /* enable_alternative_services = */ true);
+ /* enable_alternative_services = */ true, server_ssl_config,
+ proxy_ssl_config);
JobController* job_controller_raw_ptr = job_controller.get();
job_controller_set_.insert(std::move(job_controller));
- job_controller_raw_ptr->Preconnect(num_streams, request_info,
- server_ssl_config, proxy_ssl_config);
+ job_controller_raw_ptr->Preconnect(num_streams);
}
const HostMappingRules* HttpStreamFactoryImpl::GetHostMappingRules() const {
« no previous file with comments | « no previous file | net/http/http_stream_factory_impl_job.h » ('j') | net/http/http_stream_factory_impl_job_controller.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698