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

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

Issue 9959033: Move NextProto enum to a new file net/socket/next_proto.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address wtc's comments 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
« no previous file with comments | « net/socket/socket_test_util.cc ('k') | net/socket/ssl_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) 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/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/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "net/base/io_buffer.h" 10 #include "net/base/io_buffer.h"
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 } 173 }
174 174
175 base::TimeDelta SOCKSClientSocket::GetConnectTimeMicros() const { 175 base::TimeDelta SOCKSClientSocket::GetConnectTimeMicros() const {
176 if (transport_.get() && transport_->socket()) { 176 if (transport_.get() && transport_->socket()) {
177 return transport_->socket()->GetConnectTimeMicros(); 177 return transport_->socket()->GetConnectTimeMicros();
178 } 178 }
179 NOTREACHED(); 179 NOTREACHED();
180 return base::TimeDelta::FromMicroseconds(-1); 180 return base::TimeDelta::FromMicroseconds(-1);
181 } 181 }
182 182
183
184 // Read is called by the transport layer above to read. This can only be done 183 // Read is called by the transport layer above to read. This can only be done
185 // if the SOCKS handshake is complete. 184 // if the SOCKS handshake is complete.
186 int SOCKSClientSocket::Read(IOBuffer* buf, int buf_len, 185 int SOCKSClientSocket::Read(IOBuffer* buf, int buf_len,
187 const CompletionCallback& callback) { 186 const CompletionCallback& callback) {
188 DCHECK(completed_handshake_); 187 DCHECK(completed_handshake_);
189 DCHECK_EQ(STATE_NONE, next_state_); 188 DCHECK_EQ(STATE_NONE, next_state_);
190 DCHECK(user_callback_.is_null()); 189 DCHECK(user_callback_.is_null());
191 190
192 return transport_->socket()->Read(buf, buf_len, callback); 191 return transport_->socket()->Read(buf, buf_len, callback);
193 } 192 }
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 426
428 int SOCKSClientSocket::GetPeerAddress(AddressList* address) const { 427 int SOCKSClientSocket::GetPeerAddress(AddressList* address) const {
429 return transport_->socket()->GetPeerAddress(address); 428 return transport_->socket()->GetPeerAddress(address);
430 } 429 }
431 430
432 int SOCKSClientSocket::GetLocalAddress(IPEndPoint* address) const { 431 int SOCKSClientSocket::GetLocalAddress(IPEndPoint* address) const {
433 return transport_->socket()->GetLocalAddress(address); 432 return transport_->socket()->GetLocalAddress(address);
434 } 433 }
435 434
436 } // namespace net 435 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/socket_test_util.cc ('k') | net/socket/ssl_client_socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698