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

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

Issue 3029052: Recommit 54405 - Fix late binding induced mismatch of Socket and AuthController (Closed)
Patch Set: Created 10 years, 4 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
« no previous file with comments | « net/http/http_proxy_client_socket.cc ('k') | net/http/http_proxy_client_socket_pool.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/ref_counted.h" 12 #include "base/ref_counted.h"
13 #include "base/scoped_ptr.h" 13 #include "base/scoped_ptr.h"
14 #include "base/time.h" 14 #include "base/time.h"
15 #include "net/base/host_port_pair.h" 15 #include "net/base/host_port_pair.h"
16 #include "net/base/host_resolver.h" 16 #include "net/base/host_resolver.h"
17 #include "net/http/http_auth.h" 17 #include "net/http/http_auth.h"
18 #include "net/proxy/proxy_server.h" 18 #include "net/proxy/proxy_server.h"
19 #include "net/socket/client_socket_pool_base.h" 19 #include "net/socket/client_socket_pool_base.h"
20 #include "net/socket/client_socket_pool_histograms.h" 20 #include "net/socket/client_socket_pool_histograms.h"
21 #include "net/socket/client_socket_pool.h" 21 #include "net/socket/client_socket_pool.h"
22 #include "net/socket/tcp_client_socket_pool.h" 22 #include "net/socket/tcp_client_socket_pool.h"
23 23
24 namespace net { 24 namespace net {
25 25
26 class ClientSocketFactory; 26 class ClientSocketFactory;
27 class ConnectJobFactory; 27 class ConnectJobFactory;
28 class HttpAuthController; 28 class HttpAuthController;
29 class HttpNetworkSession;
29 30
30 class HttpProxySocketParams : public base::RefCounted<HttpProxySocketParams> { 31 class HttpProxySocketParams : public base::RefCounted<HttpProxySocketParams> {
31 public: 32 public:
32 HttpProxySocketParams(const scoped_refptr<TCPSocketParams>& proxy_server, 33 HttpProxySocketParams(const scoped_refptr<TCPSocketParams>& proxy_server,
33 const GURL& request_url, HostPortPair endpoint, 34 const GURL& request_url, HostPortPair endpoint,
34 scoped_refptr<HttpAuthController> auth_controller, 35 scoped_refptr<HttpNetworkSession> session,
35 bool tunnel); 36 bool tunnel);
36 37
37 const scoped_refptr<TCPSocketParams>& tcp_params() const { 38 const scoped_refptr<TCPSocketParams>& tcp_params() const {
38 return tcp_params_; 39 return tcp_params_;
39 } 40 }
40 const GURL& request_url() const { return request_url_; } 41 const GURL& request_url() const { return request_url_; }
41 const HostPortPair& endpoint() const { return endpoint_; } 42 const HostPortPair& endpoint() const { return endpoint_; }
42 const scoped_refptr<HttpAuthController>& auth_controller() { 43 const scoped_refptr<HttpNetworkSession>& session() {
43 return auth_controller_; 44 return session_;
44 } 45 }
45 bool tunnel() const { return tunnel_; } 46 bool tunnel() const { return tunnel_; }
46 47
47 private: 48 private:
48 friend class base::RefCounted<HttpProxySocketParams>; 49 friend class base::RefCounted<HttpProxySocketParams>;
49 ~HttpProxySocketParams(); 50 ~HttpProxySocketParams();
50 51
51 const scoped_refptr<TCPSocketParams> tcp_params_; 52 const scoped_refptr<TCPSocketParams> tcp_params_;
52 const GURL request_url_; 53 const GURL request_url_;
53 const HostPortPair endpoint_; 54 const HostPortPair endpoint_;
54 const scoped_refptr<HttpAuthController> auth_controller_; 55 const scoped_refptr<HttpNetworkSession> session_;
55 const bool tunnel_; 56 const bool tunnel_;
56 57
57 DISALLOW_COPY_AND_ASSIGN(HttpProxySocketParams); 58 DISALLOW_COPY_AND_ASSIGN(HttpProxySocketParams);
58 }; 59 };
59 60
60 // HttpProxyConnectJob optionally establishes a tunnel through the proxy 61 // HttpProxyConnectJob optionally establishes a tunnel through the proxy
61 // server after connecting the underlying transport socket. 62 // server after connecting the underlying transport socket.
62 class HttpProxyConnectJob : public ConnectJob { 63 class HttpProxyConnectJob : public ConnectJob {
63 public: 64 public:
64 HttpProxyConnectJob(const std::string& group_name, 65 HttpProxyConnectJob(const std::string& group_name,
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 197
197 DISALLOW_COPY_AND_ASSIGN(HttpProxyClientSocketPool); 198 DISALLOW_COPY_AND_ASSIGN(HttpProxyClientSocketPool);
198 }; 199 };
199 200
200 REGISTER_SOCKET_PARAMS_FOR_POOL(HttpProxyClientSocketPool, 201 REGISTER_SOCKET_PARAMS_FOR_POOL(HttpProxyClientSocketPool,
201 HttpProxySocketParams); 202 HttpProxySocketParams);
202 203
203 } // namespace net 204 } // namespace net
204 205
205 #endif // NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_POOL_H_ 206 #endif // NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_POOL_H_
OLDNEW
« no previous file with comments | « net/http/http_proxy_client_socket.cc ('k') | net/http/http_proxy_client_socket_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698