OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 direct_tcp_socket_params_(new TCPSocketParams( | 47 direct_tcp_socket_params_(new TCPSocketParams( |
48 HostPortPair("host", 443), MEDIUM, GURL(), false)), | 48 HostPortPair("host", 443), MEDIUM, GURL(), false)), |
49 tcp_socket_pool_(new MockTCPClientSocketPool( | 49 tcp_socket_pool_(new MockTCPClientSocketPool( |
50 kMaxSockets, | 50 kMaxSockets, |
51 kMaxSocketsPerGroup, | 51 kMaxSocketsPerGroup, |
52 make_scoped_refptr(new ClientSocketPoolHistograms("MockTCP")), | 52 make_scoped_refptr(new ClientSocketPoolHistograms("MockTCP")), |
53 &socket_factory_)), | 53 &socket_factory_)), |
54 proxy_tcp_socket_params_(new TCPSocketParams( | 54 proxy_tcp_socket_params_(new TCPSocketParams( |
55 HostPortPair("proxy", 443), MEDIUM, GURL(), false)), | 55 HostPortPair("proxy", 443), MEDIUM, GURL(), false)), |
56 http_proxy_socket_params_(new HttpProxySocketParams( | 56 http_proxy_socket_params_(new HttpProxySocketParams( |
57 proxy_tcp_socket_params_, GURL("http://host"), "", | 57 proxy_tcp_socket_params_, NULL, GURL("http://host"), "", |
58 HostPortPair("host", 80), session_, true)), | 58 HostPortPair("host", 80), session_, true)), |
59 http_proxy_socket_pool_(new HttpProxyClientSocketPool( | 59 http_proxy_socket_pool_(new HttpProxyClientSocketPool( |
60 kMaxSockets, | 60 kMaxSockets, |
61 kMaxSocketsPerGroup, | 61 kMaxSocketsPerGroup, |
62 make_scoped_refptr(new ClientSocketPoolHistograms("MockHttpProxy")), | 62 make_scoped_refptr(new ClientSocketPoolHistograms("MockHttpProxy")), |
63 new MockHostResolver, | 63 new MockHostResolver, |
64 tcp_socket_pool_, | 64 tcp_socket_pool_, |
| 65 NULL, |
65 NULL)), | 66 NULL)), |
66 socks_socket_params_(new SOCKSSocketParams( | 67 socks_socket_params_(new SOCKSSocketParams( |
67 proxy_tcp_socket_params_, true, HostPortPair("sockshost", 443), | 68 proxy_tcp_socket_params_, true, HostPortPair("sockshost", 443), |
68 MEDIUM, GURL())), | 69 MEDIUM, GURL())), |
69 socks_socket_pool_(new MockSOCKSClientSocketPool( | 70 socks_socket_pool_(new MockSOCKSClientSocketPool( |
70 kMaxSockets, | 71 kMaxSockets, |
71 kMaxSocketsPerGroup, | 72 kMaxSocketsPerGroup, |
72 make_scoped_refptr(new ClientSocketPoolHistograms("MockSOCKS")), | 73 make_scoped_refptr(new ClientSocketPoolHistograms("MockSOCKS")), |
73 tcp_socket_pool_)) { | 74 tcp_socket_pool_)) { |
74 scoped_refptr<SSLConfigService> ssl_config_service( | 75 scoped_refptr<SSLConfigService> ssl_config_service( |
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
590 handle.release_pending_http_proxy_connection()); | 591 handle.release_pending_http_proxy_connection()); |
591 EXPECT_TRUE(tunnel_handle->socket()); | 592 EXPECT_TRUE(tunnel_handle->socket()); |
592 EXPECT_FALSE(tunnel_handle->socket()->IsConnected()); | 593 EXPECT_FALSE(tunnel_handle->socket()->IsConnected()); |
593 } | 594 } |
594 | 595 |
595 // It would be nice to also test the timeouts in SSLClientSocketPool. | 596 // It would be nice to also test the timeouts in SSLClientSocketPool. |
596 | 597 |
597 } // namespace | 598 } // namespace |
598 | 599 |
599 } // namespace net | 600 } // namespace net |
OLD | NEW |