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

Unified Diff: net/http/http_stream_factory_test_util.cc

Issue 2814633003: Extract Proxy Resolution out of HttpStreamFactoryImpl::Job (Closed)
Patch Set: rebased 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_test_util.h ('k') | net/spdy/chromium/spdy_test_util_common.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_stream_factory_test_util.cc
diff --git a/net/http/http_stream_factory_test_util.cc b/net/http/http_stream_factory_test_util.cc
index 55fb736e568db1042749cc56fb1a205976fb62f4..e2d018bce4ad97ff0a221403e3126b86d13d9c0c 100644
--- a/net/http/http_stream_factory_test_util.cc
+++ b/net/http/http_stream_factory_test_util.cc
@@ -19,6 +19,7 @@ MockHttpStreamFactoryImplJob::MockHttpStreamFactoryImplJob(
HttpNetworkSession* session,
const HttpRequestInfo& request_info,
RequestPriority priority,
+ ProxyInfo proxy_info,
const SSLConfig& server_ssl_config,
const SSLConfig& proxy_ssl_config,
HostPortPair destination,
@@ -30,6 +31,7 @@ MockHttpStreamFactoryImplJob::MockHttpStreamFactoryImplJob(
session,
request_info,
priority,
+ proxy_info,
server_ssl_config,
proxy_ssl_config,
destination,
@@ -45,6 +47,7 @@ MockHttpStreamFactoryImplJob::MockHttpStreamFactoryImplJob(
HttpNetworkSession* session,
const HttpRequestInfo& request_info,
RequestPriority priority,
+ ProxyInfo proxy_info,
const SSLConfig& server_ssl_config,
const SSLConfig& proxy_ssl_config,
HostPortPair destination,
@@ -58,6 +61,7 @@ MockHttpStreamFactoryImplJob::MockHttpStreamFactoryImplJob(
session,
request_info,
priority,
+ proxy_info,
server_ssl_config,
proxy_ssl_config,
destination,
@@ -76,36 +80,37 @@ TestJobFactory::TestJobFactory()
TestJobFactory::~TestJobFactory() {}
-HttpStreamFactoryImpl::Job* TestJobFactory::CreateJob(
+HttpStreamFactoryImpl::Job* TestJobFactory::CreateMainJob(
HttpStreamFactoryImpl::Job::Delegate* delegate,
HttpStreamFactoryImpl::JobType job_type,
HttpNetworkSession* session,
const HttpRequestInfo& request_info,
RequestPriority priority,
+ const ProxyInfo& proxy_info,
const SSLConfig& server_ssl_config,
const SSLConfig& proxy_ssl_config,
HostPortPair destination,
GURL origin_url,
bool enable_ip_based_pooling,
NetLog* net_log) {
- DCHECK(!main_job_);
-
if (override_main_job_url_)
origin_url = main_job_alternative_url_;
main_job_ = new MockHttpStreamFactoryImplJob(
- delegate, job_type, session, request_info, priority, SSLConfig(),
- SSLConfig(), destination, origin_url, enable_ip_based_pooling, nullptr);
+ delegate, job_type, session, request_info, priority, proxy_info,
+ SSLConfig(), SSLConfig(), destination, origin_url,
+ enable_ip_based_pooling, nullptr);
return main_job_;
}
-HttpStreamFactoryImpl::Job* TestJobFactory::CreateJob(
+HttpStreamFactoryImpl::Job* TestJobFactory::CreateAltSvcJob(
HttpStreamFactoryImpl::Job::Delegate* delegate,
HttpStreamFactoryImpl::JobType job_type,
HttpNetworkSession* session,
const HttpRequestInfo& request_info,
RequestPriority priority,
+ const ProxyInfo& proxy_info,
const SSLConfig& server_ssl_config,
const SSLConfig& proxy_ssl_config,
HostPortPair destination,
@@ -113,21 +118,21 @@ HttpStreamFactoryImpl::Job* TestJobFactory::CreateJob(
AlternativeService alternative_service,
bool enable_ip_based_pooling,
NetLog* net_log) {
- DCHECK(!alternative_job_);
alternative_job_ = new MockHttpStreamFactoryImplJob(
- delegate, job_type, session, request_info, priority, SSLConfig(),
- SSLConfig(), destination, origin_url, alternative_service, ProxyServer(),
- enable_ip_based_pooling, nullptr);
+ delegate, job_type, session, request_info, priority, proxy_info,
+ SSLConfig(), SSLConfig(), destination, origin_url, alternative_service,
+ ProxyServer(), enable_ip_based_pooling, nullptr);
return alternative_job_;
}
-HttpStreamFactoryImpl::Job* TestJobFactory::CreateJob(
+HttpStreamFactoryImpl::Job* TestJobFactory::CreateAltProxyJob(
HttpStreamFactoryImpl::Job::Delegate* delegate,
HttpStreamFactoryImpl::JobType job_type,
HttpNetworkSession* session,
const HttpRequestInfo& request_info,
RequestPriority priority,
+ const ProxyInfo& proxy_info,
const SSLConfig& server_ssl_config,
const SSLConfig& proxy_ssl_config,
HostPortPair destination,
@@ -135,10 +140,9 @@ HttpStreamFactoryImpl::Job* TestJobFactory::CreateJob(
const ProxyServer& alternative_proxy_server,
bool enable_ip_based_pooling,
NetLog* net_log) {
- DCHECK(!alternative_job_);
alternative_job_ = new MockHttpStreamFactoryImplJob(
- delegate, job_type, session, request_info, priority, SSLConfig(),
- SSLConfig(), destination, origin_url, AlternativeService(),
+ delegate, job_type, session, request_info, priority, proxy_info,
+ SSLConfig(), SSLConfig(), destination, origin_url, AlternativeService(),
alternative_proxy_server, enable_ip_based_pooling, nullptr);
return alternative_job_;
« no previous file with comments | « net/http/http_stream_factory_test_util.h ('k') | net/spdy/chromium/spdy_test_util_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698