OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_WRAPPER_H_ | 5 #ifndef NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_WRAPPER_H_ |
6 #define NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_WRAPPER_H_ | 6 #define NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_WRAPPER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 // either send the auth response to the old connection, or establish a new | 48 // either send the auth response to the old connection, or establish a new |
49 // connection and send the response there. | 49 // connection and send the response there. |
50 // | 50 // |
51 // TODO(mmenke): Ideally, we'd have a central location store auth state across | 51 // TODO(mmenke): Ideally, we'd have a central location store auth state across |
52 // multiple connections to the same server instead. | 52 // multiple connections to the same server instead. |
53 class HttpProxyClientSocketWrapper : public ProxyClientSocket { | 53 class HttpProxyClientSocketWrapper : public ProxyClientSocket { |
54 public: | 54 public: |
55 HttpProxyClientSocketWrapper( | 55 HttpProxyClientSocketWrapper( |
56 const std::string& group_name, | 56 const std::string& group_name, |
57 RequestPriority priority, | 57 RequestPriority priority, |
| 58 ClientSocketPool::RespectLimits respect_limits, |
58 base::TimeDelta connect_timeout_duration, | 59 base::TimeDelta connect_timeout_duration, |
59 base::TimeDelta proxy_negotiation_timeout_duration, | 60 base::TimeDelta proxy_negotiation_timeout_duration, |
60 TransportClientSocketPool* transport_pool, | 61 TransportClientSocketPool* transport_pool, |
61 SSLClientSocketPool* ssl_pool, | 62 SSLClientSocketPool* ssl_pool, |
62 const scoped_refptr<TransportSocketParams>& transport_params, | 63 const scoped_refptr<TransportSocketParams>& transport_params, |
63 const scoped_refptr<SSLSocketParams>& ssl_params, | 64 const scoped_refptr<SSLSocketParams>& ssl_params, |
64 const std::string& user_agent, | 65 const std::string& user_agent, |
65 const HostPortPair& endpoint, | 66 const HostPortPair& endpoint, |
66 HttpAuthCache* http_auth_cache, | 67 HttpAuthCache* http_auth_cache, |
67 HttpAuthHandlerFactory* http_auth_handler_factory, | 68 HttpAuthHandlerFactory* http_auth_handler_factory, |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 | 162 |
162 void SetConnectTimer(base::TimeDelta duration); | 163 void SetConnectTimer(base::TimeDelta duration); |
163 void ConnectTimeout(); | 164 void ConnectTimeout(); |
164 | 165 |
165 const HostResolver::RequestInfo& GetDestination(); | 166 const HostResolver::RequestInfo& GetDestination(); |
166 | 167 |
167 State next_state_; | 168 State next_state_; |
168 | 169 |
169 const std::string group_name_; | 170 const std::string group_name_; |
170 RequestPriority priority_; | 171 RequestPriority priority_; |
| 172 ClientSocketPool::RespectLimits respect_limits_; |
171 const base::TimeDelta connect_timeout_duration_; | 173 const base::TimeDelta connect_timeout_duration_; |
172 const base::TimeDelta proxy_negotiation_timeout_duration_; | 174 const base::TimeDelta proxy_negotiation_timeout_duration_; |
173 | 175 |
174 TransportClientSocketPool* const transport_pool_; | 176 TransportClientSocketPool* const transport_pool_; |
175 SSLClientSocketPool* const ssl_pool_; | 177 SSLClientSocketPool* const ssl_pool_; |
176 const scoped_refptr<TransportSocketParams> transport_params_; | 178 const scoped_refptr<TransportSocketParams> transport_params_; |
177 const scoped_refptr<SSLSocketParams> ssl_params_; | 179 const scoped_refptr<SSLSocketParams> ssl_params_; |
178 | 180 |
179 const std::string user_agent_; | 181 const std::string user_agent_; |
180 const HostPortPair endpoint_; | 182 const HostPortPair endpoint_; |
(...skipping 24 matching lines...) Expand all Loading... |
205 BoundNetLog net_log_; | 207 BoundNetLog net_log_; |
206 | 208 |
207 base::OneShotTimer connect_timer_; | 209 base::OneShotTimer connect_timer_; |
208 | 210 |
209 DISALLOW_COPY_AND_ASSIGN(HttpProxyClientSocketWrapper); | 211 DISALLOW_COPY_AND_ASSIGN(HttpProxyClientSocketWrapper); |
210 }; | 212 }; |
211 | 213 |
212 } // namespace net | 214 } // namespace net |
213 | 215 |
214 #endif // NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_WRAPPER_H_ | 216 #endif // NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_WRAPPER_H_ |
OLD | NEW |