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