| 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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 | 129 |
| 130 MOCK_METHOD0(Orphan, void()); | 130 MOCK_METHOD0(Orphan, void()); |
| 131 }; | 131 }; |
| 132 | 132 |
| 133 // JobFactory for creating MockHttpStreamFactoryImplJobs. | 133 // JobFactory for creating MockHttpStreamFactoryImplJobs. |
| 134 class TestJobFactory : public HttpStreamFactoryImpl::JobFactory { | 134 class TestJobFactory : public HttpStreamFactoryImpl::JobFactory { |
| 135 public: | 135 public: |
| 136 TestJobFactory(); | 136 TestJobFactory(); |
| 137 ~TestJobFactory() override; | 137 ~TestJobFactory() override; |
| 138 | 138 |
| 139 HttpStreamFactoryImpl::Job* CreateMainJob( | 139 std::unique_ptr<HttpStreamFactoryImpl::Job> CreateMainJob( |
| 140 HttpStreamFactoryImpl::Job::Delegate* delegate, | 140 HttpStreamFactoryImpl::Job::Delegate* delegate, |
| 141 HttpStreamFactoryImpl::JobType job_type, | 141 HttpStreamFactoryImpl::JobType job_type, |
| 142 HttpNetworkSession* session, | 142 HttpNetworkSession* session, |
| 143 const HttpRequestInfo& request_info, | 143 const HttpRequestInfo& request_info, |
| 144 RequestPriority priority, | 144 RequestPriority priority, |
| 145 const ProxyInfo& proxy_info, | 145 const ProxyInfo& proxy_info, |
| 146 const SSLConfig& server_ssl_config, | 146 const SSLConfig& server_ssl_config, |
| 147 const SSLConfig& proxy_ssl_config, | 147 const SSLConfig& proxy_ssl_config, |
| 148 HostPortPair destination, | 148 HostPortPair destination, |
| 149 GURL origin_url, | 149 GURL origin_url, |
| 150 bool enable_ip_based_pooling, | 150 bool enable_ip_based_pooling, |
| 151 NetLog* net_log) override; | 151 NetLog* net_log) override; |
| 152 | 152 |
| 153 HttpStreamFactoryImpl::Job* CreateAltSvcJob( | 153 std::unique_ptr<HttpStreamFactoryImpl::Job> CreateAltSvcJob( |
| 154 HttpStreamFactoryImpl::Job::Delegate* delegate, | 154 HttpStreamFactoryImpl::Job::Delegate* delegate, |
| 155 HttpStreamFactoryImpl::JobType job_type, | 155 HttpStreamFactoryImpl::JobType job_type, |
| 156 HttpNetworkSession* session, | 156 HttpNetworkSession* session, |
| 157 const HttpRequestInfo& request_info, | 157 const HttpRequestInfo& request_info, |
| 158 RequestPriority priority, | 158 RequestPriority priority, |
| 159 const ProxyInfo& proxy_info, | 159 const ProxyInfo& proxy_info, |
| 160 const SSLConfig& server_ssl_config, | 160 const SSLConfig& server_ssl_config, |
| 161 const SSLConfig& proxy_ssl_config, | 161 const SSLConfig& proxy_ssl_config, |
| 162 HostPortPair destination, | 162 HostPortPair destination, |
| 163 GURL origin_url, | 163 GURL origin_url, |
| 164 AlternativeService alternative_service, | 164 AlternativeService alternative_service, |
| 165 bool enable_ip_based_pooling, | 165 bool enable_ip_based_pooling, |
| 166 NetLog* net_log) override; | 166 NetLog* net_log) override; |
| 167 | 167 |
| 168 HttpStreamFactoryImpl::Job* CreateAltProxyJob( | 168 std::unique_ptr<HttpStreamFactoryImpl::Job> CreateAltProxyJob( |
| 169 HttpStreamFactoryImpl::Job::Delegate* delegate, | 169 HttpStreamFactoryImpl::Job::Delegate* delegate, |
| 170 HttpStreamFactoryImpl::JobType job_type, | 170 HttpStreamFactoryImpl::JobType job_type, |
| 171 HttpNetworkSession* session, | 171 HttpNetworkSession* session, |
| 172 const HttpRequestInfo& request_info, | 172 const HttpRequestInfo& request_info, |
| 173 RequestPriority priority, | 173 RequestPriority priority, |
| 174 const ProxyInfo& proxy_info, | 174 const ProxyInfo& proxy_info, |
| 175 const SSLConfig& server_ssl_config, | 175 const SSLConfig& server_ssl_config, |
| 176 const SSLConfig& proxy_ssl_config, | 176 const SSLConfig& proxy_ssl_config, |
| 177 HostPortPair destination, | 177 HostPortPair destination, |
| 178 GURL origin_url, | 178 GURL origin_url, |
| (...skipping 14 matching lines...) Expand all Loading... |
| 193 private: | 193 private: |
| 194 MockHttpStreamFactoryImplJob* main_job_; | 194 MockHttpStreamFactoryImplJob* main_job_; |
| 195 MockHttpStreamFactoryImplJob* alternative_job_; | 195 MockHttpStreamFactoryImplJob* alternative_job_; |
| 196 bool override_main_job_url_; | 196 bool override_main_job_url_; |
| 197 GURL main_job_alternative_url_; | 197 GURL main_job_alternative_url_; |
| 198 }; | 198 }; |
| 199 | 199 |
| 200 } // namespace net | 200 } // namespace net |
| 201 | 201 |
| 202 #endif // NET_HTTP_HTTP_STREAM_FACTORY_TEST_UTIL_H_ | 202 #endif // NET_HTTP_HTTP_STREAM_FACTORY_TEST_UTIL_H_ |
| OLD | NEW |