| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 if (write_bytes_outstanding_ > 0) { | 221 if (write_bytes_outstanding_ > 0) { |
| 222 write_callback_ = callback; | 222 write_callback_ = callback; |
| 223 write_buffer_len_ = buf_len; | 223 write_buffer_len_ = buf_len; |
| 224 return ERR_IO_PENDING; | 224 return ERR_IO_PENDING; |
| 225 } else { | 225 } else { |
| 226 return buf_len; | 226 return buf_len; |
| 227 } | 227 } |
| 228 } | 228 } |
| 229 | 229 |
| 230 bool SpdyProxyClientSocket::SetReceiveBufferSize(int32 size) { | 230 bool SpdyProxyClientSocket::SetReceiveBufferSize(int32 size) { |
| 231 // Since this ClientSocket sits on top of a shared SpdySession, it | 231 // Since this StreamSocket sits on top of a shared SpdySession, it |
| 232 // is not safe for callers to set change this underlying socket. | 232 // is not safe for callers to set change this underlying socket. |
| 233 return false; | 233 return false; |
| 234 } | 234 } |
| 235 | 235 |
| 236 bool SpdyProxyClientSocket::SetSendBufferSize(int32 size) { | 236 bool SpdyProxyClientSocket::SetSendBufferSize(int32 size) { |
| 237 // Since this ClientSocket sits on top of a shared SpdySession, it | 237 // Since this StreamSocket sits on top of a shared SpdySession, it |
| 238 // is not safe for callers to set change this underlying socket. | 238 // is not safe for callers to set change this underlying socket. |
| 239 return false; | 239 return false; |
| 240 } | 240 } |
| 241 | 241 |
| 242 int SpdyProxyClientSocket::GetPeerAddress(AddressList* address) const { | 242 int SpdyProxyClientSocket::GetPeerAddress(AddressList* address) const { |
| 243 if (!IsConnected()) | 243 if (!IsConnected()) |
| 244 return ERR_SOCKET_NOT_CONNECTED; | 244 return ERR_SOCKET_NOT_CONNECTED; |
| 245 return spdy_stream_->GetPeerAddress(address); | 245 return spdy_stream_->GetPeerAddress(address); |
| 246 } | 246 } |
| 247 | 247 |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 501 OnDataReceived(NULL, 0); | 501 OnDataReceived(NULL, 0); |
| 502 } | 502 } |
| 503 if (write_callback) | 503 if (write_callback) |
| 504 write_callback->Run(ERR_CONNECTION_CLOSED); | 504 write_callback->Run(ERR_CONNECTION_CLOSED); |
| 505 } | 505 } |
| 506 | 506 |
| 507 void SpdyProxyClientSocket::set_chunk_callback(ChunkCallback* /*callback*/) { | 507 void SpdyProxyClientSocket::set_chunk_callback(ChunkCallback* /*callback*/) { |
| 508 } | 508 } |
| 509 | 509 |
| 510 } // namespace net | 510 } // namespace net |
| OLD | NEW |