| 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 "base/bind.h" |    7 #include "base/bind.h" | 
|    8 #include "base/bind_helpers.h" |    8 #include "base/bind_helpers.h" | 
|    9 #include "base/callback_helpers.h" |    9 #include "base/callback_helpers.h" | 
|   10 #include "base/memory/weak_ptr.h" |   10 #include "base/memory/weak_ptr.h" | 
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  287 } |  287 } | 
|  288  |  288  | 
|  289 int HttpProxyClientSocketWrapper::Write(IOBuffer* buf, |  289 int HttpProxyClientSocketWrapper::Write(IOBuffer* buf, | 
|  290                                         int buf_len, |  290                                         int buf_len, | 
|  291                                         const CompletionCallback& callback) { |  291                                         const CompletionCallback& callback) { | 
|  292   if (transport_socket_) |  292   if (transport_socket_) | 
|  293     return transport_socket_->Write(buf, buf_len, callback); |  293     return transport_socket_->Write(buf, buf_len, callback); | 
|  294   return ERR_SOCKET_NOT_CONNECTED; |  294   return ERR_SOCKET_NOT_CONNECTED; | 
|  295 } |  295 } | 
|  296  |  296  | 
|  297 int HttpProxyClientSocketWrapper::SetReceiveBufferSize(int32 size) { |  297 int HttpProxyClientSocketWrapper::SetReceiveBufferSize(int32_t size) { | 
|  298   // TODO(mmenke):  Should this persist across reconnects?  Seems a little |  298   // TODO(mmenke):  Should this persist across reconnects?  Seems a little | 
|  299   //     weird, and not done for normal reconnects. |  299   //     weird, and not done for normal reconnects. | 
|  300   if (transport_socket_) |  300   if (transport_socket_) | 
|  301     return transport_socket_->SetReceiveBufferSize(size); |  301     return transport_socket_->SetReceiveBufferSize(size); | 
|  302   return ERR_SOCKET_NOT_CONNECTED; |  302   return ERR_SOCKET_NOT_CONNECTED; | 
|  303 } |  303 } | 
|  304  |  304  | 
|  305 int HttpProxyClientSocketWrapper::SetSendBufferSize(int32 size) { |  305 int HttpProxyClientSocketWrapper::SetSendBufferSize(int32_t size) { | 
|  306   if (transport_socket_) |  306   if (transport_socket_) | 
|  307     return transport_socket_->SetSendBufferSize(size); |  307     return transport_socket_->SetSendBufferSize(size); | 
|  308   return ERR_SOCKET_NOT_CONNECTED; |  308   return ERR_SOCKET_NOT_CONNECTED; | 
|  309 } |  309 } | 
|  310  |  310  | 
|  311 int HttpProxyClientSocketWrapper::GetPeerAddress(IPEndPoint* address) const { |  311 int HttpProxyClientSocketWrapper::GetPeerAddress(IPEndPoint* address) const { | 
|  312   if (transport_socket_) |  312   if (transport_socket_) | 
|  313     return transport_socket_->GetPeerAddress(address); |  313     return transport_socket_->GetPeerAddress(address); | 
|  314   return ERR_SOCKET_NOT_CONNECTED; |  314   return ERR_SOCKET_NOT_CONNECTED; | 
|  315 } |  315 } | 
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  625 const HostResolver::RequestInfo& |  625 const HostResolver::RequestInfo& | 
|  626 HttpProxyClientSocketWrapper::GetDestination() { |  626 HttpProxyClientSocketWrapper::GetDestination() { | 
|  627   if (transport_params_) { |  627   if (transport_params_) { | 
|  628     return transport_params_->destination(); |  628     return transport_params_->destination(); | 
|  629   } else { |  629   } else { | 
|  630     return ssl_params_->GetDirectConnectionParams()->destination(); |  630     return ssl_params_->GetDirectConnectionParams()->destination(); | 
|  631   } |  631   } | 
|  632 } |  632 } | 
|  633  |  633  | 
|  634 }  // namespace net |  634 }  // namespace net | 
| OLD | NEW |