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

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

Issue 862133002: Update from https://crrev.com/312398 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "base/time/time.h" 14 #include "base/time/time.h"
15 #include "net/base/host_port_pair.h" 15 #include "net/base/host_port_pair.h"
16 #include "net/base/net_export.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.h" 20 #include "net/socket/client_socket_pool.h"
21 #include "net/socket/client_socket_pool_base.h" 21 #include "net/socket/client_socket_pool_base.h"
22 #include "net/socket/client_socket_pool_histograms.h" 22 #include "net/socket/client_socket_pool_histograms.h"
23 #include "net/socket/ssl_client_socket.h" 23 #include "net/socket/ssl_client_socket.h"
24 #include "net/spdy/spdy_session.h" 24 #include "net/spdy/spdy_session.h"
25 25
26 namespace net { 26 namespace net {
27 27
28 class HostResolver;
29 class HttpAuthCache; 28 class HttpAuthCache;
30 class HttpAuthHandlerFactory; 29 class HttpAuthHandlerFactory;
31 class ProxyDelegate; 30 class ProxyDelegate;
32 class SSLClientSocketPool; 31 class SSLClientSocketPool;
33 class SSLSocketParams; 32 class SSLSocketParams;
34 class SpdySessionPool; 33 class SpdySessionPool;
35 class SpdyStream; 34 class SpdyStream;
36 class TransportClientSocketPool; 35 class TransportClientSocketPool;
37 class TransportSocketParams; 36 class TransportSocketParams;
38 37
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 179
181 DISALLOW_COPY_AND_ASSIGN(HttpProxyConnectJob); 180 DISALLOW_COPY_AND_ASSIGN(HttpProxyConnectJob);
182 }; 181 };
183 182
184 class NET_EXPORT_PRIVATE HttpProxyClientSocketPool 183 class NET_EXPORT_PRIVATE HttpProxyClientSocketPool
185 : public ClientSocketPool, 184 : public ClientSocketPool,
186 public HigherLayeredPool { 185 public HigherLayeredPool {
187 public: 186 public:
188 typedef HttpProxySocketParams SocketParams; 187 typedef HttpProxySocketParams SocketParams;
189 188
190 HttpProxyClientSocketPool( 189 HttpProxyClientSocketPool(int max_sockets,
191 int max_sockets, 190 int max_sockets_per_group,
192 int max_sockets_per_group, 191 ClientSocketPoolHistograms* histograms,
193 ClientSocketPoolHistograms* histograms, 192 TransportClientSocketPool* transport_pool,
194 HostResolver* host_resolver, 193 SSLClientSocketPool* ssl_pool,
195 TransportClientSocketPool* transport_pool, 194 NetLog* net_log);
196 SSLClientSocketPool* ssl_pool,
197 NetLog* net_log);
198 195
199 ~HttpProxyClientSocketPool() override; 196 ~HttpProxyClientSocketPool() override;
200 197
201 // ClientSocketPool implementation. 198 // ClientSocketPool implementation.
202 int RequestSocket(const std::string& group_name, 199 int RequestSocket(const std::string& group_name,
203 const void* connect_params, 200 const void* connect_params,
204 RequestPriority priority, 201 RequestPriority priority,
205 ClientSocketHandle* handle, 202 ClientSocketHandle* handle,
206 const CompletionCallback& callback, 203 const CompletionCallback& callback,
207 const BoundNetLog& net_log) override; 204 const BoundNetLog& net_log) override;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 void RemoveHigherLayeredPool(HigherLayeredPool* higher_pool) override; 243 void RemoveHigherLayeredPool(HigherLayeredPool* higher_pool) override;
247 244
248 // HigherLayeredPool implementation. 245 // HigherLayeredPool implementation.
249 bool CloseOneIdleConnection() override; 246 bool CloseOneIdleConnection() override;
250 247
251 private: 248 private:
252 typedef ClientSocketPoolBase<HttpProxySocketParams> PoolBase; 249 typedef ClientSocketPoolBase<HttpProxySocketParams> PoolBase;
253 250
254 class HttpProxyConnectJobFactory : public PoolBase::ConnectJobFactory { 251 class HttpProxyConnectJobFactory : public PoolBase::ConnectJobFactory {
255 public: 252 public:
256 HttpProxyConnectJobFactory( 253 HttpProxyConnectJobFactory(TransportClientSocketPool* transport_pool,
257 TransportClientSocketPool* transport_pool, 254 SSLClientSocketPool* ssl_pool,
258 SSLClientSocketPool* ssl_pool, 255 NetLog* net_log);
259 HostResolver* host_resolver,
260 NetLog* net_log);
261 256
262 // ClientSocketPoolBase::ConnectJobFactory methods. 257 // ClientSocketPoolBase::ConnectJobFactory methods.
263 scoped_ptr<ConnectJob> NewConnectJob( 258 scoped_ptr<ConnectJob> NewConnectJob(
264 const std::string& group_name, 259 const std::string& group_name,
265 const PoolBase::Request& request, 260 const PoolBase::Request& request,
266 ConnectJob::Delegate* delegate) const override; 261 ConnectJob::Delegate* delegate) const override;
267 262
268 base::TimeDelta ConnectionTimeout() const override; 263 base::TimeDelta ConnectionTimeout() const override;
269 264
270 private: 265 private:
271 TransportClientSocketPool* const transport_pool_; 266 TransportClientSocketPool* const transport_pool_;
272 SSLClientSocketPool* const ssl_pool_; 267 SSLClientSocketPool* const ssl_pool_;
273 HostResolver* const host_resolver_;
274 NetLog* net_log_; 268 NetLog* net_log_;
275 base::TimeDelta timeout_; 269 base::TimeDelta timeout_;
276 270
277 DISALLOW_COPY_AND_ASSIGN(HttpProxyConnectJobFactory); 271 DISALLOW_COPY_AND_ASSIGN(HttpProxyConnectJobFactory);
278 }; 272 };
279 273
280 TransportClientSocketPool* const transport_pool_; 274 TransportClientSocketPool* const transport_pool_;
281 SSLClientSocketPool* const ssl_pool_; 275 SSLClientSocketPool* const ssl_pool_;
282 PoolBase base_; 276 PoolBase base_;
283 277
284 DISALLOW_COPY_AND_ASSIGN(HttpProxyClientSocketPool); 278 DISALLOW_COPY_AND_ASSIGN(HttpProxyClientSocketPool);
285 }; 279 };
286 280
287 } // namespace net 281 } // namespace net
288 282
289 #endif // NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_POOL_H_ 283 #endif // NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_POOL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698