Chromium Code Reviews| Index: chrome/browser/download/download_item.cc |
| diff --git a/chrome/browser/download/download_item.cc b/chrome/browser/download/download_item.cc |
| index f6bee14b83bd482addfac21ec8bc31f49451465d..5a3a9fd7d6be3907fc982182c71b050a786425db 100644 |
| --- a/chrome/browser/download/download_item.cc |
| +++ b/chrome/browser/download/download_item.cc |
| @@ -330,8 +330,10 @@ void DownloadItem::Finished() { |
| // finalized and the file data is downloaded. The ordering of these two |
| // actions is indeterministic. Thus, if the filename is not finalized yet, |
| // delay the notification. |
| - if (name_finalized()) |
| + if (name_finalized()) { |
| NotifyObserversDownloadFileCompleted(); |
|
Paweł Hajdan Jr.
2011/01/05 08:11:16
It is really weird that we have to notify *both* "
|
| + download_manager_->OnDownloadFileCompleted(id()); |
| + } |
| } |
| void DownloadItem::Remove(bool delete_on_disk) { |
| @@ -396,8 +398,10 @@ void DownloadItem::OnNameFinalized() { |
| // finalized and the file data is downloaded. The ordering of these two |
| // actions is indeterministic. Thus, if we are still in downloading the |
| // file, delay the notification. |
| - if (state() == DownloadItem::COMPLETE) |
| + if (state() == DownloadItem::COMPLETE) { |
| NotifyObserversDownloadFileCompleted(); |
| + download_manager_->OnDownloadFileCompleted(id()); |
| + } |
| } |
| void DownloadItem::OnSafeDownloadFinished(DownloadFileManager* file_manager) { |