| 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_SPDY_SPDY_PROXY_CLIENT_SOCKET_H_ | 5 #ifndef NET_SPDY_SPDY_PROXY_CLIENT_SOCKET_H_ |
| 6 #define NET_SPDY_SPDY_PROXY_CLIENT_SOCKET_H_ | 6 #define NET_SPDY_SPDY_PROXY_CLIENT_SOCKET_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <list> | 10 #include <list> |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 // Socket implementation. | 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, | 81 virtual int Read(IOBuffer* buf, |
| 82 int buf_len, | 82 int buf_len, |
| 83 const CompletionCallback& callback) OVERRIDE; | 83 const CompletionCallback& callback) OVERRIDE; |
| 84 virtual int Write(IOBuffer* buf, | 84 virtual int Write(IOBuffer* buf, |
| 85 int buf_len, | 85 int buf_len, |
| 86 OldCompletionCallback* callback) OVERRIDE; | 86 OldCompletionCallback* callback) OVERRIDE; |
| 87 virtual int Write(IOBuffer* buf, |
| 88 int buf_len, |
| 89 const CompletionCallback& callback) OVERRIDE; |
| 87 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE; | 90 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE; |
| 88 virtual bool SetSendBufferSize(int32 size) OVERRIDE; | 91 virtual bool SetSendBufferSize(int32 size) OVERRIDE; |
| 89 virtual int GetPeerAddress(AddressList* address) const OVERRIDE; | 92 virtual int GetPeerAddress(AddressList* address) const OVERRIDE; |
| 90 virtual int GetLocalAddress(IPEndPoint* address) const OVERRIDE; | 93 virtual int GetLocalAddress(IPEndPoint* address) const OVERRIDE; |
| 91 | 94 |
| 92 // SpdyStream::Delegate implementation. | 95 // SpdyStream::Delegate implementation. |
| 93 virtual bool OnSendHeadersComplete(int status) OVERRIDE; | 96 virtual bool OnSendHeadersComplete(int status) OVERRIDE; |
| 94 virtual int OnSendBody() OVERRIDE; | 97 virtual int OnSendBody() OVERRIDE; |
| 95 virtual int OnSendBodyComplete(int status, bool* eof) OVERRIDE; | 98 virtual int OnSendBodyComplete(int status, bool* eof) OVERRIDE; |
| 96 virtual int OnResponseReceived(const spdy::SpdyHeaderBlock& response, | 99 virtual int OnResponseReceived(const spdy::SpdyHeaderBlock& response, |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 State next_state_; | 133 State next_state_; |
| 131 | 134 |
| 132 // Pointer to the SPDY Stream that this sits on top of. | 135 // Pointer to the SPDY Stream that this sits on top of. |
| 133 scoped_refptr<SpdyStream> spdy_stream_; | 136 scoped_refptr<SpdyStream> spdy_stream_; |
| 134 | 137 |
| 135 // Stores the callback to the layer above, called on completing Read() or | 138 // Stores the callback to the layer above, called on completing Read() or |
| 136 // Connect(). | 139 // Connect(). |
| 137 OldCompletionCallback* old_read_callback_; | 140 OldCompletionCallback* old_read_callback_; |
| 138 CompletionCallback read_callback_; | 141 CompletionCallback read_callback_; |
| 139 // Stores the callback to the layer above, called on completing Write(). | 142 // Stores the callback to the layer above, called on completing Write(). |
| 140 OldCompletionCallback* write_callback_; | 143 OldCompletionCallback* old_write_callback_; |
| 144 CompletionCallback write_callback_; |
| 141 | 145 |
| 142 // CONNECT request and response. | 146 // CONNECT request and response. |
| 143 HttpRequestInfo request_; | 147 HttpRequestInfo request_; |
| 144 HttpResponseInfo response_; | 148 HttpResponseInfo response_; |
| 145 | 149 |
| 146 // The hostname and port of the endpoint. This is not necessarily the one | 150 // The hostname and port of the endpoint. This is not necessarily the one |
| 147 // specified by the URL, due to Alternate-Protocol or fixed testing ports. | 151 // specified by the URL, due to Alternate-Protocol or fixed testing ports. |
| 148 const HostPortPair endpoint_; | 152 const HostPortPair endpoint_; |
| 149 scoped_refptr<HttpAuthController> auth_; | 153 scoped_refptr<HttpAuthController> auth_; |
| 150 | 154 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 167 base::WeakPtrFactory<SpdyProxyClientSocket> weak_factory_; | 171 base::WeakPtrFactory<SpdyProxyClientSocket> weak_factory_; |
| 168 | 172 |
| 169 const BoundNetLog net_log_; | 173 const BoundNetLog net_log_; |
| 170 | 174 |
| 171 DISALLOW_COPY_AND_ASSIGN(SpdyProxyClientSocket); | 175 DISALLOW_COPY_AND_ASSIGN(SpdyProxyClientSocket); |
| 172 }; | 176 }; |
| 173 | 177 |
| 174 } // namespace net | 178 } // namespace net |
| 175 | 179 |
| 176 #endif // NET_SPDY_SPDY_PROXY_CLIENT_SOCKET_H_ | 180 #endif // NET_SPDY_SPDY_PROXY_CLIENT_SOCKET_H_ |
| OLD | NEW |