OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "net/base/io_buffer.h" | 9 #include "net/base/io_buffer.h" |
10 #include "net/base/net_log.h" | 10 #include "net/base/net_log.h" |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 } | 133 } |
134 | 134 |
135 bool SOCKSClientSocket::IsConnected() const { | 135 bool SOCKSClientSocket::IsConnected() const { |
136 return completed_handshake_ && transport_->socket()->IsConnected(); | 136 return completed_handshake_ && transport_->socket()->IsConnected(); |
137 } | 137 } |
138 | 138 |
139 bool SOCKSClientSocket::IsConnectedAndIdle() const { | 139 bool SOCKSClientSocket::IsConnectedAndIdle() const { |
140 return completed_handshake_ && transport_->socket()->IsConnectedAndIdle(); | 140 return completed_handshake_ && transport_->socket()->IsConnectedAndIdle(); |
141 } | 141 } |
142 | 142 |
| 143 const BoundNetLog& SOCKSClientSocket::NetLog() const { |
| 144 return net_log_; |
| 145 } |
| 146 |
143 void SOCKSClientSocket::SetSubresourceSpeculation() { | 147 void SOCKSClientSocket::SetSubresourceSpeculation() { |
144 if (transport_.get() && transport_->socket()) { | 148 if (transport_.get() && transport_->socket()) { |
145 transport_->socket()->SetSubresourceSpeculation(); | 149 transport_->socket()->SetSubresourceSpeculation(); |
146 } else { | 150 } else { |
147 NOTREACHED(); | 151 NOTREACHED(); |
148 } | 152 } |
149 } | 153 } |
150 | 154 |
151 void SOCKSClientSocket::SetOmniboxSpeculation() { | 155 void SOCKSClientSocket::SetOmniboxSpeculation() { |
152 if (transport_.get() && transport_->socket()) { | 156 if (transport_.get() && transport_->socket()) { |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
445 } | 449 } |
446 | 450 |
447 // Note: we ignore the last 6 bytes as specified by the SOCKS protocol | 451 // Note: we ignore the last 6 bytes as specified by the SOCKS protocol |
448 } | 452 } |
449 | 453 |
450 int SOCKSClientSocket::GetPeerAddress(AddressList* address) const { | 454 int SOCKSClientSocket::GetPeerAddress(AddressList* address) const { |
451 return transport_->socket()->GetPeerAddress(address); | 455 return transport_->socket()->GetPeerAddress(address); |
452 } | 456 } |
453 | 457 |
454 } // namespace net | 458 } // namespace net |
OLD | NEW |