OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "net/spdy/spdy_proxy_client_socket.h" | 5 #include "net/spdy/spdy_proxy_client_socket.h" |
6 | 6 |
7 #include <algorithm> // min | 7 #include <algorithm> // min |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 } | 162 } |
163 | 163 |
164 int64 SpdyProxyClientSocket::NumBytesRead() const { | 164 int64 SpdyProxyClientSocket::NumBytesRead() const { |
165 return -1; | 165 return -1; |
166 } | 166 } |
167 | 167 |
168 base::TimeDelta SpdyProxyClientSocket::GetConnectTimeMicros() const { | 168 base::TimeDelta SpdyProxyClientSocket::GetConnectTimeMicros() const { |
169 return base::TimeDelta::FromMicroseconds(-1); | 169 return base::TimeDelta::FromMicroseconds(-1); |
170 } | 170 } |
171 | 171 |
| 172 NextProto SpdyProxyClientSocket::GetNegotiatedProtocol() const { |
| 173 return kProtoUnknown; |
| 174 } |
| 175 |
172 int SpdyProxyClientSocket::Read(IOBuffer* buf, int buf_len, | 176 int SpdyProxyClientSocket::Read(IOBuffer* buf, int buf_len, |
173 const CompletionCallback& callback) { | 177 const CompletionCallback& callback) { |
174 DCHECK(read_callback_.is_null()); | 178 DCHECK(read_callback_.is_null()); |
175 DCHECK(!user_buffer_); | 179 DCHECK(!user_buffer_); |
176 | 180 |
177 if (next_state_ == STATE_DISCONNECTED) | 181 if (next_state_ == STATE_DISCONNECTED) |
178 return ERR_SOCKET_NOT_CONNECTED; | 182 return ERR_SOCKET_NOT_CONNECTED; |
179 | 183 |
180 if (next_state_ == STATE_CLOSED && read_buffer_.empty()) { | 184 if (next_state_ == STATE_CLOSED && read_buffer_.empty()) { |
181 return 0; | 185 return 0; |
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
543 } | 547 } |
544 // This may have been deleted by read_callback_, so check first. | 548 // This may have been deleted by read_callback_, so check first. |
545 if (weak_ptr && !write_callback.is_null()) | 549 if (weak_ptr && !write_callback.is_null()) |
546 write_callback.Run(ERR_CONNECTION_CLOSED); | 550 write_callback.Run(ERR_CONNECTION_CLOSED); |
547 } | 551 } |
548 | 552 |
549 void SpdyProxyClientSocket::set_chunk_callback(ChunkCallback* /*callback*/) { | 553 void SpdyProxyClientSocket::set_chunk_callback(ChunkCallback* /*callback*/) { |
550 } | 554 } |
551 | 555 |
552 } // namespace net | 556 } // namespace net |
OLD | NEW |