| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 methods: | 66 // ProxyClientSocket methods: |
| 67 virtual const HttpResponseInfo* GetConnectResponseInfo() const; | 67 virtual const HttpResponseInfo* GetConnectResponseInfo() const OVERRIDE; |
| 68 virtual HttpStream* CreateConnectResponseStream(); | 68 virtual HttpStream* CreateConnectResponseStream() OVERRIDE; |
| 69 | 69 |
| 70 // StreamSocket methods: | 70 // StreamSocket methods: |
| 71 virtual int Connect(OldCompletionCallback* callback); | 71 virtual int Connect(OldCompletionCallback* callback) OVERRIDE; |
| 72 virtual void Disconnect(); | 72 virtual void Disconnect() OVERRIDE; |
| 73 virtual bool IsConnected() const; | 73 virtual bool IsConnected() const OVERRIDE; |
| 74 virtual bool IsConnectedAndIdle() const; | 74 virtual bool IsConnectedAndIdle() const OVERRIDE; |
| 75 virtual const BoundNetLog& NetLog() const; | 75 virtual const BoundNetLog& NetLog() const OVERRIDE; |
| 76 virtual void SetSubresourceSpeculation(); | 76 virtual void SetSubresourceSpeculation() OVERRIDE; |
| 77 virtual void SetOmniboxSpeculation(); | 77 virtual void SetOmniboxSpeculation() OVERRIDE; |
| 78 virtual bool WasEverUsed() const; | 78 virtual bool WasEverUsed() const OVERRIDE; |
| 79 virtual bool UsingTCPFastOpen() const; | 79 virtual bool UsingTCPFastOpen() const OVERRIDE; |
| 80 virtual int64 NumBytesRead() const; | 80 virtual int64 NumBytesRead() const OVERRIDE; |
| 81 virtual base::TimeDelta GetConnectTimeMicros() const; | 81 virtual base::TimeDelta GetConnectTimeMicros() const OVERRIDE; |
| 82 | 82 |
| 83 // Socket methods: | 83 // Socket methods: |
| 84 virtual int Read(IOBuffer* buf, int buf_len, OldCompletionCallback* callback); | 84 virtual int Read(IOBuffer* buf, |
| 85 int buf_len, |
| 86 OldCompletionCallback* callback) OVERRIDE; |
| 85 virtual int Write(IOBuffer* buf, | 87 virtual int Write(IOBuffer* buf, |
| 86 int buf_len, | 88 int buf_len, |
| 87 OldCompletionCallback* callback); | 89 OldCompletionCallback* callback) OVERRIDE; |
| 88 virtual bool SetReceiveBufferSize(int32 size); | 90 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE; |
| 89 virtual bool SetSendBufferSize(int32 size); | 91 virtual bool SetSendBufferSize(int32 size) OVERRIDE; |
| 90 virtual int GetPeerAddress(AddressList* address) const; | 92 virtual int GetPeerAddress(AddressList* address) const OVERRIDE; |
| 91 virtual int GetLocalAddress(IPEndPoint* address) const; | 93 virtual int GetLocalAddress(IPEndPoint* address) const OVERRIDE; |
| 92 | 94 |
| 93 private: | 95 private: |
| 94 enum State { | 96 enum State { |
| 95 STATE_NONE, | 97 STATE_NONE, |
| 96 STATE_GENERATE_AUTH_TOKEN, | 98 STATE_GENERATE_AUTH_TOKEN, |
| 97 STATE_GENERATE_AUTH_TOKEN_COMPLETE, | 99 STATE_GENERATE_AUTH_TOKEN_COMPLETE, |
| 98 STATE_SEND_REQUEST, | 100 STATE_SEND_REQUEST, |
| 99 STATE_SEND_REQUEST_COMPLETE, | 101 STATE_SEND_REQUEST_COMPLETE, |
| 100 STATE_READ_HEADERS, | 102 STATE_READ_HEADERS, |
| 101 STATE_READ_HEADERS_COMPLETE, | 103 STATE_READ_HEADERS_COMPLETE, |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 HttpRequestHeaders request_headers_; | 165 HttpRequestHeaders request_headers_; |
| 164 | 166 |
| 165 const BoundNetLog net_log_; | 167 const BoundNetLog net_log_; |
| 166 | 168 |
| 167 DISALLOW_COPY_AND_ASSIGN(HttpProxyClientSocket); | 169 DISALLOW_COPY_AND_ASSIGN(HttpProxyClientSocket); |
| 168 }; | 170 }; |
| 169 | 171 |
| 170 } // namespace net | 172 } // namespace net |
| 171 | 173 |
| 172 #endif // NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_H_ | 174 #endif // NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_H_ |
| OLD | NEW |