OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/time.h" | 10 #include "base/time.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 | 40 |
41 class SSLClientSocketPoolTest : public testing::Test { | 41 class SSLClientSocketPoolTest : public testing::Test { |
42 protected: | 42 protected: |
43 SSLClientSocketPoolTest() | 43 SSLClientSocketPoolTest() |
44 : proxy_service_(ProxyService::CreateDirect()), | 44 : proxy_service_(ProxyService::CreateDirect()), |
45 ssl_config_service_(new SSLConfigServiceDefaults), | 45 ssl_config_service_(new SSLConfigServiceDefaults), |
46 http_auth_handler_factory_(HttpAuthHandlerFactory::CreateDefault( | 46 http_auth_handler_factory_(HttpAuthHandlerFactory::CreateDefault( |
47 &host_resolver_)), | 47 &host_resolver_)), |
48 session_(CreateNetworkSession()), | 48 session_(CreateNetworkSession()), |
49 direct_transport_socket_params_(new TransportSocketParams( | 49 direct_transport_socket_params_(new TransportSocketParams( |
50 HostPortPair("host", 443), MEDIUM, GURL(), false, false)), | 50 HostPortPair("host", 443), MEDIUM, false, false)), |
51 transport_histograms_("MockTCP"), | 51 transport_histograms_("MockTCP"), |
52 transport_socket_pool_( | 52 transport_socket_pool_( |
53 kMaxSockets, | 53 kMaxSockets, |
54 kMaxSocketsPerGroup, | 54 kMaxSocketsPerGroup, |
55 &transport_histograms_, | 55 &transport_histograms_, |
56 &socket_factory_), | 56 &socket_factory_), |
57 proxy_transport_socket_params_(new TransportSocketParams( | 57 proxy_transport_socket_params_(new TransportSocketParams( |
58 HostPortPair("proxy", 443), MEDIUM, GURL(), false, false)), | 58 HostPortPair("proxy", 443), MEDIUM, false, false)), |
59 socks_socket_params_(new SOCKSSocketParams( | 59 socks_socket_params_(new SOCKSSocketParams( |
60 proxy_transport_socket_params_, true, | 60 proxy_transport_socket_params_, true, |
61 HostPortPair("sockshost", 443), MEDIUM, GURL())), | 61 HostPortPair("sockshost", 443), MEDIUM)), |
62 socks_histograms_("MockSOCKS"), | 62 socks_histograms_("MockSOCKS"), |
63 socks_socket_pool_( | 63 socks_socket_pool_( |
64 kMaxSockets, | 64 kMaxSockets, |
65 kMaxSocketsPerGroup, | 65 kMaxSocketsPerGroup, |
66 &socks_histograms_, | 66 &socks_histograms_, |
67 &transport_socket_pool_), | 67 &transport_socket_pool_), |
68 http_proxy_socket_params_(new HttpProxySocketParams( | 68 http_proxy_socket_params_(new HttpProxySocketParams( |
69 proxy_transport_socket_params_, NULL, GURL("http://host"), "", | 69 proxy_transport_socket_params_, NULL, GURL("http://host"), "", |
70 HostPortPair("host", 80), | 70 HostPortPair("host", 80), |
71 session_->http_auth_cache(), | 71 session_->http_auth_cache(), |
(...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
820 EXPECT_FALSE(session_->spdy_session_pool()->HasSession(test_hosts[1].pair)); | 820 EXPECT_FALSE(session_->spdy_session_pool()->HasSession(test_hosts[1].pair)); |
821 | 821 |
822 session_->spdy_session_pool()->CloseAllSessions(); | 822 session_->spdy_session_pool()->CloseAllSessions(); |
823 } | 823 } |
824 | 824 |
825 // It would be nice to also test the timeouts in SSLClientSocketPool. | 825 // It would be nice to also test the timeouts in SSLClientSocketPool. |
826 | 826 |
827 } // namespace | 827 } // namespace |
828 | 828 |
829 } // namespace net | 829 } // namespace net |
OLD | NEW |