OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_proxy_client_socket_pool.h" | 5 #include "net/http/http_proxy_client_socket_pool.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
11 #include "net/base/mock_host_resolver.h" | 11 #include "net/base/mock_host_resolver.h" |
| 12 #include "net/base/multi_threaded_cert_verifier.h" |
12 #include "net/base/net_errors.h" | 13 #include "net/base/net_errors.h" |
13 #include "net/base/ssl_config_service_defaults.h" | 14 #include "net/base/ssl_config_service_defaults.h" |
14 #include "net/base/test_completion_callback.h" | 15 #include "net/base/test_completion_callback.h" |
15 #include "net/http/http_auth_handler_factory.h" | 16 #include "net/http/http_auth_handler_factory.h" |
16 #include "net/http/http_network_session.h" | 17 #include "net/http/http_network_session.h" |
17 #include "net/http/http_proxy_client_socket.h" | 18 #include "net/http/http_proxy_client_socket.h" |
18 #include "net/http/http_server_properties_impl.h" | 19 #include "net/http/http_server_properties_impl.h" |
19 #include "net/proxy/proxy_service.h" | 20 #include "net/proxy/proxy_service.h" |
20 #include "net/socket/client_socket_handle.h" | 21 #include "net/socket/client_socket_handle.h" |
21 #include "net/socket/client_socket_pool_histograms.h" | 22 #include "net/socket/client_socket_pool_histograms.h" |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 private: | 195 private: |
195 SSLConfig ssl_config_; | 196 SSLConfig ssl_config_; |
196 | 197 |
197 scoped_refptr<TransportSocketParams> ignored_transport_socket_params_; | 198 scoped_refptr<TransportSocketParams> ignored_transport_socket_params_; |
198 scoped_refptr<SSLSocketParams> ignored_ssl_socket_params_; | 199 scoped_refptr<SSLSocketParams> ignored_ssl_socket_params_; |
199 ClientSocketPoolHistograms tcp_histograms_; | 200 ClientSocketPoolHistograms tcp_histograms_; |
200 DeterministicMockClientSocketFactory socket_factory_; | 201 DeterministicMockClientSocketFactory socket_factory_; |
201 MockTransportClientSocketPool transport_socket_pool_; | 202 MockTransportClientSocketPool transport_socket_pool_; |
202 ClientSocketPoolHistograms ssl_histograms_; | 203 ClientSocketPoolHistograms ssl_histograms_; |
203 MockHostResolver host_resolver_; | 204 MockHostResolver host_resolver_; |
204 CertVerifier cert_verifier_; | 205 MultiThreadedCertVerifier cert_verifier_; |
205 const scoped_ptr<ProxyService> proxy_service_; | 206 const scoped_ptr<ProxyService> proxy_service_; |
206 const scoped_refptr<SSLConfigService> ssl_config_service_; | 207 const scoped_refptr<SSLConfigService> ssl_config_service_; |
207 SSLClientSocketPool ssl_socket_pool_; | 208 SSLClientSocketPool ssl_socket_pool_; |
208 | 209 |
209 const scoped_ptr<HttpAuthHandlerFactory> http_auth_handler_factory_; | 210 const scoped_ptr<HttpAuthHandlerFactory> http_auth_handler_factory_; |
210 HttpServerPropertiesImpl http_server_properties_; | 211 HttpServerPropertiesImpl http_server_properties_; |
211 const scoped_refptr<HttpNetworkSession> session_; | 212 const scoped_refptr<HttpNetworkSession> session_; |
212 ClientSocketPoolHistograms http_proxy_histograms_; | 213 ClientSocketPoolHistograms http_proxy_histograms_; |
213 | 214 |
214 protected: | 215 protected: |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
533 // HTTPS or SPDY Proxy CONNECT responses are trustworthy | 534 // HTTPS or SPDY Proxy CONNECT responses are trustworthy |
534 EXPECT_EQ(ERR_HTTPS_PROXY_TUNNEL_RESPONSE, rv); | 535 EXPECT_EQ(ERR_HTTPS_PROXY_TUNNEL_RESPONSE, rv); |
535 EXPECT_TRUE(handle_.is_initialized()); | 536 EXPECT_TRUE(handle_.is_initialized()); |
536 EXPECT_TRUE(handle_.socket()); | 537 EXPECT_TRUE(handle_.socket()); |
537 } | 538 } |
538 } | 539 } |
539 | 540 |
540 // It would be nice to also test the timeouts in HttpProxyClientSocketPool. | 541 // It would be nice to also test the timeouts in HttpProxyClientSocketPool. |
541 | 542 |
542 } // namespace net | 543 } // namespace net |
OLD | NEW |