| 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" |
| 16 #include "net/base/net_api.h" | 16 #include "net/base/net_export.h" |
| 17 #include "net/http/http_auth.h" | 17 #include "net/http/http_auth.h" |
| 18 #include "net/http/http_response_info.h" | 18 #include "net/http/http_response_info.h" |
| 19 #include "net/http/proxy_client_socket.h" | 19 #include "net/http/proxy_client_socket.h" |
| 20 #include "net/socket/client_socket_pool_base.h" | 20 #include "net/socket/client_socket_pool_base.h" |
| 21 #include "net/socket/client_socket_pool_histograms.h" | 21 #include "net/socket/client_socket_pool_histograms.h" |
| 22 #include "net/socket/client_socket_pool.h" | 22 #include "net/socket/client_socket_pool.h" |
| 23 | 23 |
| 24 namespace net { | 24 namespace net { |
| 25 | 25 |
| 26 class HostResolver; | 26 class HostResolver; |
| 27 class HttpAuthCache; | 27 class HttpAuthCache; |
| 28 class HttpAuthHandlerFactory; | 28 class HttpAuthHandlerFactory; |
| 29 class SSLClientSocketPool; | 29 class SSLClientSocketPool; |
| 30 class SSLSocketParams; | 30 class SSLSocketParams; |
| 31 class SpdySessionPool; | 31 class SpdySessionPool; |
| 32 class SpdyStream; | 32 class SpdyStream; |
| 33 class TransportClientSocketPool; | 33 class TransportClientSocketPool; |
| 34 class TransportSocketParams; | 34 class TransportSocketParams; |
| 35 | 35 |
| 36 // HttpProxySocketParams only needs the socket params for one of the proxy | 36 // HttpProxySocketParams only needs the socket params for one of the proxy |
| 37 // types. The other param must be NULL. When using an HTTP Proxy, | 37 // types. The other param must be NULL. When using an HTTP Proxy, |
| 38 // |transport_params| must be set. When using an HTTPS Proxy, |ssl_params| | 38 // |transport_params| must be set. When using an HTTPS Proxy, |ssl_params| |
| 39 // must be set. | 39 // must be set. |
| 40 class NET_TEST HttpProxySocketParams | 40 class NET_EXPORT_PRIVATE HttpProxySocketParams |
| 41 : public base::RefCounted<HttpProxySocketParams> { | 41 : public base::RefCounted<HttpProxySocketParams> { |
| 42 public: | 42 public: |
| 43 HttpProxySocketParams( | 43 HttpProxySocketParams( |
| 44 const scoped_refptr<TransportSocketParams>& transport_params, | 44 const scoped_refptr<TransportSocketParams>& transport_params, |
| 45 const scoped_refptr<SSLSocketParams>& ssl_params, | 45 const scoped_refptr<SSLSocketParams>& ssl_params, |
| 46 const GURL& request_url, | 46 const GURL& request_url, |
| 47 const std::string& user_agent, | 47 const std::string& user_agent, |
| 48 HostPortPair endpoint, | 48 HostPortPair endpoint, |
| 49 HttpAuthCache* http_auth_cache, | 49 HttpAuthCache* http_auth_cache, |
| 50 HttpAuthHandlerFactory* http_auth_handler_factory, | 50 HttpAuthHandlerFactory* http_auth_handler_factory, |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 scoped_ptr<ProxyClientSocket> transport_socket_; | 160 scoped_ptr<ProxyClientSocket> transport_socket_; |
| 161 bool using_spdy_; | 161 bool using_spdy_; |
| 162 | 162 |
| 163 HttpResponseInfo error_response_info_; | 163 HttpResponseInfo error_response_info_; |
| 164 | 164 |
| 165 scoped_refptr<SpdyStream> spdy_stream_; | 165 scoped_refptr<SpdyStream> spdy_stream_; |
| 166 | 166 |
| 167 DISALLOW_COPY_AND_ASSIGN(HttpProxyConnectJob); | 167 DISALLOW_COPY_AND_ASSIGN(HttpProxyConnectJob); |
| 168 }; | 168 }; |
| 169 | 169 |
| 170 class NET_TEST HttpProxyClientSocketPool : public ClientSocketPool { | 170 class NET_EXPORT_PRIVATE HttpProxyClientSocketPool : public ClientSocketPool { |
| 171 public: | 171 public: |
| 172 HttpProxyClientSocketPool( | 172 HttpProxyClientSocketPool( |
| 173 int max_sockets, | 173 int max_sockets, |
| 174 int max_sockets_per_group, | 174 int max_sockets_per_group, |
| 175 ClientSocketPoolHistograms* histograms, | 175 ClientSocketPoolHistograms* histograms, |
| 176 HostResolver* host_resolver, | 176 HostResolver* host_resolver, |
| 177 TransportClientSocketPool* transport_pool, | 177 TransportClientSocketPool* transport_pool, |
| 178 SSLClientSocketPool* ssl_pool, | 178 SSLClientSocketPool* ssl_pool, |
| 179 NetLog* net_log); | 179 NetLog* net_log); |
| 180 | 180 |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 | 254 |
| 255 DISALLOW_COPY_AND_ASSIGN(HttpProxyClientSocketPool); | 255 DISALLOW_COPY_AND_ASSIGN(HttpProxyClientSocketPool); |
| 256 }; | 256 }; |
| 257 | 257 |
| 258 REGISTER_SOCKET_PARAMS_FOR_POOL(HttpProxyClientSocketPool, | 258 REGISTER_SOCKET_PARAMS_FOR_POOL(HttpProxyClientSocketPool, |
| 259 HttpProxySocketParams); | 259 HttpProxySocketParams); |
| 260 | 260 |
| 261 } // namespace net | 261 } // namespace net |
| 262 | 262 |
| 263 #endif // NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_POOL_H_ | 263 #endif // NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_POOL_H_ |
| OLD | NEW |