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