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

Side by Side Diff: net/socket/socks_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/socks_client_socket.h ('k') | net/socket/ssl_client_socket_nss.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/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/bind.h" 8 #include "base/bind.h"
9 #include "base/callback_helpers.h" 9 #include "base/callback_helpers.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 NOTREACHED(); 165 NOTREACHED();
166 return kProtoUnknown; 166 return kProtoUnknown;
167 } 167 }
168 168
169 bool SOCKSClientSocket::GetSSLInfo(SSLInfo* ssl_info) { 169 bool SOCKSClientSocket::GetSSLInfo(SSLInfo* ssl_info) {
170 if (transport_.get() && transport_->socket()) { 170 if (transport_.get() && transport_->socket()) {
171 return transport_->socket()->GetSSLInfo(ssl_info); 171 return transport_->socket()->GetSSLInfo(ssl_info);
172 } 172 }
173 NOTREACHED(); 173 NOTREACHED();
174 return false; 174 return false;
175 }
175 176
177 void SOCKSClientSocket::GetConnectionAttempts(ConnectionAttempts* out) const {
178 out->clear();
176 } 179 }
177 180
178 // Read is called by the transport layer above to read. This can only be done 181 // Read is called by the transport layer above to read. This can only be done
179 // if the SOCKS handshake is complete. 182 // if the SOCKS handshake is complete.
180 int SOCKSClientSocket::Read(IOBuffer* buf, int buf_len, 183 int SOCKSClientSocket::Read(IOBuffer* buf, int buf_len,
181 const CompletionCallback& callback) { 184 const CompletionCallback& callback) {
182 DCHECK(completed_handshake_); 185 DCHECK(completed_handshake_);
183 DCHECK_EQ(STATE_NONE, next_state_); 186 DCHECK_EQ(STATE_NONE, next_state_);
184 DCHECK(user_callback_.is_null()); 187 DCHECK(user_callback_.is_null());
185 DCHECK(!callback.is_null()); 188 DCHECK(!callback.is_null());
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 449
447 int SOCKSClientSocket::GetPeerAddress(IPEndPoint* address) const { 450 int SOCKSClientSocket::GetPeerAddress(IPEndPoint* address) const {
448 return transport_->socket()->GetPeerAddress(address); 451 return transport_->socket()->GetPeerAddress(address);
449 } 452 }
450 453
451 int SOCKSClientSocket::GetLocalAddress(IPEndPoint* address) const { 454 int SOCKSClientSocket::GetLocalAddress(IPEndPoint* address) const {
452 return transport_->socket()->GetLocalAddress(address); 455 return transport_->socket()->GetLocalAddress(address);
453 } 456 }
454 457
455 } // namespace net 458 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/socks_client_socket.h ('k') | net/socket/ssl_client_socket_nss.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698