Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(151)

Side by Side Diff: net/socket/socks5_client_socket.cc

Issue 9958028: Add a new GetNegotiatedProtocol method to StreamSocket and implement in all subclasses. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 } 151 }
152 152
153 base::TimeDelta SOCKS5ClientSocket::GetConnectTimeMicros() const { 153 base::TimeDelta SOCKS5ClientSocket::GetConnectTimeMicros() const {
154 if (transport_.get() && transport_->socket()) { 154 if (transport_.get() && transport_->socket()) {
155 return transport_->socket()->GetConnectTimeMicros(); 155 return transport_->socket()->GetConnectTimeMicros();
156 } 156 }
157 NOTREACHED(); 157 NOTREACHED();
158 return base::TimeDelta::FromMicroseconds(-1); 158 return base::TimeDelta::FromMicroseconds(-1);
159 } 159 }
160 160
161 NextProto SOCKS5ClientSocket::GetNegotiatedProtocol() const {
162 return kProtoUnknown;
163 }
164
wtc 2012/03/30 21:19:14 Nit: remove one blank line.
Ryan Hamilton 2012/03/30 21:53:17 Done.
165
161 // Read is called by the transport layer above to read. This can only be done 166 // Read is called by the transport layer above to read. This can only be done
162 // if the SOCKS handshake is complete. 167 // if the SOCKS handshake is complete.
163 int SOCKS5ClientSocket::Read(IOBuffer* buf, int buf_len, 168 int SOCKS5ClientSocket::Read(IOBuffer* buf, int buf_len,
164 const CompletionCallback& callback) { 169 const CompletionCallback& callback) {
165 DCHECK(completed_handshake_); 170 DCHECK(completed_handshake_);
166 DCHECK_EQ(STATE_NONE, next_state_); 171 DCHECK_EQ(STATE_NONE, next_state_);
167 DCHECK(user_callback_.is_null()); 172 DCHECK(user_callback_.is_null());
168 173
169 return transport_->socket()->Read(buf, buf_len, callback); 174 return transport_->socket()->Read(buf, buf_len, callback);
170 } 175 }
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 502
498 int SOCKS5ClientSocket::GetPeerAddress(AddressList* address) const { 503 int SOCKS5ClientSocket::GetPeerAddress(AddressList* address) const {
499 return transport_->socket()->GetPeerAddress(address); 504 return transport_->socket()->GetPeerAddress(address);
500 } 505 }
501 506
502 int SOCKS5ClientSocket::GetLocalAddress(IPEndPoint* address) const { 507 int SOCKS5ClientSocket::GetLocalAddress(IPEndPoint* address) const {
503 return transport_->socket()->GetLocalAddress(address); 508 return transport_->socket()->GetLocalAddress(address);
504 } 509 }
505 510
506 } // namespace net 511 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698