| Index: content/browser/download/save_package.cc
|
| diff --git a/content/browser/download/save_package.cc b/content/browser/download/save_package.cc
|
| index adf44d8a0259ec8dcf54cd5e9663f4f34980fe44..42bfb7fd01f39ee02894a297f93ac28cc6b22140 100644
|
| --- a/content/browser/download/save_package.cc
|
| +++ b/content/browser/download/save_package.cc
|
| @@ -747,17 +747,19 @@ void SavePackage::Finish() {
|
| file_manager_,
|
| save_ids));
|
|
|
| - // Hack to avoid touching download_ after user cancel.
|
| - // TODO(rdsmith/benjhayden): Integrate canceling on DownloadItem
|
| - // with SavePackage flow.
|
| - if (download_ && download_->IsInProgress()) {
|
| - if (save_type_ != content::SAVE_PAGE_TYPE_AS_MHTML) {
|
| - download_->OnAllDataSaved(all_save_items_count_,
|
| - DownloadItem::kEmptyFileHash);
|
| + if (download_) {
|
| + // Hack to avoid touching download_ after user cancel.
|
| + // TODO(rdsmith/benjhayden): Integrate canceling on DownloadItem
|
| + // with SavePackage flow.
|
| + if (download_->IsInProgress()) {
|
| + if (save_type_ != content::SAVE_PAGE_TYPE_AS_MHTML) {
|
| + download_->OnAllDataSaved(all_save_items_count_,
|
| + DownloadItem::kEmptyFileHash);
|
| + }
|
| + download_->MarkAsComplete();
|
| }
|
| - download_->MarkAsComplete();
|
| + FinalizeDownloadEntry();
|
| }
|
| - FinalizeDownloadEntry();
|
| }
|
|
|
| // Called for updating end state.
|
|
|