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 #ifndef NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_POOL_H_ | 5 #ifndef NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_POOL_H_ |
6 #define NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_POOL_H_ | 6 #define NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_POOL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/time.h" | 14 #include "base/time.h" |
15 #include "net/base/host_port_pair.h" | 15 #include "net/base/host_port_pair.h" |
wtc
2011/05/20 22:21:19
Should this file include net_api.h?
rvargas (doing something else)
2011/05/20 22:54:55
yes, fixed.
| |
16 #include "net/http/http_auth.h" | 16 #include "net/http/http_auth.h" |
17 #include "net/http/http_response_info.h" | 17 #include "net/http/http_response_info.h" |
18 #include "net/http/proxy_client_socket.h" | 18 #include "net/http/proxy_client_socket.h" |
19 #include "net/socket/client_socket_pool_base.h" | 19 #include "net/socket/client_socket_pool_base.h" |
20 #include "net/socket/client_socket_pool_histograms.h" | 20 #include "net/socket/client_socket_pool_histograms.h" |
21 #include "net/socket/client_socket_pool.h" | 21 #include "net/socket/client_socket_pool.h" |
22 | 22 |
23 namespace net { | 23 namespace net { |
24 | 24 |
25 class HostResolver; | 25 class HostResolver; |
26 class HttpAuthCache; | 26 class HttpAuthCache; |
27 class HttpAuthHandlerFactory; | 27 class HttpAuthHandlerFactory; |
28 class SSLClientSocketPool; | 28 class SSLClientSocketPool; |
29 class SSLSocketParams; | 29 class SSLSocketParams; |
30 class SpdySessionPool; | 30 class SpdySessionPool; |
31 class SpdyStream; | 31 class SpdyStream; |
32 class TransportClientSocketPool; | 32 class TransportClientSocketPool; |
33 class TransportSocketParams; | 33 class TransportSocketParams; |
34 | 34 |
35 // HttpProxySocketParams only needs the socket params for one of the proxy | 35 // HttpProxySocketParams only needs the socket params for one of the proxy |
36 // types. The other param must be NULL. When using an HTTP Proxy, | 36 // types. The other param must be NULL. When using an HTTP Proxy, |
37 // |transport_params| must be set. When using an HTTPS Proxy, |ssl_params| | 37 // |transport_params| must be set. When using an HTTPS Proxy, |ssl_params| |
38 // must be set. | 38 // must be set. |
39 class HttpProxySocketParams : public base::RefCounted<HttpProxySocketParams> { | 39 class NET_TEST HttpProxySocketParams |
40 : public base::RefCounted<HttpProxySocketParams> { | |
40 public: | 41 public: |
41 HttpProxySocketParams( | 42 HttpProxySocketParams( |
42 const scoped_refptr<TransportSocketParams>& transport_params, | 43 const scoped_refptr<TransportSocketParams>& transport_params, |
43 const scoped_refptr<SSLSocketParams>& ssl_params, | 44 const scoped_refptr<SSLSocketParams>& ssl_params, |
44 const GURL& request_url, | 45 const GURL& request_url, |
45 const std::string& user_agent, | 46 const std::string& user_agent, |
46 HostPortPair endpoint, | 47 HostPortPair endpoint, |
47 HttpAuthCache* http_auth_cache, | 48 HttpAuthCache* http_auth_cache, |
48 HttpAuthHandlerFactory* http_auth_handler_factory, | 49 HttpAuthHandlerFactory* http_auth_handler_factory, |
49 SpdySessionPool* spdy_session_pool, | 50 SpdySessionPool* spdy_session_pool, |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
158 scoped_ptr<ProxyClientSocket> transport_socket_; | 159 scoped_ptr<ProxyClientSocket> transport_socket_; |
159 bool using_spdy_; | 160 bool using_spdy_; |
160 | 161 |
161 HttpResponseInfo error_response_info_; | 162 HttpResponseInfo error_response_info_; |
162 | 163 |
163 scoped_refptr<SpdyStream> spdy_stream_; | 164 scoped_refptr<SpdyStream> spdy_stream_; |
164 | 165 |
165 DISALLOW_COPY_AND_ASSIGN(HttpProxyConnectJob); | 166 DISALLOW_COPY_AND_ASSIGN(HttpProxyConnectJob); |
166 }; | 167 }; |
167 | 168 |
168 class HttpProxyClientSocketPool : public ClientSocketPool { | 169 class NET_TEST HttpProxyClientSocketPool : public ClientSocketPool { |
169 public: | 170 public: |
170 HttpProxyClientSocketPool( | 171 HttpProxyClientSocketPool( |
171 int max_sockets, | 172 int max_sockets, |
172 int max_sockets_per_group, | 173 int max_sockets_per_group, |
173 ClientSocketPoolHistograms* histograms, | 174 ClientSocketPoolHistograms* histograms, |
174 HostResolver* host_resolver, | 175 HostResolver* host_resolver, |
175 TransportClientSocketPool* transport_pool, | 176 TransportClientSocketPool* transport_pool, |
176 SSLClientSocketPool* ssl_pool, | 177 SSLClientSocketPool* ssl_pool, |
177 NetLog* net_log); | 178 NetLog* net_log); |
178 | 179 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
251 | 252 |
252 DISALLOW_COPY_AND_ASSIGN(HttpProxyClientSocketPool); | 253 DISALLOW_COPY_AND_ASSIGN(HttpProxyClientSocketPool); |
253 }; | 254 }; |
254 | 255 |
255 REGISTER_SOCKET_PARAMS_FOR_POOL(HttpProxyClientSocketPool, | 256 REGISTER_SOCKET_PARAMS_FOR_POOL(HttpProxyClientSocketPool, |
256 HttpProxySocketParams); | 257 HttpProxySocketParams); |
257 | 258 |
258 } // namespace net | 259 } // namespace net |
259 | 260 |
260 #endif // NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_POOL_H_ | 261 #endif // NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_POOL_H_ |
OLD | NEW |