| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 bool tunnel, | 46 bool tunnel, |
| 47 bool using_spdy, | 47 bool using_spdy, |
| 48 bool is_https_proxy); | 48 bool is_https_proxy); |
| 49 | 49 |
| 50 // On destruction Disconnect() is called. | 50 // On destruction Disconnect() is called. |
| 51 virtual ~HttpProxyClientSocket(); | 51 virtual ~HttpProxyClientSocket(); |
| 52 | 52 |
| 53 // If Connect (or its callback) returns PROXY_AUTH_REQUESTED, then | 53 // If Connect (or its callback) returns PROXY_AUTH_REQUESTED, then |
| 54 // credentials should be added to the HttpAuthController before calling | 54 // credentials should be added to the HttpAuthController before calling |
| 55 // RestartWithAuth. | 55 // RestartWithAuth. |
| 56 int RestartWithAuth(OldCompletionCallback* callback); | 56 int RestartWithAuth(const CompletionCallback& callback); |
| 57 | 57 |
| 58 const scoped_refptr<HttpAuthController>& auth_controller() { | 58 const scoped_refptr<HttpAuthController>& auth_controller() { |
| 59 return auth_; | 59 return auth_; |
| 60 } | 60 } |
| 61 | 61 |
| 62 bool using_spdy() { | 62 bool using_spdy() { |
| 63 return using_spdy_; | 63 return using_spdy_; |
| 64 } | 64 } |
| 65 | 65 |
| 66 // ProxyClientSocket implementation. | 66 // ProxyClientSocket implementation. |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 int DoGenerateAuthTokenComplete(int result); | 128 int DoGenerateAuthTokenComplete(int result); |
| 129 int DoSendRequest(); | 129 int DoSendRequest(); |
| 130 int DoSendRequestComplete(int result); | 130 int DoSendRequestComplete(int result); |
| 131 int DoReadHeaders(); | 131 int DoReadHeaders(); |
| 132 int DoReadHeadersComplete(int result); | 132 int DoReadHeadersComplete(int result); |
| 133 int DoDrainBody(); | 133 int DoDrainBody(); |
| 134 int DoDrainBodyComplete(int result); | 134 int DoDrainBodyComplete(int result); |
| 135 int DoTCPRestart(); | 135 int DoTCPRestart(); |
| 136 int DoTCPRestartComplete(int result); | 136 int DoTCPRestartComplete(int result); |
| 137 | 137 |
| 138 OldCompletionCallbackImpl<HttpProxyClientSocket> io_callback_; | 138 CompletionCallback io_callback_; |
| 139 State next_state_; | 139 State next_state_; |
| 140 | 140 |
| 141 // Stores the callback to the layer above, called on completing Connect(). | 141 // Stores the callback to the layer above, called on completing Connect(). |
| 142 CompletionCallback user_callback_; | 142 CompletionCallback user_callback_; |
| 143 | 143 |
| 144 HttpRequestInfo request_; | 144 HttpRequestInfo request_; |
| 145 HttpResponseInfo response_; | 145 HttpResponseInfo response_; |
| 146 | 146 |
| 147 scoped_refptr<GrowableIOBuffer> parser_buf_; | 147 scoped_refptr<GrowableIOBuffer> parser_buf_; |
| 148 scoped_ptr<HttpStreamParser> http_stream_parser_; | 148 scoped_ptr<HttpStreamParser> http_stream_parser_; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 165 HttpRequestHeaders request_headers_; | 165 HttpRequestHeaders request_headers_; |
| 166 | 166 |
| 167 const BoundNetLog net_log_; | 167 const BoundNetLog net_log_; |
| 168 | 168 |
| 169 DISALLOW_COPY_AND_ASSIGN(HttpProxyClientSocket); | 169 DISALLOW_COPY_AND_ASSIGN(HttpProxyClientSocket); |
| 170 }; | 170 }; |
| 171 | 171 |
| 172 } // namespace net | 172 } // namespace net |
| 173 | 173 |
| 174 #endif // NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_H_ | 174 #endif // NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_H_ |
| OLD | NEW |