Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Side by Side Diff: net/http/http_proxy_client_socket_pool.h

Issue 2899313006: Plumb NQP to context and to http_proxy_client_socket_pool (Closed)
Patch Set: Rebased Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 10 matching lines...) Expand all
21 #include "net/socket/client_socket_pool_base.h" 21 #include "net/socket/client_socket_pool_base.h"
22 #include "net/socket/ssl_client_socket.h" 22 #include "net/socket/ssl_client_socket.h"
23 #include "net/spdy/chromium/spdy_session.h" 23 #include "net/spdy/chromium/spdy_session.h"
24 24
25 namespace net { 25 namespace net {
26 26
27 class HttpAuthCache; 27 class HttpAuthCache;
28 class HttpAuthHandlerFactory; 28 class HttpAuthHandlerFactory;
29 class HttpProxyClientSocketWrapper; 29 class HttpProxyClientSocketWrapper;
30 class NetLog; 30 class NetLog;
31 class NetworkQualityProvider;
31 class ProxyDelegate; 32 class ProxyDelegate;
32 class SSLClientSocketPool; 33 class SSLClientSocketPool;
33 class SSLSocketParams; 34 class SSLSocketParams;
34 class SpdySessionPool; 35 class SpdySessionPool;
35 class TransportClientSocketPool; 36 class TransportClientSocketPool;
36 class TransportSocketParams; 37 class TransportSocketParams;
37 38
38 // HttpProxySocketParams only needs the socket params for one of the proxy 39 // HttpProxySocketParams only needs the socket params for one of the proxy
39 // types. The other param must be NULL. When using an HTTP Proxy, 40 // types. The other param must be NULL. When using an HTTP Proxy,
40 // |transport_params| must be set. When using an HTTPS Proxy, |ssl_params| 41 // |transport_params| must be set. When using an HTTPS Proxy, |ssl_params|
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 class NET_EXPORT_PRIVATE HttpProxyClientSocketPool 137 class NET_EXPORT_PRIVATE HttpProxyClientSocketPool
137 : public ClientSocketPool, 138 : public ClientSocketPool,
138 public HigherLayeredPool { 139 public HigherLayeredPool {
139 public: 140 public:
140 typedef HttpProxySocketParams SocketParams; 141 typedef HttpProxySocketParams SocketParams;
141 142
142 HttpProxyClientSocketPool(int max_sockets, 143 HttpProxyClientSocketPool(int max_sockets,
143 int max_sockets_per_group, 144 int max_sockets_per_group,
144 TransportClientSocketPool* transport_pool, 145 TransportClientSocketPool* transport_pool,
145 SSLClientSocketPool* ssl_pool, 146 SSLClientSocketPool* ssl_pool,
147 NetworkQualityProvider* network_quality_provider,
146 NetLog* net_log); 148 NetLog* net_log);
147 149
148 ~HttpProxyClientSocketPool() override; 150 ~HttpProxyClientSocketPool() override;
149 151
150 // ClientSocketPool implementation. 152 // ClientSocketPool implementation.
151 int RequestSocket(const std::string& group_name, 153 int RequestSocket(const std::string& group_name,
152 const void* connect_params, 154 const void* connect_params,
153 RequestPriority priority, 155 RequestPriority priority,
154 RespectLimits respect_limits, 156 RespectLimits respect_limits,
155 ClientSocketHandle* handle, 157 ClientSocketHandle* handle,
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 // HigherLayeredPool implementation. 204 // HigherLayeredPool implementation.
203 bool CloseOneIdleConnection() override; 205 bool CloseOneIdleConnection() override;
204 206
205 private: 207 private:
206 typedef ClientSocketPoolBase<HttpProxySocketParams> PoolBase; 208 typedef ClientSocketPoolBase<HttpProxySocketParams> PoolBase;
207 209
208 class HttpProxyConnectJobFactory : public PoolBase::ConnectJobFactory { 210 class HttpProxyConnectJobFactory : public PoolBase::ConnectJobFactory {
209 public: 211 public:
210 HttpProxyConnectJobFactory(TransportClientSocketPool* transport_pool, 212 HttpProxyConnectJobFactory(TransportClientSocketPool* transport_pool,
211 SSLClientSocketPool* ssl_pool, 213 SSLClientSocketPool* ssl_pool,
214 NetworkQualityProvider* network_quality_provider,
212 NetLog* net_log); 215 NetLog* net_log);
213 216
214 // ClientSocketPoolBase::ConnectJobFactory methods. 217 // ClientSocketPoolBase::ConnectJobFactory methods.
215 std::unique_ptr<ConnectJob> NewConnectJob( 218 std::unique_ptr<ConnectJob> NewConnectJob(
216 const std::string& group_name, 219 const std::string& group_name,
217 const PoolBase::Request& request, 220 const PoolBase::Request& request,
218 ConnectJob::Delegate* delegate) const override; 221 ConnectJob::Delegate* delegate) const override;
219 222
220 base::TimeDelta ConnectionTimeout() const override; 223 base::TimeDelta ConnectionTimeout() const override;
221 224
222 private: 225 private:
223 TransportClientSocketPool* const transport_pool_; 226 TransportClientSocketPool* const transport_pool_;
224 SSLClientSocketPool* const ssl_pool_; 227 SSLClientSocketPool* const ssl_pool_;
228 NetworkQualityProvider* network_quality_provider_;
229 const base::TimeDelta default_connection_timeout_;
225 NetLog* net_log_; 230 NetLog* net_log_;
226 base::TimeDelta timeout_;
227 231
228 DISALLOW_COPY_AND_ASSIGN(HttpProxyConnectJobFactory); 232 DISALLOW_COPY_AND_ASSIGN(HttpProxyConnectJobFactory);
229 }; 233 };
230 234
231 TransportClientSocketPool* const transport_pool_; 235 TransportClientSocketPool* const transport_pool_;
232 SSLClientSocketPool* const ssl_pool_; 236 SSLClientSocketPool* const ssl_pool_;
233 PoolBase base_; 237 PoolBase base_;
234 238
235 DISALLOW_COPY_AND_ASSIGN(HttpProxyClientSocketPool); 239 DISALLOW_COPY_AND_ASSIGN(HttpProxyClientSocketPool);
236 }; 240 };
237 241
238 } // namespace net 242 } // namespace net
239 243
240 #endif // NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_POOL_H_ 244 #endif // NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_POOL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698