| 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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 // is not safe for callers to set change this underlying socket. | 268 // is not safe for callers to set change this underlying socket. |
| 269 return false; | 269 return false; |
| 270 } | 270 } |
| 271 | 271 |
| 272 bool SpdyProxyClientSocket::SetSendBufferSize(int32 size) { | 272 bool SpdyProxyClientSocket::SetSendBufferSize(int32 size) { |
| 273 // Since this StreamSocket sits on top of a shared SpdySession, it | 273 // Since this StreamSocket sits on top of a shared SpdySession, it |
| 274 // is not safe for callers to set change this underlying socket. | 274 // is not safe for callers to set change this underlying socket. |
| 275 return false; | 275 return false; |
| 276 } | 276 } |
| 277 | 277 |
| 278 int SpdyProxyClientSocket::GetPeerAddress(AddressList* address) const { | 278 int SpdyProxyClientSocket::GetPeerAddress(IPEndPoint* address) const { |
| 279 if (!IsConnected()) | 279 if (!IsConnected()) |
| 280 return ERR_SOCKET_NOT_CONNECTED; | 280 return ERR_SOCKET_NOT_CONNECTED; |
| 281 return spdy_stream_->GetPeerAddress(address); | 281 return spdy_stream_->GetPeerAddress(address); |
| 282 } | 282 } |
| 283 | 283 |
| 284 int SpdyProxyClientSocket::GetLocalAddress(IPEndPoint* address) const { | 284 int SpdyProxyClientSocket::GetLocalAddress(IPEndPoint* address) const { |
| 285 if (!IsConnected()) | 285 if (!IsConnected()) |
| 286 return ERR_SOCKET_NOT_CONNECTED; | 286 return ERR_SOCKET_NOT_CONNECTED; |
| 287 return spdy_stream_->GetLocalAddress(address); | 287 return spdy_stream_->GetLocalAddress(address); |
| 288 } | 288 } |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 547 } | 547 } |
| 548 // This may have been deleted by read_callback_, so check first. | 548 // This may have been deleted by read_callback_, so check first. |
| 549 if (weak_ptr && !write_callback.is_null()) | 549 if (weak_ptr && !write_callback.is_null()) |
| 550 write_callback.Run(ERR_CONNECTION_CLOSED); | 550 write_callback.Run(ERR_CONNECTION_CLOSED); |
| 551 } | 551 } |
| 552 | 552 |
| 553 void SpdyProxyClientSocket::set_chunk_callback(ChunkCallback* /*callback*/) { | 553 void SpdyProxyClientSocket::set_chunk_callback(ChunkCallback* /*callback*/) { |
| 554 } | 554 } |
| 555 | 555 |
| 556 } // namespace net | 556 } // namespace net |
| OLD | NEW |