| 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/socket/socks5_client_socket.h" | 5 #include "net/socket/socks5_client_socket.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
| 10 #include "base/format_macros.h" | 10 #include "base/format_macros.h" |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 } | 135 } |
| 136 | 136 |
| 137 bool SOCKS5ClientSocket::UsingTCPFastOpen() const { | 137 bool SOCKS5ClientSocket::UsingTCPFastOpen() const { |
| 138 if (transport_.get() && transport_->socket()) { | 138 if (transport_.get() && transport_->socket()) { |
| 139 return transport_->socket()->UsingTCPFastOpen(); | 139 return transport_->socket()->UsingTCPFastOpen(); |
| 140 } | 140 } |
| 141 NOTREACHED(); | 141 NOTREACHED(); |
| 142 return false; | 142 return false; |
| 143 } | 143 } |
| 144 | 144 |
| 145 int64 SOCKS5ClientSocket::NumBytesRead() const { | |
| 146 if (transport_.get() && transport_->socket()) { | |
| 147 return transport_->socket()->NumBytesRead(); | |
| 148 } | |
| 149 NOTREACHED(); | |
| 150 return -1; | |
| 151 } | |
| 152 | |
| 153 base::TimeDelta SOCKS5ClientSocket::GetConnectTimeMicros() const { | |
| 154 if (transport_.get() && transport_->socket()) { | |
| 155 return transport_->socket()->GetConnectTimeMicros(); | |
| 156 } | |
| 157 NOTREACHED(); | |
| 158 return base::TimeDelta::FromMicroseconds(-1); | |
| 159 } | |
| 160 | |
| 161 bool SOCKS5ClientSocket::WasNpnNegotiated() const { | 145 bool SOCKS5ClientSocket::WasNpnNegotiated() const { |
| 162 if (transport_.get() && transport_->socket()) { | 146 if (transport_.get() && transport_->socket()) { |
| 163 return transport_->socket()->WasNpnNegotiated(); | 147 return transport_->socket()->WasNpnNegotiated(); |
| 164 } | 148 } |
| 165 NOTREACHED(); | 149 NOTREACHED(); |
| 166 return false; | 150 return false; |
| 167 } | 151 } |
| 168 | 152 |
| 169 NextProto SOCKS5ClientSocket::GetNegotiatedProtocol() const { | 153 NextProto SOCKS5ClientSocket::GetNegotiatedProtocol() const { |
| 170 if (transport_.get() && transport_->socket()) { | 154 if (transport_.get() && transport_->socket()) { |
| (...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 512 | 496 |
| 513 int SOCKS5ClientSocket::GetPeerAddress(IPEndPoint* address) const { | 497 int SOCKS5ClientSocket::GetPeerAddress(IPEndPoint* address) const { |
| 514 return transport_->socket()->GetPeerAddress(address); | 498 return transport_->socket()->GetPeerAddress(address); |
| 515 } | 499 } |
| 516 | 500 |
| 517 int SOCKS5ClientSocket::GetLocalAddress(IPEndPoint* address) const { | 501 int SOCKS5ClientSocket::GetLocalAddress(IPEndPoint* address) const { |
| 518 return transport_->socket()->GetLocalAddress(address); | 502 return transport_->socket()->GetLocalAddress(address); |
| 519 } | 503 } |
| 520 | 504 |
| 521 } // namespace net | 505 } // namespace net |
| OLD | NEW |