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/profiler/scoped_tracker.h" | 9 #include "base/profiler/scoped_tracker.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 base::Bind(&URLRequestFtpJob::OnStartCompleted, | 278 base::Bind(&URLRequestFtpJob::OnStartCompleted, |
279 base::Unretained(this))); | 279 base::Unretained(this))); |
280 } | 280 } |
281 if (rv == ERR_IO_PENDING) | 281 if (rv == ERR_IO_PENDING) |
282 return; | 282 return; |
283 | 283 |
284 OnStartCompletedAsync(rv); | 284 OnStartCompletedAsync(rv); |
285 } | 285 } |
286 | 286 |
287 LoadState URLRequestFtpJob::GetLoadState() const { | 287 LoadState URLRequestFtpJob::GetLoadState() const { |
| 288 // TODO(pkasting): Remove ScopedTracker below once crbug.com/455952 is |
| 289 // fixed. |
| 290 tracked_objects::ScopedTracker tracking_profile( |
| 291 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
| 292 "455952 URLRequestFtpJob::GetLoadState")); |
288 if (proxy_info_.is_direct()) { | 293 if (proxy_info_.is_direct()) { |
289 return ftp_transaction_ ? | 294 return ftp_transaction_ ? |
290 ftp_transaction_->GetLoadState() : LOAD_STATE_IDLE; | 295 ftp_transaction_->GetLoadState() : LOAD_STATE_IDLE; |
291 } else { | 296 } else { |
292 return http_transaction_ ? | 297 return http_transaction_ ? |
293 http_transaction_->GetLoadState() : LOAD_STATE_IDLE; | 298 http_transaction_->GetLoadState() : LOAD_STATE_IDLE; |
294 } | 299 } |
295 } | 300 } |
296 | 301 |
297 bool URLRequestFtpJob::NeedsAuth() { | 302 bool URLRequestFtpJob::NeedsAuth() { |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
405 if (cached_auth) { | 410 if (cached_auth) { |
406 // Retry using cached auth data. | 411 // Retry using cached auth data. |
407 SetAuth(cached_auth->credentials); | 412 SetAuth(cached_auth->credentials); |
408 } else { | 413 } else { |
409 // Prompt for a username/password. | 414 // Prompt for a username/password. |
410 NotifyHeadersComplete(); | 415 NotifyHeadersComplete(); |
411 } | 416 } |
412 } | 417 } |
413 | 418 |
414 } // namespace net | 419 } // namespace net |
OLD | NEW |