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/socks_client_socket.h" | 5 #include "net/socket/socks_client_socket.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 } | 112 } |
113 | 113 |
114 bool SOCKSClientSocket::IsConnected() const { | 114 bool SOCKSClientSocket::IsConnected() const { |
115 return completed_handshake_ && transport_->socket()->IsConnected(); | 115 return completed_handshake_ && transport_->socket()->IsConnected(); |
116 } | 116 } |
117 | 117 |
118 bool SOCKSClientSocket::IsConnectedAndIdle() const { | 118 bool SOCKSClientSocket::IsConnectedAndIdle() const { |
119 return completed_handshake_ && transport_->socket()->IsConnectedAndIdle(); | 119 return completed_handshake_ && transport_->socket()->IsConnectedAndIdle(); |
120 } | 120 } |
121 | 121 |
122 const BoundNetLog& SOCKSClientSocket::NetLog() const { | 122 const NetLogWithSource& SOCKSClientSocket::NetLog() const { |
123 return net_log_; | 123 return net_log_; |
124 } | 124 } |
125 | 125 |
126 void SOCKSClientSocket::SetSubresourceSpeculation() { | 126 void SOCKSClientSocket::SetSubresourceSpeculation() { |
127 if (transport_.get() && transport_->socket()) { | 127 if (transport_.get() && transport_->socket()) { |
128 transport_->socket()->SetSubresourceSpeculation(); | 128 transport_->socket()->SetSubresourceSpeculation(); |
129 } else { | 129 } else { |
130 NOTREACHED(); | 130 NOTREACHED(); |
131 } | 131 } |
132 } | 132 } |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
445 | 445 |
446 int SOCKSClientSocket::GetPeerAddress(IPEndPoint* address) const { | 446 int SOCKSClientSocket::GetPeerAddress(IPEndPoint* address) const { |
447 return transport_->socket()->GetPeerAddress(address); | 447 return transport_->socket()->GetPeerAddress(address); |
448 } | 448 } |
449 | 449 |
450 int SOCKSClientSocket::GetLocalAddress(IPEndPoint* address) const { | 450 int SOCKSClientSocket::GetLocalAddress(IPEndPoint* address) const { |
451 return transport_->socket()->GetLocalAddress(address); | 451 return transport_->socket()->GetLocalAddress(address); |
452 } | 452 } |
453 | 453 |
454 } // namespace net | 454 } // namespace net |
OLD | NEW |