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/macros.h" | 10 #include "base/macros.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 const HostPortPair& endpoint() const { return endpoint_; } | 63 const HostPortPair& endpoint() const { return endpoint_; } |
64 HttpAuthCache* http_auth_cache() const { return http_auth_cache_; } | 64 HttpAuthCache* http_auth_cache() const { return http_auth_cache_; } |
65 HttpAuthHandlerFactory* http_auth_handler_factory() const { | 65 HttpAuthHandlerFactory* http_auth_handler_factory() const { |
66 return http_auth_handler_factory_; | 66 return http_auth_handler_factory_; |
67 } | 67 } |
68 SpdySessionPool* spdy_session_pool() { | 68 SpdySessionPool* spdy_session_pool() { |
69 return spdy_session_pool_; | 69 return spdy_session_pool_; |
70 } | 70 } |
71 const HostResolver::RequestInfo& destination() const; | 71 const HostResolver::RequestInfo& destination() const; |
72 bool tunnel() const { return tunnel_; } | 72 bool tunnel() const { return tunnel_; } |
73 bool ignore_limits() const { return ignore_limits_; } | |
74 | 73 |
75 ProxyDelegate* proxy_delegate() const { | 74 ProxyDelegate* proxy_delegate() const { |
76 return proxy_delegate_; | 75 return proxy_delegate_; |
77 } | 76 } |
78 | 77 |
79 private: | 78 private: |
80 friend class base::RefCounted<HttpProxySocketParams>; | 79 friend class base::RefCounted<HttpProxySocketParams>; |
81 ~HttpProxySocketParams(); | 80 ~HttpProxySocketParams(); |
82 | 81 |
83 const scoped_refptr<TransportSocketParams> transport_params_; | 82 const scoped_refptr<TransportSocketParams> transport_params_; |
84 const scoped_refptr<SSLSocketParams> ssl_params_; | 83 const scoped_refptr<SSLSocketParams> ssl_params_; |
85 SpdySessionPool* spdy_session_pool_; | 84 SpdySessionPool* spdy_session_pool_; |
86 const std::string user_agent_; | 85 const std::string user_agent_; |
87 const HostPortPair endpoint_; | 86 const HostPortPair endpoint_; |
88 HttpAuthCache* const http_auth_cache_; | 87 HttpAuthCache* const http_auth_cache_; |
89 HttpAuthHandlerFactory* const http_auth_handler_factory_; | 88 HttpAuthHandlerFactory* const http_auth_handler_factory_; |
90 const bool tunnel_; | 89 const bool tunnel_; |
91 bool ignore_limits_; | |
92 ProxyDelegate* proxy_delegate_; | 90 ProxyDelegate* proxy_delegate_; |
93 | 91 |
94 DISALLOW_COPY_AND_ASSIGN(HttpProxySocketParams); | 92 DISALLOW_COPY_AND_ASSIGN(HttpProxySocketParams); |
95 }; | 93 }; |
96 | 94 |
97 // HttpProxyConnectJob optionally establishes a tunnel through the proxy | 95 // HttpProxyConnectJob optionally establishes a tunnel through the proxy |
98 // server after connecting the underlying transport socket. | 96 // server after connecting the underlying transport socket. |
99 class HttpProxyConnectJob : public ConnectJob { | 97 class HttpProxyConnectJob : public ConnectJob { |
100 public: | 98 public: |
101 HttpProxyConnectJob(const std::string& group_name, | 99 HttpProxyConnectJob(const std::string& group_name, |
102 RequestPriority priority, | 100 RequestPriority priority, |
| 101 ClientSocketPool::RespectLimits respect_limits, |
103 const scoped_refptr<HttpProxySocketParams>& params, | 102 const scoped_refptr<HttpProxySocketParams>& params, |
104 const base::TimeDelta& timeout_duration, | 103 const base::TimeDelta& timeout_duration, |
105 TransportClientSocketPool* transport_pool, | 104 TransportClientSocketPool* transport_pool, |
106 SSLClientSocketPool* ssl_pool, | 105 SSLClientSocketPool* ssl_pool, |
107 Delegate* delegate, | 106 Delegate* delegate, |
108 NetLog* net_log); | 107 NetLog* net_log); |
109 ~HttpProxyConnectJob() override; | 108 ~HttpProxyConnectJob() override; |
110 | 109 |
111 // ConnectJob methods. | 110 // ConnectJob methods. |
112 LoadState GetLoadState() const override; | 111 LoadState GetLoadState() const override; |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 TransportClientSocketPool* transport_pool, | 144 TransportClientSocketPool* transport_pool, |
146 SSLClientSocketPool* ssl_pool, | 145 SSLClientSocketPool* ssl_pool, |
147 NetLog* net_log); | 146 NetLog* net_log); |
148 | 147 |
149 ~HttpProxyClientSocketPool() override; | 148 ~HttpProxyClientSocketPool() override; |
150 | 149 |
151 // ClientSocketPool implementation. | 150 // ClientSocketPool implementation. |
152 int RequestSocket(const std::string& group_name, | 151 int RequestSocket(const std::string& group_name, |
153 const void* connect_params, | 152 const void* connect_params, |
154 RequestPriority priority, | 153 RequestPriority priority, |
| 154 RespectLimits respect_limits, |
155 ClientSocketHandle* handle, | 155 ClientSocketHandle* handle, |
156 const CompletionCallback& callback, | 156 const CompletionCallback& callback, |
157 const BoundNetLog& net_log) override; | 157 const BoundNetLog& net_log) override; |
158 | 158 |
159 void RequestSockets(const std::string& group_name, | 159 void RequestSockets(const std::string& group_name, |
160 const void* params, | 160 const void* params, |
161 int num_sockets, | 161 int num_sockets, |
162 const BoundNetLog& net_log) override; | 162 const BoundNetLog& net_log) override; |
163 | 163 |
164 void CancelRequest(const std::string& group_name, | 164 void CancelRequest(const std::string& group_name, |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 TransportClientSocketPool* const transport_pool_; | 225 TransportClientSocketPool* const transport_pool_; |
226 SSLClientSocketPool* const ssl_pool_; | 226 SSLClientSocketPool* const ssl_pool_; |
227 PoolBase base_; | 227 PoolBase base_; |
228 | 228 |
229 DISALLOW_COPY_AND_ASSIGN(HttpProxyClientSocketPool); | 229 DISALLOW_COPY_AND_ASSIGN(HttpProxyClientSocketPool); |
230 }; | 230 }; |
231 | 231 |
232 } // namespace net | 232 } // namespace net |
233 | 233 |
234 #endif // NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_POOL_H_ | 234 #endif // NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_POOL_H_ |
OLD | NEW |