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

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

Issue 7255002: Revert 90373 - Warmth of a connection (cwnd) is estimated by the amount of data written to the so... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 6 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
« 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')
Property Changes:
Added: svn:mergeinfo
OLDNEW
1 // Copyright (c) 2011 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/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"
11 #include "base/string_util.h" 11 #include "base/string_util.h"
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 } 135 }
136 136
137 bool SOCKS5ClientSocket::UsingTCPFastOpen() const { 137 bool SOCKS5ClientSocket::UsingTCPFastOpen() const {
138 if (transport_.get() && transport_->socket()) { 138 if (transport_.get() && transport_->socket()) {
139 return transport_->socket()->UsingTCPFastOpen(); 139 return transport_->socket()->UsingTCPFastOpen();
140 } 140 }
141 NOTREACHED(); 141 NOTREACHED();
142 return false; 142 return false;
143 } 143 }
144 144
145 int64 SOCKS5ClientSocket::NumBytesRead() const {
146 if (transport_.get() && transport_->socket()) {
147 return transport_->socket()->NumBytesRead();
148 }
149 NOTREACHED();
150 return -1;
151 }
152
153 base::TimeDelta SOCKS5ClientSocket::GetConnectTimeMicros() const {
154 if (transport_.get() && transport_->socket()) {
155 return transport_->socket()->GetConnectTimeMicros();
156 }
157 NOTREACHED();
158 return base::TimeDelta::FromMicroseconds(-1);
159 }
160
161 // Read is called by the transport layer above to read. This can only be done 145 // Read is called by the transport layer above to read. This can only be done
162 // if the SOCKS handshake is complete. 146 // if the SOCKS handshake is complete.
163 int SOCKS5ClientSocket::Read(IOBuffer* buf, int buf_len, 147 int SOCKS5ClientSocket::Read(IOBuffer* buf, int buf_len,
164 CompletionCallback* callback) { 148 CompletionCallback* callback) {
165 DCHECK(completed_handshake_); 149 DCHECK(completed_handshake_);
166 DCHECK_EQ(STATE_NONE, next_state_); 150 DCHECK_EQ(STATE_NONE, next_state_);
167 DCHECK(!user_callback_); 151 DCHECK(!user_callback_);
168 152
169 return transport_->socket()->Read(buf, buf_len, callback); 153 return transport_->socket()->Read(buf, buf_len, callback);
170 } 154 }
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 481
498 int SOCKS5ClientSocket::GetPeerAddress(AddressList* address) const { 482 int SOCKS5ClientSocket::GetPeerAddress(AddressList* address) const {
499 return transport_->socket()->GetPeerAddress(address); 483 return transport_->socket()->GetPeerAddress(address);
500 } 484 }
501 485
502 int SOCKS5ClientSocket::GetLocalAddress(IPEndPoint* address) const { 486 int SOCKS5ClientSocket::GetLocalAddress(IPEndPoint* address) const {
503 return transport_->socket()->GetLocalAddress(address); 487 return transport_->socket()->GetLocalAddress(address);
504 } 488 }
505 489
506 } // namespace net 490 } // 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