| 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 #ifndef NET_HTTP_HTTP_STREAM_FACTORY_TEST_UTIL_H_ | 5 #ifndef NET_HTTP_HTTP_STREAM_FACTORY_TEST_UTIL_H_ |
| 6 #define NET_HTTP_HTTP_STREAM_FACTORY_TEST_UTIL_H_ | 6 #define NET_HTTP_HTTP_STREAM_FACTORY_TEST_UTIL_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 const HttpRequestInfo& request_info, | 101 const HttpRequestInfo& request_info, |
| 102 RequestPriority priority, | 102 RequestPriority priority, |
| 103 ProxyInfo proxy_info, | 103 ProxyInfo proxy_info, |
| 104 const SSLConfig& server_ssl_config, | 104 const SSLConfig& server_ssl_config, |
| 105 const SSLConfig& proxy_ssl_config, | 105 const SSLConfig& proxy_ssl_config, |
| 106 HostPortPair destination, | 106 HostPortPair destination, |
| 107 GURL origin_url, | 107 GURL origin_url, |
| 108 bool enable_ip_based_pooling, | 108 bool enable_ip_based_pooling, |
| 109 NetLog* net_log); | 109 NetLog* net_log); |
| 110 | 110 |
| 111 MockHttpStreamFactoryImplJob(HttpStreamFactoryImpl::Job::Delegate* delegate, | 111 MockHttpStreamFactoryImplJob( |
| 112 HttpStreamFactoryImpl::JobType job_type, | 112 HttpStreamFactoryImpl::Job::Delegate* delegate, |
| 113 HttpNetworkSession* session, | 113 HttpStreamFactoryImpl::JobType job_type, |
| 114 const HttpRequestInfo& request_info, | 114 HttpNetworkSession* session, |
| 115 RequestPriority priority, | 115 const HttpRequestInfo& request_info, |
| 116 ProxyInfo proxy_info, | 116 RequestPriority priority, |
| 117 const SSLConfig& server_ssl_config, | 117 ProxyInfo proxy_info, |
| 118 const SSLConfig& proxy_ssl_config, | 118 const SSLConfig& server_ssl_config, |
| 119 HostPortPair destination, | 119 const SSLConfig& proxy_ssl_config, |
| 120 GURL origin_url, | 120 HostPortPair destination, |
| 121 AlternativeService alternative_service, | 121 GURL origin_url, |
| 122 const ProxyServer& alternative_proxy_server, | 122 const AlternativeServiceInfo& alternative_service_info, |
| 123 bool enable_ip_based_pooling, | 123 const ProxyServer& alternative_proxy_server, |
| 124 NetLog* net_log); | 124 bool enable_ip_based_pooling, |
| 125 NetLog* net_log); |
| 125 | 126 |
| 126 ~MockHttpStreamFactoryImplJob() override; | 127 ~MockHttpStreamFactoryImplJob() override; |
| 127 | 128 |
| 128 MOCK_METHOD0(Resume, void()); | 129 MOCK_METHOD0(Resume, void()); |
| 129 | 130 |
| 130 MOCK_METHOD0(Orphan, void()); | 131 MOCK_METHOD0(Orphan, void()); |
| 131 }; | 132 }; |
| 132 | 133 |
| 133 // JobFactory for creating MockHttpStreamFactoryImplJobs. | 134 // JobFactory for creating MockHttpStreamFactoryImplJobs. |
| 134 class TestJobFactory : public HttpStreamFactoryImpl::JobFactory { | 135 class TestJobFactory : public HttpStreamFactoryImpl::JobFactory { |
| (...skipping 19 matching lines...) Expand all Loading... |
| 154 HttpStreamFactoryImpl::Job::Delegate* delegate, | 155 HttpStreamFactoryImpl::Job::Delegate* delegate, |
| 155 HttpStreamFactoryImpl::JobType job_type, | 156 HttpStreamFactoryImpl::JobType job_type, |
| 156 HttpNetworkSession* session, | 157 HttpNetworkSession* session, |
| 157 const HttpRequestInfo& request_info, | 158 const HttpRequestInfo& request_info, |
| 158 RequestPriority priority, | 159 RequestPriority priority, |
| 159 const ProxyInfo& proxy_info, | 160 const ProxyInfo& proxy_info, |
| 160 const SSLConfig& server_ssl_config, | 161 const SSLConfig& server_ssl_config, |
| 161 const SSLConfig& proxy_ssl_config, | 162 const SSLConfig& proxy_ssl_config, |
| 162 HostPortPair destination, | 163 HostPortPair destination, |
| 163 GURL origin_url, | 164 GURL origin_url, |
| 164 AlternativeService alternative_service, | 165 const AlternativeServiceInfo& alternative_service_info, |
| 165 bool enable_ip_based_pooling, | 166 bool enable_ip_based_pooling, |
| 166 NetLog* net_log) override; | 167 NetLog* net_log) override; |
| 167 | 168 |
| 168 std::unique_ptr<HttpStreamFactoryImpl::Job> CreateAltProxyJob( | 169 std::unique_ptr<HttpStreamFactoryImpl::Job> CreateAltProxyJob( |
| 169 HttpStreamFactoryImpl::Job::Delegate* delegate, | 170 HttpStreamFactoryImpl::Job::Delegate* delegate, |
| 170 HttpStreamFactoryImpl::JobType job_type, | 171 HttpStreamFactoryImpl::JobType job_type, |
| 171 HttpNetworkSession* session, | 172 HttpNetworkSession* session, |
| 172 const HttpRequestInfo& request_info, | 173 const HttpRequestInfo& request_info, |
| 173 RequestPriority priority, | 174 RequestPriority priority, |
| 174 const ProxyInfo& proxy_info, | 175 const ProxyInfo& proxy_info, |
| (...skipping 18 matching lines...) Expand all Loading... |
| 193 private: | 194 private: |
| 194 MockHttpStreamFactoryImplJob* main_job_; | 195 MockHttpStreamFactoryImplJob* main_job_; |
| 195 MockHttpStreamFactoryImplJob* alternative_job_; | 196 MockHttpStreamFactoryImplJob* alternative_job_; |
| 196 bool override_main_job_url_; | 197 bool override_main_job_url_; |
| 197 GURL main_job_alternative_url_; | 198 GURL main_job_alternative_url_; |
| 198 }; | 199 }; |
| 199 | 200 |
| 200 } // namespace net | 201 } // namespace net |
| 201 | 202 |
| 202 #endif // NET_HTTP_HTTP_STREAM_FACTORY_TEST_UTIL_H_ | 203 #endif // NET_HTTP_HTTP_STREAM_FACTORY_TEST_UTIL_H_ |
| OLD | NEW |