| 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 // File method ordering: Methods in this file are in the same order as | 5 // File method ordering: Methods in this file are in the same order as |
| 6 // in download_item_impl.h, with the following exception: The public | 6 // in download_item_impl.h, with the following exception: The public |
| 7 // interface Start is placed in chronological order with the other | 7 // interface Start is placed in chronological order with the other |
| 8 // (private) routines that together define a DownloadItem's state | 8 // (private) routines that together define a DownloadItem's state |
| 9 // transitions as the download progresses. See "Download progression | 9 // transitions as the download progresses. See "Download progression |
| 10 // cascade" later in this file. | 10 // cascade" later in this file. |
| (...skipping 1026 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1037 | 1037 |
| 1038 void DownloadItemImpl::OnDownloadRenamedToIntermediateName( | 1038 void DownloadItemImpl::OnDownloadRenamedToIntermediateName( |
| 1039 DownloadInterruptReason reason, | 1039 DownloadInterruptReason reason, |
| 1040 const FilePath& full_path) { | 1040 const FilePath& full_path) { |
| 1041 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 1041 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 1042 VLOG(20) << __FUNCTION__ << " download=" << DebugString(true); | 1042 VLOG(20) << __FUNCTION__ << " download=" << DebugString(true); |
| 1043 if (DOWNLOAD_INTERRUPT_REASON_NONE != reason) | 1043 if (DOWNLOAD_INTERRUPT_REASON_NONE != reason) |
| 1044 Interrupt(reason); | 1044 Interrupt(reason); |
| 1045 else | 1045 else |
| 1046 SetFullPath(full_path); | 1046 SetFullPath(full_path); |
| 1047 delegate_->ShowDownloadInBrowser(this); | |
| 1048 | 1047 |
| 1049 MaybeCompleteDownload(); | 1048 MaybeCompleteDownload(); |
| 1050 } | 1049 } |
| 1051 | 1050 |
| 1052 // When SavePackage downloads MHTML to GData (see | 1051 // When SavePackage downloads MHTML to GData (see |
| 1053 // SavePackageFilePickerChromeOS), GData calls MaybeCompleteDownload() like it | 1052 // SavePackageFilePickerChromeOS), GData calls MaybeCompleteDownload() like it |
| 1054 // does for non-SavePackage downloads, but SavePackage downloads never satisfy | 1053 // does for non-SavePackage downloads, but SavePackage downloads never satisfy |
| 1055 // IsDownloadReadyForCompletion(). GDataDownloadObserver manually calls | 1054 // IsDownloadReadyForCompletion(). GDataDownloadObserver manually calls |
| 1056 // DownloadItem::UpdateObservers() when the upload completes so that SavePackage | 1055 // DownloadItem::UpdateObservers() when the upload completes so that SavePackage |
| 1057 // notices that the upload has completed and runs its normal Finish() pathway. | 1056 // notices that the upload has completed and runs its normal Finish() pathway. |
| (...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1413 return "CANCELLED"; | 1412 return "CANCELLED"; |
| 1414 case INTERRUPTED_INTERNAL: | 1413 case INTERRUPTED_INTERNAL: |
| 1415 return "INTERRUPTED"; | 1414 return "INTERRUPTED"; |
| 1416 default: | 1415 default: |
| 1417 NOTREACHED() << "Unknown download state " << state; | 1416 NOTREACHED() << "Unknown download state " << state; |
| 1418 return "unknown"; | 1417 return "unknown"; |
| 1419 }; | 1418 }; |
| 1420 } | 1419 } |
| 1421 | 1420 |
| 1422 } // namespace content | 1421 } // namespace content |
| OLD | NEW |