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

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

Issue 1096203006: Collect all ConnectionAttempts from both sockets in TransportConnectJob. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@domrel_serverip1
Patch Set: Return fake ConnectionAttempt in MockTCPClientSocket Created 5 years, 7 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
« no previous file with comments | « net/socket/socks5_client_socket.h ('k') | net/socket/socks_client_socket.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/format_macros.h" 10 #include "base/format_macros.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 NOTREACHED(); 137 NOTREACHED();
138 return kProtoUnknown; 138 return kProtoUnknown;
139 } 139 }
140 140
141 bool SOCKS5ClientSocket::GetSSLInfo(SSLInfo* ssl_info) { 141 bool SOCKS5ClientSocket::GetSSLInfo(SSLInfo* ssl_info) {
142 if (transport_.get() && transport_->socket()) { 142 if (transport_.get() && transport_->socket()) {
143 return transport_->socket()->GetSSLInfo(ssl_info); 143 return transport_->socket()->GetSSLInfo(ssl_info);
144 } 144 }
145 NOTREACHED(); 145 NOTREACHED();
146 return false; 146 return false;
147 }
147 148
149 void SOCKS5ClientSocket::GetConnectionAttempts(ConnectionAttempts* out) const {
150 out->clear();
148 } 151 }
149 152
150 // Read is called by the transport layer above to read. This can only be done 153 // Read is called by the transport layer above to read. This can only be done
151 // if the SOCKS handshake is complete. 154 // if the SOCKS handshake is complete.
152 int SOCKS5ClientSocket::Read(IOBuffer* buf, int buf_len, 155 int SOCKS5ClientSocket::Read(IOBuffer* buf, int buf_len,
153 const CompletionCallback& callback) { 156 const CompletionCallback& callback) {
154 DCHECK(completed_handshake_); 157 DCHECK(completed_handshake_);
155 DCHECK_EQ(STATE_NONE, next_state_); 158 DCHECK_EQ(STATE_NONE, next_state_);
156 DCHECK(user_callback_.is_null()); 159 DCHECK(user_callback_.is_null());
157 DCHECK(!callback.is_null()); 160 DCHECK(!callback.is_null());
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 500
498 int SOCKS5ClientSocket::GetPeerAddress(IPEndPoint* address) const { 501 int SOCKS5ClientSocket::GetPeerAddress(IPEndPoint* address) const {
499 return transport_->socket()->GetPeerAddress(address); 502 return transport_->socket()->GetPeerAddress(address);
500 } 503 }
501 504
502 int SOCKS5ClientSocket::GetLocalAddress(IPEndPoint* address) const { 505 int SOCKS5ClientSocket::GetLocalAddress(IPEndPoint* address) const {
503 return transport_->socket()->GetLocalAddress(address); 506 return transport_->socket()->GetLocalAddress(address);
504 } 507 }
505 508
506 } // namespace net 509 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/socks5_client_socket.h ('k') | net/socket/socks_client_socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698