summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/download_item_mac.mm
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-04 20:53:38 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-04 20:53:38 +0000
commit766d7199a048698fd9d28e26da6464a9b4e236b6 (patch)
treec21340224181a1e09477d19f8f18d13c09772e25 /chrome/browser/cocoa/download_item_mac.mm
parentfe0ecbe4c6b2a4b7422c65be1967fcb019f49342 (diff)
downloadchromium_src-766d7199a048698fd9d28e26da6464a9b4e236b6.zip
chromium_src-766d7199a048698fd9d28e26da6464a9b4e236b6.tar.gz
chromium_src-766d7199a048698fd9d28e26da6464a9b4e236b6.tar.bz2
Don't bounce the downloads folder if the download was auto-removed (e.g. themes)
BUG=http://crbug.com/28717 TEST=as in bug Review URL: http://codereview.chromium.org/465064 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33854 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/download_item_mac.mm')
-rw-r--r--chrome/browser/cocoa/download_item_mac.mm9
1 files changed, 6 insertions, 3 deletions
diff --git a/chrome/browser/cocoa/download_item_mac.mm b/chrome/browser/cocoa/download_item_mac.mm
index ecf7f08..25b4022 100644
--- a/chrome/browser/cocoa/download_item_mac.mm
+++ b/chrome/browser/cocoa/download_item_mac.mm
@@ -6,6 +6,7 @@
#include "chrome/browser/browser_process.h"
#import "chrome/browser/cocoa/download_item_controller.h"
+#include "chrome/browser/cocoa/download_util_mac.h"
#include "chrome/browser/download/download_item_model.h"
#include "skia/ext/skia_utils_mac.h"
@@ -39,17 +40,19 @@ void DownloadItemMac::OnDownloadUpdated(DownloadItem* download) {
lastFilePath_ = download->full_path();
}
- switch (download_model_->download()->state()) {
+ switch (download->state()) {
case DownloadItem::REMOVING:
[item_controller_ remove]; // We're deleted now!
break;
- case DownloadItem::IN_PROGRESS:
- case DownloadItem::CANCELLED:
case DownloadItem::COMPLETE:
if (download->auto_opened()) {
[item_controller_ remove]; // We're deleted now!
return;
}
+ download_util::NotifySystemOfDownloadComplete(download->full_path());
+ // fall through
+ case DownloadItem::IN_PROGRESS:
+ case DownloadItem::CANCELLED:
[item_controller_ setStateFromDownload:download_model_.get()];
break;
default: