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

Side by Side Diff: net/http/http_proxy_client_socket.cc

Issue 4039003: Add experimental option for TCP FastOpen.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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/http/http_proxy_client_socket.h ('k') | net/net.gyp » ('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) 2010 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/http/http_proxy_client_socket.h" 5 #include "net/http/http_proxy_client_socket.h"
6 6
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "base/stringprintf.h" 8 #include "base/stringprintf.h"
9 #include "googleurl/src/gurl.h" 9 #include "googleurl/src/gurl.h"
10 #include "net/base/auth.h" 10 #include "net/base/auth.h"
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 } 178 }
179 179
180 bool HttpProxyClientSocket::WasEverUsed() const { 180 bool HttpProxyClientSocket::WasEverUsed() const {
181 if (transport_.get() && transport_->socket()) { 181 if (transport_.get() && transport_->socket()) {
182 return transport_->socket()->WasEverUsed(); 182 return transport_->socket()->WasEverUsed();
183 } 183 }
184 NOTREACHED(); 184 NOTREACHED();
185 return false; 185 return false;
186 } 186 }
187 187
188 bool HttpProxyClientSocket::UsingTCPFastOpen() const {
189 if (transport_.get() && transport_->socket()) {
190 return transport_->socket()->UsingTCPFastOpen();
191 }
192 NOTREACHED();
193 return false;
194 }
195
188 int HttpProxyClientSocket::Read(IOBuffer* buf, int buf_len, 196 int HttpProxyClientSocket::Read(IOBuffer* buf, int buf_len,
189 CompletionCallback* callback) { 197 CompletionCallback* callback) {
190 DCHECK(!user_callback_); 198 DCHECK(!user_callback_);
191 if (next_state_ != STATE_DONE) { 199 if (next_state_ != STATE_DONE) {
192 // We're trying to read the body of the response but we're still trying 200 // We're trying to read the body of the response but we're still trying
193 // to establish an SSL tunnel through the proxy. We can't read these 201 // to establish an SSL tunnel through the proxy. We can't read these
194 // bytes when establishing a tunnel because they might be controlled by 202 // bytes when establishing a tunnel because they might be controlled by
195 // an active network attacker. We don't worry about this for HTTP 203 // an active network attacker. We don't worry about this for HTTP
196 // because an active network attacker can already control HTTP sessions. 204 // because an active network attacker can already control HTTP sessions.
197 // We reach this case when the user cancels a 407 proxy auth prompt. 205 // We reach this case when the user cancels a 407 proxy auth prompt.
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 456
449 int rv = auth_->HandleAuthChallenge(response_.headers, false, true, net_log_); 457 int rv = auth_->HandleAuthChallenge(response_.headers, false, true, net_log_);
450 response_.auth_challenge = auth_->auth_info(); 458 response_.auth_challenge = auth_->auth_info();
451 if (rv == OK) 459 if (rv == OK)
452 return ERR_PROXY_AUTH_REQUESTED; 460 return ERR_PROXY_AUTH_REQUESTED;
453 461
454 return rv; 462 return rv;
455 } 463 }
456 464
457 } // namespace net 465 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_proxy_client_socket.h ('k') | net/net.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698