| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/http/http_proxy_client_socket_wrapper.h" | 5 #include "net/http/http_proxy_client_socket_wrapper.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 return transport_socket_->SetReceiveBufferSize(size); | 296 return transport_socket_->SetReceiveBufferSize(size); |
| 297 return ERR_SOCKET_NOT_CONNECTED; | 297 return ERR_SOCKET_NOT_CONNECTED; |
| 298 } | 298 } |
| 299 | 299 |
| 300 int HttpProxyClientSocketWrapper::SetSendBufferSize(int32_t size) { | 300 int HttpProxyClientSocketWrapper::SetSendBufferSize(int32_t size) { |
| 301 if (transport_socket_) | 301 if (transport_socket_) |
| 302 return transport_socket_->SetSendBufferSize(size); | 302 return transport_socket_->SetSendBufferSize(size); |
| 303 return ERR_SOCKET_NOT_CONNECTED; | 303 return ERR_SOCKET_NOT_CONNECTED; |
| 304 } | 304 } |
| 305 | 305 |
| 306 int HttpProxyClientSocketWrapper::SetDoNotFragment(bool do_not_fragment) { |
| 307 if (transport_socket_) |
| 308 return transport_socket_->SetDoNotFragment(do_not_fragment); |
| 309 return ERR_SOCKET_NOT_CONNECTED; |
| 310 } |
| 311 |
| 306 int HttpProxyClientSocketWrapper::GetPeerAddress(IPEndPoint* address) const { | 312 int HttpProxyClientSocketWrapper::GetPeerAddress(IPEndPoint* address) const { |
| 307 if (transport_socket_) | 313 if (transport_socket_) |
| 308 return transport_socket_->GetPeerAddress(address); | 314 return transport_socket_->GetPeerAddress(address); |
| 309 return ERR_SOCKET_NOT_CONNECTED; | 315 return ERR_SOCKET_NOT_CONNECTED; |
| 310 } | 316 } |
| 311 | 317 |
| 312 int HttpProxyClientSocketWrapper::GetLocalAddress(IPEndPoint* address) const { | 318 int HttpProxyClientSocketWrapper::GetLocalAddress(IPEndPoint* address) const { |
| 313 if (transport_socket_) | 319 if (transport_socket_) |
| 314 return transport_socket_->GetLocalAddress(address); | 320 return transport_socket_->GetLocalAddress(address); |
| 315 return ERR_SOCKET_NOT_CONNECTED; | 321 return ERR_SOCKET_NOT_CONNECTED; |
| (...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 620 const HostResolver::RequestInfo& | 626 const HostResolver::RequestInfo& |
| 621 HttpProxyClientSocketWrapper::GetDestination() { | 627 HttpProxyClientSocketWrapper::GetDestination() { |
| 622 if (transport_params_) { | 628 if (transport_params_) { |
| 623 return transport_params_->destination(); | 629 return transport_params_->destination(); |
| 624 } else { | 630 } else { |
| 625 return ssl_params_->GetDirectConnectionParams()->destination(); | 631 return ssl_params_->GetDirectConnectionParams()->destination(); |
| 626 } | 632 } |
| 627 } | 633 } |
| 628 | 634 |
| 629 } // namespace net | 635 } // namespace net |
| OLD | NEW |