| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 bool using_spdy() { | 53 bool using_spdy() { |
| 54 return using_spdy_; | 54 return using_spdy_; |
| 55 } | 55 } |
| 56 | 56 |
| 57 // ProxyClientSocket methods: | 57 // ProxyClientSocket methods: |
| 58 virtual const HttpResponseInfo* GetConnectResponseInfo() const OVERRIDE; | 58 virtual const HttpResponseInfo* GetConnectResponseInfo() const OVERRIDE; |
| 59 virtual HttpStream* CreateConnectResponseStream() OVERRIDE; | 59 virtual HttpStream* CreateConnectResponseStream() OVERRIDE; |
| 60 virtual int RestartWithAuth(OldCompletionCallback* callback) OVERRIDE; | 60 virtual int RestartWithAuth(OldCompletionCallback* callback) OVERRIDE; |
| 61 virtual const scoped_refptr<HttpAuthController>& auth_controller() OVERRIDE; | 61 virtual const scoped_refptr<HttpAuthController>& auth_controller() OVERRIDE; |
| 62 | 62 |
| 63 // StreamSocket methods: | 63 // StreamSocket implementation. |
| 64 virtual int Connect(OldCompletionCallback* callback) OVERRIDE; | 64 virtual int Connect(OldCompletionCallback* callback) OVERRIDE; |
| 65 virtual int Connect(const CompletionCallback& callback) OVERRIDE; |
| 65 virtual void Disconnect() OVERRIDE; | 66 virtual void Disconnect() OVERRIDE; |
| 66 virtual bool IsConnected() const OVERRIDE; | 67 virtual bool IsConnected() const OVERRIDE; |
| 67 virtual bool IsConnectedAndIdle() const OVERRIDE; | 68 virtual bool IsConnectedAndIdle() const OVERRIDE; |
| 68 virtual const BoundNetLog& NetLog() const OVERRIDE; | 69 virtual const BoundNetLog& NetLog() const OVERRIDE; |
| 69 virtual void SetSubresourceSpeculation() OVERRIDE; | 70 virtual void SetSubresourceSpeculation() OVERRIDE; |
| 70 virtual void SetOmniboxSpeculation() OVERRIDE; | 71 virtual void SetOmniboxSpeculation() OVERRIDE; |
| 71 virtual bool WasEverUsed() const OVERRIDE; | 72 virtual bool WasEverUsed() const OVERRIDE; |
| 72 virtual bool UsingTCPFastOpen() const OVERRIDE; | 73 virtual bool UsingTCPFastOpen() const OVERRIDE; |
| 73 virtual int64 NumBytesRead() const OVERRIDE; | 74 virtual int64 NumBytesRead() const OVERRIDE; |
| 74 virtual base::TimeDelta GetConnectTimeMicros() const OVERRIDE; | 75 virtual base::TimeDelta GetConnectTimeMicros() const OVERRIDE; |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 int DoSendRequestComplete(int result); | 120 int DoSendRequestComplete(int result); |
| 120 int DoReadHeaders(); | 121 int DoReadHeaders(); |
| 121 int DoReadHeadersComplete(int result); | 122 int DoReadHeadersComplete(int result); |
| 122 int DoDrainBody(); | 123 int DoDrainBody(); |
| 123 int DoDrainBodyComplete(int result); | 124 int DoDrainBodyComplete(int result); |
| 124 | 125 |
| 125 OldCompletionCallbackImpl<HttpProxyClientSocket> io_callback_; | 126 OldCompletionCallbackImpl<HttpProxyClientSocket> io_callback_; |
| 126 State next_state_; | 127 State next_state_; |
| 127 | 128 |
| 128 // Stores the callback to the layer above, called on completing Connect(). | 129 // Stores the callback to the layer above, called on completing Connect(). |
| 129 OldCompletionCallback* user_callback_; | 130 OldCompletionCallback* old_user_callback_; |
| 131 CompletionCallback user_callback_; |
| 130 | 132 |
| 131 HttpRequestInfo request_; | 133 HttpRequestInfo request_; |
| 132 HttpResponseInfo response_; | 134 HttpResponseInfo response_; |
| 133 | 135 |
| 134 scoped_refptr<GrowableIOBuffer> parser_buf_; | 136 scoped_refptr<GrowableIOBuffer> parser_buf_; |
| 135 scoped_ptr<HttpStreamParser> http_stream_parser_; | 137 scoped_ptr<HttpStreamParser> http_stream_parser_; |
| 136 scoped_refptr<IOBuffer> drain_buf_; | 138 scoped_refptr<IOBuffer> drain_buf_; |
| 137 | 139 |
| 138 // Stores the underlying socket. | 140 // Stores the underlying socket. |
| 139 scoped_ptr<ClientSocketHandle> transport_; | 141 scoped_ptr<ClientSocketHandle> transport_; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 152 HttpRequestHeaders request_headers_; | 154 HttpRequestHeaders request_headers_; |
| 153 | 155 |
| 154 const BoundNetLog net_log_; | 156 const BoundNetLog net_log_; |
| 155 | 157 |
| 156 DISALLOW_COPY_AND_ASSIGN(HttpProxyClientSocket); | 158 DISALLOW_COPY_AND_ASSIGN(HttpProxyClientSocket); |
| 157 }; | 159 }; |
| 158 | 160 |
| 159 } // namespace net | 161 } // namespace net |
| 160 | 162 |
| 161 #endif // NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_H_ | 163 #endif // NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_H_ |
| OLD | NEW |