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

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

Issue 9958023: Properly handle spdy3 responses. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 { 161 NextProto SOCKS5ClientSocket::GetNegotiatedProtocol() const {
162 return kProtoUnknown; 162 return kProtoUnknown;
163 } 163 }
164 164
165
166 // Read is called by the transport layer above to read. This can only be done 165 // Read is called by the transport layer above to read. This can only be done
167 // if the SOCKS handshake is complete. 166 // if the SOCKS handshake is complete.
168 int SOCKS5ClientSocket::Read(IOBuffer* buf, int buf_len, 167 int SOCKS5ClientSocket::Read(IOBuffer* buf, int buf_len,
169 const CompletionCallback& callback) { 168 const CompletionCallback& callback) {
170 DCHECK(completed_handshake_); 169 DCHECK(completed_handshake_);
171 DCHECK_EQ(STATE_NONE, next_state_); 170 DCHECK_EQ(STATE_NONE, next_state_);
172 DCHECK(user_callback_.is_null()); 171 DCHECK(user_callback_.is_null());
173 172
174 return transport_->socket()->Read(buf, buf_len, callback); 173 return transport_->socket()->Read(buf, buf_len, callback);
175 } 174 }
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 501
503 int SOCKS5ClientSocket::GetPeerAddress(AddressList* address) const { 502 int SOCKS5ClientSocket::GetPeerAddress(AddressList* address) const {
504 return transport_->socket()->GetPeerAddress(address); 503 return transport_->socket()->GetPeerAddress(address);
505 } 504 }
506 505
507 int SOCKS5ClientSocket::GetLocalAddress(IPEndPoint* address) const { 506 int SOCKS5ClientSocket::GetLocalAddress(IPEndPoint* address) const {
508 return transport_->socket()->GetLocalAddress(address); 507 return transport_->socket()->GetLocalAddress(address);
509 } 508 }
510 509
511 } // namespace net 510 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698