| OLD | NEW |
| 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "net/http/http_stream_factory_test_util.h" | 5 #include "net/http/http_stream_factory_test_util.h" |
| 6 | 6 |
| 7 #include "net/proxy/proxy_info.h" | 7 #include "net/proxy/proxy_info.h" |
| 8 | 8 |
| 9 using ::testing::_; | 9 using ::testing::_; |
| 10 | 10 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 HttpStreamFactoryImpl::Job::Delegate* delegate, | 39 HttpStreamFactoryImpl::Job::Delegate* delegate, |
| 40 HttpStreamFactoryImpl::JobType job_type, | 40 HttpStreamFactoryImpl::JobType job_type, |
| 41 HttpNetworkSession* session, | 41 HttpNetworkSession* session, |
| 42 const HttpRequestInfo& request_info, | 42 const HttpRequestInfo& request_info, |
| 43 RequestPriority priority, | 43 RequestPriority priority, |
| 44 const SSLConfig& server_ssl_config, | 44 const SSLConfig& server_ssl_config, |
| 45 const SSLConfig& proxy_ssl_config, | 45 const SSLConfig& proxy_ssl_config, |
| 46 HostPortPair destination, | 46 HostPortPair destination, |
| 47 GURL origin_url, | 47 GURL origin_url, |
| 48 AlternativeService alternative_service, | 48 AlternativeService alternative_service, |
| 49 const ProxyServer& alternative_proxy_server, |
| 49 NetLog* net_log) | 50 NetLog* net_log) |
| 50 : HttpStreamFactoryImpl::Job(delegate, | 51 : HttpStreamFactoryImpl::Job(delegate, |
| 51 job_type, | 52 job_type, |
| 52 session, | 53 session, |
| 53 request_info, | 54 request_info, |
| 54 priority, | 55 priority, |
| 55 server_ssl_config, | 56 server_ssl_config, |
| 56 proxy_ssl_config, | 57 proxy_ssl_config, |
| 57 destination, | 58 destination, |
| 58 origin_url, | 59 origin_url, |
| 59 alternative_service, | 60 alternative_service, |
| 61 alternative_proxy_server, |
| 60 net_log) {} | 62 net_log) {} |
| 61 | 63 |
| 62 MockHttpStreamFactoryImplJob::~MockHttpStreamFactoryImplJob() {} | 64 MockHttpStreamFactoryImplJob::~MockHttpStreamFactoryImplJob() {} |
| 63 | 65 |
| 64 TestJobFactory::TestJobFactory() | 66 TestJobFactory::TestJobFactory() |
| 65 : main_job_(nullptr), | 67 : main_job_(nullptr), |
| 66 alternative_job_(nullptr), | 68 alternative_job_(nullptr), |
| 67 override_main_job_url_(false) {} | 69 override_main_job_url_(false) {} |
| 68 | 70 |
| 69 TestJobFactory::~TestJobFactory() {} | 71 TestJobFactory::~TestJobFactory() {} |
| (...skipping 29 matching lines...) Expand all Loading... |
| 99 RequestPriority priority, | 101 RequestPriority priority, |
| 100 const SSLConfig& server_ssl_config, | 102 const SSLConfig& server_ssl_config, |
| 101 const SSLConfig& proxy_ssl_config, | 103 const SSLConfig& proxy_ssl_config, |
| 102 HostPortPair destination, | 104 HostPortPair destination, |
| 103 GURL origin_url, | 105 GURL origin_url, |
| 104 AlternativeService alternative_service, | 106 AlternativeService alternative_service, |
| 105 NetLog* net_log) { | 107 NetLog* net_log) { |
| 106 DCHECK(!alternative_job_); | 108 DCHECK(!alternative_job_); |
| 107 alternative_job_ = new MockHttpStreamFactoryImplJob( | 109 alternative_job_ = new MockHttpStreamFactoryImplJob( |
| 108 delegate, job_type, session, request_info, priority, SSLConfig(), | 110 delegate, job_type, session, request_info, priority, SSLConfig(), |
| 109 SSLConfig(), destination, origin_url, alternative_service, nullptr); | 111 SSLConfig(), destination, origin_url, alternative_service, ProxyServer(), |
| 112 nullptr); |
| 110 | 113 |
| 111 return alternative_job_; | 114 return alternative_job_; |
| 112 } | 115 } |
| 116 |
| 117 HttpStreamFactoryImpl::Job* TestJobFactory::CreateJob( |
| 118 HttpStreamFactoryImpl::Job::Delegate* delegate, |
| 119 HttpStreamFactoryImpl::JobType job_type, |
| 120 HttpNetworkSession* session, |
| 121 const HttpRequestInfo& request_info, |
| 122 RequestPriority priority, |
| 123 const SSLConfig& server_ssl_config, |
| 124 const SSLConfig& proxy_ssl_config, |
| 125 HostPortPair destination, |
| 126 GURL origin_url, |
| 127 const ProxyServer& alternative_proxy_server, |
| 128 NetLog* net_log) { |
| 129 DCHECK(!alternative_job_); |
| 130 alternative_job_ = new MockHttpStreamFactoryImplJob( |
| 131 delegate, job_type, session, request_info, priority, SSLConfig(), |
| 132 SSLConfig(), destination, origin_url, AlternativeService(), |
| 133 alternative_proxy_server, nullptr); |
| 134 |
| 135 return alternative_job_; |
| 136 } |
| 113 | 137 |
| 114 } // namespace net | 138 } // namespace net |
| OLD | NEW |