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_H_ | 5 #ifndef NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_H_ |
6 #define NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_H_ | 6 #define NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/callback.h" |
11 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
12 #include "net/base/completion_callback.h" | 13 #include "net/base/completion_callback.h" |
13 #include "net/base/host_port_pair.h" | 14 #include "net/base/host_port_pair.h" |
14 #include "net/base/load_timing_info.h" | 15 #include "net/base/load_timing_info.h" |
15 #include "net/base/net_log.h" | 16 #include "net/base/net_log.h" |
16 #include "net/http/http_auth_controller.h" | 17 #include "net/http/http_auth_controller.h" |
17 #include "net/http/http_request_headers.h" | 18 #include "net/http/http_request_headers.h" |
18 #include "net/http/http_request_info.h" | 19 #include "net/http/http_request_info.h" |
19 #include "net/http/http_response_info.h" | 20 #include "net/http/http_response_info.h" |
20 #include "net/http/proxy_client_socket.h" | 21 #include "net/http/proxy_client_socket.h" |
(...skipping 19 matching lines...) Expand all Loading... |
40 HttpProxyClientSocket(ClientSocketHandle* transport_socket, | 41 HttpProxyClientSocket(ClientSocketHandle* transport_socket, |
41 const GURL& request_url, | 42 const GURL& request_url, |
42 const std::string& user_agent, | 43 const std::string& user_agent, |
43 const HostPortPair& endpoint, | 44 const HostPortPair& endpoint, |
44 const HostPortPair& proxy_server, | 45 const HostPortPair& proxy_server, |
45 HttpAuthCache* http_auth_cache, | 46 HttpAuthCache* http_auth_cache, |
46 HttpAuthHandlerFactory* http_auth_handler_factory, | 47 HttpAuthHandlerFactory* http_auth_handler_factory, |
47 bool tunnel, | 48 bool tunnel, |
48 bool using_spdy, | 49 bool using_spdy, |
49 NextProto protocol_negotiated, | 50 NextProto protocol_negotiated, |
| 51 const base::Callback<void( |
| 52 const HostPortPair&, HttpRequestHeaders*)>& |
| 53 before_proxy_tunnel_request_callback, |
50 bool is_https_proxy); | 54 bool is_https_proxy); |
51 | 55 |
52 // On destruction Disconnect() is called. | 56 // On destruction Disconnect() is called. |
53 virtual ~HttpProxyClientSocket(); | 57 virtual ~HttpProxyClientSocket(); |
54 | 58 |
55 // ProxyClientSocket implementation. | 59 // ProxyClientSocket implementation. |
56 virtual const HttpResponseInfo* GetConnectResponseInfo() const OVERRIDE; | 60 virtual const HttpResponseInfo* GetConnectResponseInfo() const OVERRIDE; |
57 virtual HttpStream* CreateConnectResponseStream() OVERRIDE; | 61 virtual HttpStream* CreateConnectResponseStream() OVERRIDE; |
58 virtual int RestartWithAuth(const CompletionCallback& callback) OVERRIDE; | 62 virtual int RestartWithAuth(const CompletionCallback& callback) OVERRIDE; |
59 virtual const scoped_refptr<HttpAuthController>& GetAuthController() const | 63 virtual const scoped_refptr<HttpAuthController>& GetAuthController() const |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 // If true, then SSL is used to communicate with this proxy | 160 // If true, then SSL is used to communicate with this proxy |
157 const bool is_https_proxy_; | 161 const bool is_https_proxy_; |
158 | 162 |
159 std::string request_line_; | 163 std::string request_line_; |
160 HttpRequestHeaders request_headers_; | 164 HttpRequestHeaders request_headers_; |
161 | 165 |
162 // Used only for redirects. | 166 // Used only for redirects. |
163 bool redirect_has_load_timing_info_; | 167 bool redirect_has_load_timing_info_; |
164 LoadTimingInfo redirect_load_timing_info_; | 168 LoadTimingInfo redirect_load_timing_info_; |
165 | 169 |
| 170 const HostPortPair proxy_server_; |
| 171 base::Callback<void(const HostPortPair&, HttpRequestHeaders*)> |
| 172 before_proxy_tunnel_request_callback_; |
| 173 |
166 const BoundNetLog net_log_; | 174 const BoundNetLog net_log_; |
167 | 175 |
168 DISALLOW_COPY_AND_ASSIGN(HttpProxyClientSocket); | 176 DISALLOW_COPY_AND_ASSIGN(HttpProxyClientSocket); |
169 }; | 177 }; |
170 | 178 |
171 } // namespace net | 179 } // namespace net |
172 | 180 |
173 #endif // NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_H_ | 181 #endif // NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_H_ |
OLD | NEW |