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

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

Issue 47563006: Revert 232802 "[Net] Assert that URLRequests with LOAD_IGNORE_LI..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 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
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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 // The transaction started synchronously, but we need to notify the 171 // The transaction started synchronously, but we need to notify the
172 // URLRequest delegate via the message loop. 172 // URLRequest delegate via the message loop.
173 OnStartCompletedAsync(rv); 173 OnStartCompletedAsync(rv);
174 } 174 }
175 175
176 void URLRequestFtpJob::StartHttpTransaction() { 176 void URLRequestFtpJob::StartHttpTransaction() {
177 // Create a transaction. 177 // Create a transaction.
178 DCHECK(!http_transaction_); 178 DCHECK(!http_transaction_);
179 179
180 // Do not cache FTP responses sent through HTTP proxy. 180 // Do not cache FTP responses sent through HTTP proxy.
181 request_->SetLoadFlags(request_->load_flags() | 181 request_->set_load_flags(request_->load_flags() |
182 LOAD_DISABLE_CACHE | 182 LOAD_DISABLE_CACHE |
183 LOAD_DO_NOT_SAVE_COOKIES | 183 LOAD_DO_NOT_SAVE_COOKIES |
184 LOAD_DO_NOT_SEND_COOKIES); 184 LOAD_DO_NOT_SEND_COOKIES);
185 185
186 http_request_info_.url = request_->url(); 186 http_request_info_.url = request_->url();
187 http_request_info_.method = request_->method(); 187 http_request_info_.method = request_->method();
188 http_request_info_.load_flags = request_->load_flags(); 188 http_request_info_.load_flags = request_->load_flags();
189 189
190 int rv = request_->context()->http_transaction_factory()->CreateTransaction( 190 int rv = request_->context()->http_transaction_factory()->CreateTransaction(
191 priority_, &http_transaction_, NULL); 191 priority_, &http_transaction_, NULL);
192 if (rv == OK) { 192 if (rv == OK) {
193 rv = http_transaction_->Start( 193 rv = http_transaction_->Start(
194 &http_request_info_, 194 &http_request_info_,
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 if (cached_auth) { 397 if (cached_auth) {
398 // Retry using cached auth data. 398 // Retry using cached auth data.
399 SetAuth(cached_auth->credentials); 399 SetAuth(cached_auth->credentials);
400 } else { 400 } else {
401 // Prompt for a username/password. 401 // Prompt for a username/password.
402 NotifyHeadersComplete(); 402 NotifyHeadersComplete();
403 } 403 }
404 } 404 }
405 405
406 } // namespace net 406 } // namespace net
OLDNEW
« no previous file with comments | « trunk/src/net/url_request/url_request.cc ('k') | trunk/src/net/url_request/url_request_throttler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698