| 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" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 #include "net/socket/ssl_client_socket.h" | 21 #include "net/socket/ssl_client_socket.h" |
| 22 | 22 |
| 23 class GURL; | 23 class GURL; |
| 24 | 24 |
| 25 namespace net { | 25 namespace net { |
| 26 | 26 |
| 27 class AddressList; | 27 class AddressList; |
| 28 class ClientSocketHandle; | 28 class ClientSocketHandle; |
| 29 class GrowableIOBuffer; | 29 class GrowableIOBuffer; |
| 30 class HttpAuthCache; | 30 class HttpAuthCache; |
| 31 class HttpProxyTunnelDelegate; |
| 31 class HttpStream; | 32 class HttpStream; |
| 32 class HttpStreamParser; | 33 class HttpStreamParser; |
| 33 class IOBuffer; | 34 class IOBuffer; |
| 34 | 35 |
| 35 class HttpProxyClientSocket : public ProxyClientSocket { | 36 class HttpProxyClientSocket : public ProxyClientSocket { |
| 36 public: | 37 public: |
| 37 // Takes ownership of |transport_socket|, which should already be connected | 38 // Takes ownership of |transport_socket|, which should already be connected |
| 38 // by the time Connect() is called. If tunnel is true then on Connect() | 39 // by the time Connect() is called. If tunnel is true then on Connect() |
| 39 // this socket will establish an Http tunnel. | 40 // this socket will establish an Http tunnel. |
| 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 HttpProxyTunnelDelegate* http_proxy_tunnel_delegate, |
| 50 bool is_https_proxy); | 52 bool is_https_proxy); |
| 51 | 53 |
| 52 // On destruction Disconnect() is called. | 54 // On destruction Disconnect() is called. |
| 53 virtual ~HttpProxyClientSocket(); | 55 virtual ~HttpProxyClientSocket(); |
| 54 | 56 |
| 55 // ProxyClientSocket implementation. | 57 // ProxyClientSocket implementation. |
| 56 virtual const HttpResponseInfo* GetConnectResponseInfo() const OVERRIDE; | 58 virtual const HttpResponseInfo* GetConnectResponseInfo() const OVERRIDE; |
| 57 virtual HttpStream* CreateConnectResponseStream() OVERRIDE; | 59 virtual HttpStream* CreateConnectResponseStream() OVERRIDE; |
| 58 virtual int RestartWithAuth(const CompletionCallback& callback) OVERRIDE; | 60 virtual int RestartWithAuth(const CompletionCallback& callback) OVERRIDE; |
| 59 virtual const scoped_refptr<HttpAuthController>& GetAuthController() const | 61 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 | 158 // If true, then SSL is used to communicate with this proxy |
| 157 const bool is_https_proxy_; | 159 const bool is_https_proxy_; |
| 158 | 160 |
| 159 std::string request_line_; | 161 std::string request_line_; |
| 160 HttpRequestHeaders request_headers_; | 162 HttpRequestHeaders request_headers_; |
| 161 | 163 |
| 162 // Used only for redirects. | 164 // Used only for redirects. |
| 163 bool redirect_has_load_timing_info_; | 165 bool redirect_has_load_timing_info_; |
| 164 LoadTimingInfo redirect_load_timing_info_; | 166 LoadTimingInfo redirect_load_timing_info_; |
| 165 | 167 |
| 168 const HostPortPair proxy_server_; |
| 169 HttpProxyTunnelDelegate* http_proxy_tunnel_delegate_; |
| 170 |
| 166 const BoundNetLog net_log_; | 171 const BoundNetLog net_log_; |
| 167 | 172 |
| 168 DISALLOW_COPY_AND_ASSIGN(HttpProxyClientSocket); | 173 DISALLOW_COPY_AND_ASSIGN(HttpProxyClientSocket); |
| 169 }; | 174 }; |
| 170 | 175 |
| 171 } // namespace net | 176 } // namespace net |
| 172 | 177 |
| 173 #endif // NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_H_ | 178 #endif // NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_H_ |
| OLD | NEW |