| 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_PROXY_CLIENT_SOCKET_H_ | 5 #ifndef NET_HTTP_PROXY_CLIENT_SOCKET_H_ |
| 6 #define NET_HTTP_PROXY_CLIENT_SOCKET_H_ | 6 #define NET_HTTP_PROXY_CLIENT_SOCKET_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "net/socket/ssl_client_socket.h" | 10 #include "net/socket/ssl_client_socket.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 // Returns the HttpResponseInfo (including HTTP Headers) from | 30 // Returns the HttpResponseInfo (including HTTP Headers) from |
| 31 // the response to the CONNECT request. | 31 // the response to the CONNECT request. |
| 32 virtual const HttpResponseInfo* GetConnectResponseInfo() const = 0; | 32 virtual const HttpResponseInfo* GetConnectResponseInfo() const = 0; |
| 33 | 33 |
| 34 // Transfers ownership of a newly created HttpStream to the caller | 34 // Transfers ownership of a newly created HttpStream to the caller |
| 35 // which can be used to read the response body. | 35 // which can be used to read the response body. |
| 36 virtual HttpStream* CreateConnectResponseStream() = 0; | 36 virtual HttpStream* CreateConnectResponseStream() = 0; |
| 37 | 37 |
| 38 // Returns the HttpAuthController which can be used | 38 // Returns the HttpAuthController which can be used |
| 39 // to interact with an HTTP Proxy Authorization Required (407) request. | 39 // to interact with an HTTP Proxy Authorization Required (407) request. |
| 40 virtual const scoped_refptr<HttpAuthController>& GetAuthController() const | 40 virtual const scoped_refptr<HttpAuthController>& GetAuthController() |
| 41 = 0; | 41 const = 0; |
| 42 | 42 |
| 43 // If Connect (or its callback) returns PROXY_AUTH_REQUESTED, then | 43 // If Connect (or its callback) returns PROXY_AUTH_REQUESTED, then |
| 44 // credentials should be added to the HttpAuthController before calling | 44 // credentials should be added to the HttpAuthController before calling |
| 45 // RestartWithAuth. Not all ProxyClientSocket implementations will be | 45 // RestartWithAuth. Not all ProxyClientSocket implementations will be |
| 46 // restartable. Such implementations should disconnect themselves and | 46 // restartable. Such implementations should disconnect themselves and |
| 47 // return OK. | 47 // return OK. |
| 48 virtual int RestartWithAuth(const CompletionCallback& callback) = 0; | 48 virtual int RestartWithAuth(const CompletionCallback& callback) = 0; |
| 49 | 49 |
| 50 // Returns true of the connection to the proxy is using SPDY. | 50 // Returns true of the connection to the proxy is using SPDY. |
| 51 virtual bool IsUsingSpdy() const = 0; | 51 virtual bool IsUsingSpdy() const = 0; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 82 static bool SanitizeProxyRedirect(HttpResponseInfo* response, | 82 static bool SanitizeProxyRedirect(HttpResponseInfo* response, |
| 83 const GURL& url); | 83 const GURL& url); |
| 84 | 84 |
| 85 private: | 85 private: |
| 86 DISALLOW_COPY_AND_ASSIGN(ProxyClientSocket); | 86 DISALLOW_COPY_AND_ASSIGN(ProxyClientSocket); |
| 87 }; | 87 }; |
| 88 | 88 |
| 89 } // namespace net | 89 } // namespace net |
| 90 | 90 |
| 91 #endif // NET_HTTP_PROXY_CLIENT_SOCKET_H_ | 91 #endif // NET_HTTP_PROXY_CLIENT_SOCKET_H_ |
| OLD | NEW |