| 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 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 // is not safe for callers to change this underlying socket. | 245 // is not safe for callers to change this underlying socket. |
| 246 return ERR_NOT_IMPLEMENTED; | 246 return ERR_NOT_IMPLEMENTED; |
| 247 } | 247 } |
| 248 | 248 |
| 249 int SpdyProxyClientSocket::SetSendBufferSize(int32_t size) { | 249 int SpdyProxyClientSocket::SetSendBufferSize(int32_t size) { |
| 250 // Since this StreamSocket sits on top of a shared SpdySession, it | 250 // Since this StreamSocket sits on top of a shared SpdySession, it |
| 251 // is not safe for callers to change this underlying socket. | 251 // is not safe for callers to change this underlying socket. |
| 252 return ERR_NOT_IMPLEMENTED; | 252 return ERR_NOT_IMPLEMENTED; |
| 253 } | 253 } |
| 254 | 254 |
| 255 int SpdyProxyClientSocket::SetDoNotFragment(bool do_not_fragment) { |
| 256 // Since this StreamSocket sits on top of a shared SpdySession, it |
| 257 // is not safe for callers to change this underlying socket. |
| 258 return ERR_NOT_IMPLEMENTED; |
| 259 } |
| 260 |
| 255 int SpdyProxyClientSocket::GetPeerAddress(IPEndPoint* address) const { | 261 int SpdyProxyClientSocket::GetPeerAddress(IPEndPoint* address) const { |
| 256 if (!IsConnected()) | 262 if (!IsConnected()) |
| 257 return ERR_SOCKET_NOT_CONNECTED; | 263 return ERR_SOCKET_NOT_CONNECTED; |
| 258 return spdy_stream_->GetPeerAddress(address); | 264 return spdy_stream_->GetPeerAddress(address); |
| 259 } | 265 } |
| 260 | 266 |
| 261 int SpdyProxyClientSocket::GetLocalAddress(IPEndPoint* address) const { | 267 int SpdyProxyClientSocket::GetLocalAddress(IPEndPoint* address) const { |
| 262 if (!IsConnected()) | 268 if (!IsConnected()) |
| 263 return ERR_SOCKET_NOT_CONNECTED; | 269 return ERR_SOCKET_NOT_CONNECTED; |
| 264 return spdy_stream_->GetLocalAddress(address); | 270 return spdy_stream_->GetLocalAddress(address); |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 524 } else if (!read_callback_.is_null()) { | 530 } else if (!read_callback_.is_null()) { |
| 525 // If we have a read_callback_, the we need to make sure we call it back. | 531 // If we have a read_callback_, the we need to make sure we call it back. |
| 526 OnDataReceived(std::unique_ptr<SpdyBuffer>()); | 532 OnDataReceived(std::unique_ptr<SpdyBuffer>()); |
| 527 } | 533 } |
| 528 // This may have been deleted by read_callback_, so check first. | 534 // This may have been deleted by read_callback_, so check first. |
| 529 if (weak_ptr.get() && !write_callback.is_null()) | 535 if (weak_ptr.get() && !write_callback.is_null()) |
| 530 write_callback.Run(ERR_CONNECTION_CLOSED); | 536 write_callback.Run(ERR_CONNECTION_CLOSED); |
| 531 } | 537 } |
| 532 | 538 |
| 533 } // namespace net | 539 } // namespace net |
| OLD | NEW |