| OLD | NEW |
| 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 16 matching lines...) Expand all Loading... |
| 27 URLRequest* request, | 27 URLRequest* request, |
| 28 NetworkDelegate* network_delegate, | 28 NetworkDelegate* network_delegate, |
| 29 FtpTransactionFactory* ftp_transaction_factory, | 29 FtpTransactionFactory* ftp_transaction_factory, |
| 30 FtpAuthCache* ftp_auth_cache) | 30 FtpAuthCache* ftp_auth_cache) |
| 31 : URLRequestJob(request, network_delegate), | 31 : URLRequestJob(request, network_delegate), |
| 32 priority_(DEFAULT_PRIORITY), | 32 priority_(DEFAULT_PRIORITY), |
| 33 proxy_service_(request_->context()->proxy_service()), | 33 proxy_service_(request_->context()->proxy_service()), |
| 34 pac_request_(NULL), | 34 pac_request_(NULL), |
| 35 http_response_info_(NULL), | 35 http_response_info_(NULL), |
| 36 read_in_progress_(false), | 36 read_in_progress_(false), |
| 37 weak_factory_(this), | |
| 38 ftp_transaction_factory_(ftp_transaction_factory), | 37 ftp_transaction_factory_(ftp_transaction_factory), |
| 39 ftp_auth_cache_(ftp_auth_cache) { | 38 ftp_auth_cache_(ftp_auth_cache), |
| 39 weak_factory_(this) { |
| 40 DCHECK(proxy_service_); | 40 DCHECK(proxy_service_); |
| 41 DCHECK(ftp_transaction_factory); | 41 DCHECK(ftp_transaction_factory); |
| 42 DCHECK(ftp_auth_cache); | 42 DCHECK(ftp_auth_cache); |
| 43 } | 43 } |
| 44 | 44 |
| 45 URLRequestFtpJob::~URLRequestFtpJob() { | 45 URLRequestFtpJob::~URLRequestFtpJob() { |
| 46 if (pac_request_) | 46 if (pac_request_) |
| 47 proxy_service_->CancelPacRequest(pac_request_); | 47 proxy_service_->CancelPacRequest(pac_request_); |
| 48 } | 48 } |
| 49 | 49 |
| (...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| OLD | NEW |