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 #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 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 // HttpProxySocketParams only needs the socket params for one of the proxy | 37 // HttpProxySocketParams only needs the socket params for one of the proxy |
38 // types. The other param must be NULL. When using an HTTP Proxy, | 38 // types. The other param must be NULL. When using an HTTP Proxy, |
39 // |transport_params| must be set. When using an HTTPS Proxy, |ssl_params| | 39 // |transport_params| must be set. When using an HTTPS Proxy, |ssl_params| |
40 // must be set. | 40 // must be set. |
41 class NET_EXPORT_PRIVATE HttpProxySocketParams | 41 class NET_EXPORT_PRIVATE HttpProxySocketParams |
42 : public base::RefCounted<HttpProxySocketParams> { | 42 : public base::RefCounted<HttpProxySocketParams> { |
43 public: | 43 public: |
44 HttpProxySocketParams( | 44 HttpProxySocketParams( |
45 const scoped_refptr<TransportSocketParams>& transport_params, | 45 const scoped_refptr<TransportSocketParams>& transport_params, |
46 const scoped_refptr<SSLSocketParams>& ssl_params, | 46 const scoped_refptr<SSLSocketParams>& ssl_params, |
47 const GURL& request_url, | |
48 const std::string& user_agent, | 47 const std::string& user_agent, |
49 const HostPortPair& endpoint, | 48 const HostPortPair& endpoint, |
50 HttpAuthCache* http_auth_cache, | 49 HttpAuthCache* http_auth_cache, |
51 HttpAuthHandlerFactory* http_auth_handler_factory, | 50 HttpAuthHandlerFactory* http_auth_handler_factory, |
52 SpdySessionPool* spdy_session_pool, | 51 SpdySessionPool* spdy_session_pool, |
53 bool tunnel, | 52 bool tunnel, |
54 ProxyDelegate* proxy_delegate); | 53 ProxyDelegate* proxy_delegate); |
55 | 54 |
56 const scoped_refptr<TransportSocketParams>& transport_params() const { | 55 const scoped_refptr<TransportSocketParams>& transport_params() const { |
57 return transport_params_; | 56 return transport_params_; |
58 } | 57 } |
59 const scoped_refptr<SSLSocketParams>& ssl_params() const { | 58 const scoped_refptr<SSLSocketParams>& ssl_params() const { |
60 return ssl_params_; | 59 return ssl_params_; |
61 } | 60 } |
62 const GURL& request_url() const { return request_url_; } | |
63 const std::string& user_agent() const { return user_agent_; } | 61 const std::string& user_agent() const { return user_agent_; } |
64 const HostPortPair& endpoint() const { return endpoint_; } | 62 const HostPortPair& endpoint() const { return endpoint_; } |
65 HttpAuthCache* http_auth_cache() const { return http_auth_cache_; } | 63 HttpAuthCache* http_auth_cache() const { return http_auth_cache_; } |
66 HttpAuthHandlerFactory* http_auth_handler_factory() const { | 64 HttpAuthHandlerFactory* http_auth_handler_factory() const { |
67 return http_auth_handler_factory_; | 65 return http_auth_handler_factory_; |
68 } | 66 } |
69 SpdySessionPool* spdy_session_pool() { | 67 SpdySessionPool* spdy_session_pool() { |
70 return spdy_session_pool_; | 68 return spdy_session_pool_; |
71 } | 69 } |
72 const HostResolver::RequestInfo& destination() const; | 70 const HostResolver::RequestInfo& destination() const; |
73 bool tunnel() const { return tunnel_; } | 71 bool tunnel() const { return tunnel_; } |
74 bool ignore_limits() const { return ignore_limits_; } | 72 bool ignore_limits() const { return ignore_limits_; } |
75 | 73 |
76 ProxyDelegate* proxy_delegate() const { | 74 ProxyDelegate* proxy_delegate() const { |
77 return proxy_delegate_; | 75 return proxy_delegate_; |
78 } | 76 } |
79 | 77 |
80 private: | 78 private: |
81 friend class base::RefCounted<HttpProxySocketParams>; | 79 friend class base::RefCounted<HttpProxySocketParams>; |
82 ~HttpProxySocketParams(); | 80 ~HttpProxySocketParams(); |
83 | 81 |
84 const scoped_refptr<TransportSocketParams> transport_params_; | 82 const scoped_refptr<TransportSocketParams> transport_params_; |
85 const scoped_refptr<SSLSocketParams> ssl_params_; | 83 const scoped_refptr<SSLSocketParams> ssl_params_; |
86 SpdySessionPool* spdy_session_pool_; | 84 SpdySessionPool* spdy_session_pool_; |
87 const GURL request_url_; | |
88 const std::string user_agent_; | 85 const std::string user_agent_; |
89 const HostPortPair endpoint_; | 86 const HostPortPair endpoint_; |
90 HttpAuthCache* const http_auth_cache_; | 87 HttpAuthCache* const http_auth_cache_; |
91 HttpAuthHandlerFactory* const http_auth_handler_factory_; | 88 HttpAuthHandlerFactory* const http_auth_handler_factory_; |
92 const bool tunnel_; | 89 const bool tunnel_; |
93 bool ignore_limits_; | 90 bool ignore_limits_; |
94 ProxyDelegate* proxy_delegate_; | 91 ProxyDelegate* proxy_delegate_; |
95 | 92 |
96 DISALLOW_COPY_AND_ASSIGN(HttpProxySocketParams); | 93 DISALLOW_COPY_AND_ASSIGN(HttpProxySocketParams); |
97 }; | 94 }; |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 TransportClientSocketPool* const transport_pool_; | 267 TransportClientSocketPool* const transport_pool_; |
271 SSLClientSocketPool* const ssl_pool_; | 268 SSLClientSocketPool* const ssl_pool_; |
272 PoolBase base_; | 269 PoolBase base_; |
273 | 270 |
274 DISALLOW_COPY_AND_ASSIGN(HttpProxyClientSocketPool); | 271 DISALLOW_COPY_AND_ASSIGN(HttpProxyClientSocketPool); |
275 }; | 272 }; |
276 | 273 |
277 } // namespace net | 274 } // namespace net |
278 | 275 |
279 #endif // NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_POOL_H_ | 276 #endif // NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_POOL_H_ |
OLD | NEW |