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

Side by Side Diff: net/url_request/url_request_ftp_job.cc

Issue 332313003: Add Finch experiment for selectively bypassing proxies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address mmenke's feedback R2 Created 6 years, 5 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
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/url_request/url_request_ftp_job.h" 5 #include "net/url_request/url_request_ftp_job.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "net/base/auth.h" 10 #include "net/base/auth.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 DCHECK(!ftp_transaction_); 95 DCHECK(!ftp_transaction_);
96 DCHECK(!http_transaction_); 96 DCHECK(!http_transaction_);
97 97
98 int rv = OK; 98 int rv = OK;
99 if (request_->load_flags() & LOAD_BYPASS_PROXY) { 99 if (request_->load_flags() & LOAD_BYPASS_PROXY) {
100 proxy_info_.UseDirect(); 100 proxy_info_.UseDirect();
101 } else { 101 } else {
102 DCHECK_EQ(request_->context()->proxy_service(), proxy_service_); 102 DCHECK_EQ(request_->context()->proxy_service(), proxy_service_);
103 rv = proxy_service_->ResolveProxy( 103 rv = proxy_service_->ResolveProxy(
104 request_->url(), 104 request_->url(),
105 request_->load_flags(),
105 &proxy_info_, 106 &proxy_info_,
106 base::Bind(&URLRequestFtpJob::OnResolveProxyComplete, 107 base::Bind(&URLRequestFtpJob::OnResolveProxyComplete,
107 base::Unretained(this)), 108 base::Unretained(this)),
108 &pac_request_, 109 &pac_request_,
110 NULL,
109 request_->net_log()); 111 request_->net_log());
110 112
111 if (rv == ERR_IO_PENDING) 113 if (rv == ERR_IO_PENDING)
112 return; 114 return;
113 } 115 }
114 OnResolveProxyComplete(rv); 116 OnResolveProxyComplete(rv);
115 } 117 }
116 118
117 void URLRequestFtpJob::Kill() { 119 void URLRequestFtpJob::Kill() {
118 if (ftp_transaction_) 120 if (ftp_transaction_)
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 if (cached_auth) { 400 if (cached_auth) {
399 // Retry using cached auth data. 401 // Retry using cached auth data.
400 SetAuth(cached_auth->credentials); 402 SetAuth(cached_auth->credentials);
401 } else { 403 } else {
402 // Prompt for a username/password. 404 // Prompt for a username/password.
403 NotifyHeadersComplete(); 405 NotifyHeadersComplete();
404 } 406 }
405 } 407 }
406 408
407 } // namespace net 409 } // namespace net
OLDNEW
« net/proxy/proxy_service_unittest.cc ('K') | « net/socket_stream/socket_stream.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698