| 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 #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/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 } | 131 } |
| 132 | 132 |
| 133 bool SpdyProxyClientSocket::WasEverUsed() const { | 133 bool SpdyProxyClientSocket::WasEverUsed() const { |
| 134 return was_ever_used_ || (spdy_stream_ && spdy_stream_->WasEverUsed()); | 134 return was_ever_used_ || (spdy_stream_ && spdy_stream_->WasEverUsed()); |
| 135 } | 135 } |
| 136 | 136 |
| 137 bool SpdyProxyClientSocket::UsingTCPFastOpen() const { | 137 bool SpdyProxyClientSocket::UsingTCPFastOpen() const { |
| 138 return false; | 138 return false; |
| 139 } | 139 } |
| 140 | 140 |
| 141 int64 SpdyProxyClientSocket::NumBytesRead() const { | |
| 142 return -1; | |
| 143 } | |
| 144 | |
| 145 base::TimeDelta SpdyProxyClientSocket::GetConnectTimeMicros() const { | |
| 146 return base::TimeDelta::FromMicroseconds(-1); | |
| 147 } | |
| 148 | |
| 149 int SpdyProxyClientSocket::Read(IOBuffer* buf, int buf_len, | 141 int SpdyProxyClientSocket::Read(IOBuffer* buf, int buf_len, |
| 150 CompletionCallback* callback) { | 142 CompletionCallback* callback) { |
| 151 DCHECK(!read_callback_); | 143 DCHECK(!read_callback_); |
| 152 DCHECK(!user_buffer_); | 144 DCHECK(!user_buffer_); |
| 153 | 145 |
| 154 if (next_state_ == STATE_DISCONNECTED) | 146 if (next_state_ == STATE_DISCONNECTED) |
| 155 return ERR_SOCKET_NOT_CONNECTED; | 147 return ERR_SOCKET_NOT_CONNECTED; |
| 156 | 148 |
| 157 if (!spdy_stream_ && read_buffer_.empty()) { | 149 if (!spdy_stream_ && read_buffer_.empty()) { |
| 158 if (eof_has_been_read_) | 150 if (eof_has_been_read_) |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 510 OnDataReceived(NULL, 0); | 502 OnDataReceived(NULL, 0); |
| 511 } | 503 } |
| 512 if (write_callback) | 504 if (write_callback) |
| 513 write_callback->Run(ERR_CONNECTION_CLOSED); | 505 write_callback->Run(ERR_CONNECTION_CLOSED); |
| 514 } | 506 } |
| 515 | 507 |
| 516 void SpdyProxyClientSocket::set_chunk_callback(ChunkCallback* /*callback*/) { | 508 void SpdyProxyClientSocket::set_chunk_callback(ChunkCallback* /*callback*/) { |
| 517 } | 509 } |
| 518 | 510 |
| 519 } // namespace net | 511 } // namespace net |
| OLD | NEW |