| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "jingle/notifier/base/proxy_resolving_client_socket.h" | 5 #include "jingle/notifier/base/proxy_resolving_client_socket.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 return net::ERR_SOCKET_NOT_CONNECTED; | 82 return net::ERR_SOCKET_NOT_CONNECTED; |
| 83 } | 83 } |
| 84 | 84 |
| 85 int ProxyResolvingClientSocket::Write(net::IOBuffer* buf, int buf_len, | 85 int ProxyResolvingClientSocket::Write(net::IOBuffer* buf, int buf_len, |
| 86 net::OldCompletionCallback* callback) { | 86 net::OldCompletionCallback* callback) { |
| 87 if (transport_.get() && transport_->socket()) | 87 if (transport_.get() && transport_->socket()) |
| 88 return transport_->socket()->Write(buf, buf_len, callback); | 88 return transport_->socket()->Write(buf, buf_len, callback); |
| 89 NOTREACHED(); | 89 NOTREACHED(); |
| 90 return net::ERR_SOCKET_NOT_CONNECTED; | 90 return net::ERR_SOCKET_NOT_CONNECTED; |
| 91 } | 91 } |
| 92 int ProxyResolvingClientSocket::Write(net::IOBuffer* buf, int buf_len, | |
| 93 const net::CompletionCallback& callback) { | |
| 94 if (transport_.get() && transport_->socket()) | |
| 95 return transport_->socket()->Write(buf, buf_len, callback); | |
| 96 NOTREACHED(); | |
| 97 return net::ERR_SOCKET_NOT_CONNECTED; | |
| 98 } | |
| 99 | 92 |
| 100 bool ProxyResolvingClientSocket::SetReceiveBufferSize(int32 size) { | 93 bool ProxyResolvingClientSocket::SetReceiveBufferSize(int32 size) { |
| 101 if (transport_.get() && transport_->socket()) | 94 if (transport_.get() && transport_->socket()) |
| 102 return transport_->socket()->SetReceiveBufferSize(size); | 95 return transport_->socket()->SetReceiveBufferSize(size); |
| 103 NOTREACHED(); | 96 NOTREACHED(); |
| 104 return false; | 97 return false; |
| 105 } | 98 } |
| 106 | 99 |
| 107 bool ProxyResolvingClientSocket::SetSendBufferSize(int32 size) { | 100 bool ProxyResolvingClientSocket::SetSendBufferSize(int32 size) { |
| 108 if (transport_.get() && transport_->socket()) | 101 if (transport_.get() && transport_->socket()) |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 418 return base::TimeDelta::FromMicroseconds(-1); | 411 return base::TimeDelta::FromMicroseconds(-1); |
| 419 } | 412 } |
| 420 | 413 |
| 421 void ProxyResolvingClientSocket::CloseTransportSocket() { | 414 void ProxyResolvingClientSocket::CloseTransportSocket() { |
| 422 if (transport_.get() && transport_->socket()) | 415 if (transport_.get() && transport_->socket()) |
| 423 transport_->socket()->Disconnect(); | 416 transport_->socket()->Disconnect(); |
| 424 transport_.reset(); | 417 transport_.reset(); |
| 425 } | 418 } |
| 426 | 419 |
| 427 } // namespace notifier | 420 } // namespace notifier |
| OLD | NEW |