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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 bool using_spdy() { | 53 bool using_spdy() { |
54 return using_spdy_; | 54 return using_spdy_; |
55 } | 55 } |
56 | 56 |
57 // ProxyClientSocket methods: | 57 // ProxyClientSocket implementation. |
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 implementation. | 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 int Connect(const CompletionCallback& callback) OVERRIDE; |
66 virtual void Disconnect() OVERRIDE; | 66 virtual void Disconnect() OVERRIDE; |
67 virtual bool IsConnected() const OVERRIDE; | 67 virtual bool IsConnected() const OVERRIDE; |
68 virtual bool IsConnectedAndIdle() const OVERRIDE; | 68 virtual bool IsConnectedAndIdle() const OVERRIDE; |
69 virtual const BoundNetLog& NetLog() const OVERRIDE; | 69 virtual const BoundNetLog& NetLog() const OVERRIDE; |
70 virtual void SetSubresourceSpeculation() OVERRIDE; | 70 virtual void SetSubresourceSpeculation() OVERRIDE; |
71 virtual void SetOmniboxSpeculation() OVERRIDE; | 71 virtual void SetOmniboxSpeculation() OVERRIDE; |
72 virtual bool WasEverUsed() const OVERRIDE; | 72 virtual bool WasEverUsed() const OVERRIDE; |
73 virtual bool UsingTCPFastOpen() const OVERRIDE; | 73 virtual bool UsingTCPFastOpen() const OVERRIDE; |
74 virtual int64 NumBytesRead() const OVERRIDE; | 74 virtual int64 NumBytesRead() const OVERRIDE; |
75 virtual base::TimeDelta GetConnectTimeMicros() const OVERRIDE; | 75 virtual base::TimeDelta GetConnectTimeMicros() const OVERRIDE; |
76 | 76 |
77 // Socket methods: | 77 // Socket implementation. |
78 virtual int Read(IOBuffer* buf, | 78 virtual int Read(IOBuffer* buf, |
79 int buf_len, | 79 int buf_len, |
80 OldCompletionCallback* callback) OVERRIDE; | 80 OldCompletionCallback* callback) OVERRIDE; |
| 81 virtual int Read(IOBuffer* buf, |
| 82 int buf_len, |
| 83 const CompletionCallback& callback) OVERRIDE; |
81 virtual int Write(IOBuffer* buf, | 84 virtual int Write(IOBuffer* buf, |
82 int buf_len, | 85 int buf_len, |
83 OldCompletionCallback* callback) OVERRIDE; | 86 OldCompletionCallback* callback) OVERRIDE; |
84 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE; | 87 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE; |
85 virtual bool SetSendBufferSize(int32 size) OVERRIDE; | 88 virtual bool SetSendBufferSize(int32 size) OVERRIDE; |
86 virtual int GetPeerAddress(AddressList* address) const OVERRIDE; | 89 virtual int GetPeerAddress(AddressList* address) const OVERRIDE; |
87 virtual int GetLocalAddress(IPEndPoint* address) const OVERRIDE; | 90 virtual int GetLocalAddress(IPEndPoint* address) const OVERRIDE; |
88 | 91 |
89 private: | 92 private: |
90 enum State { | 93 enum State { |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 HttpRequestHeaders request_headers_; | 157 HttpRequestHeaders request_headers_; |
155 | 158 |
156 const BoundNetLog net_log_; | 159 const BoundNetLog net_log_; |
157 | 160 |
158 DISALLOW_COPY_AND_ASSIGN(HttpProxyClientSocket); | 161 DISALLOW_COPY_AND_ASSIGN(HttpProxyClientSocket); |
159 }; | 162 }; |
160 | 163 |
161 } // namespace net | 164 } // namespace net |
162 | 165 |
163 #endif // NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_H_ | 166 #endif // NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_H_ |
OLD | NEW |