Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3308)

Unified Diff: chrome/browser/cocoa/download_item_controller.mm

Issue 3029025: Download code cleanup: (Closed)
Patch Set: rebase'n'final Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/download/download_file.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/download_item_controller.mm
diff --git a/chrome/browser/cocoa/download_item_controller.mm b/chrome/browser/cocoa/download_item_controller.mm
index 00e211099ac0f5ac8045cb66d658171a7d69575e..1c77eeebc893005041e1cfd240058e799c80086d 100644
--- a/chrome/browser/cocoa/download_item_controller.mm
+++ b/chrome/browser/cocoa/download_item_controller.mm
@@ -244,10 +244,7 @@ class DownloadShelfContextMenuMac : public DownloadShelfContextMenu {
- (IBAction)handleButtonClick:(id)sender {
DownloadItem* download = bridge_->download_model()->download();
- if (download->state() == DownloadItem::IN_PROGRESS)
- download->set_open_when_complete(!download->open_when_complete());
- else if (download->state() == DownloadItem::COMPLETE)
- download_util::OpenDownload(download);
+ download->OpenDownload();
}
- (NSSize)preferredSize {
@@ -318,8 +315,7 @@ class DownloadShelfContextMenuMac : public DownloadShelfContextMenu {
UMA_HISTOGRAM_LONG_TIMES("clickjacking.save_download",
base::Time::Now() - creationTime_);
// This will change the state and notify us.
- bridge_->download_model()->download()->manager()->DangerousDownloadValidated(
- bridge_->download_model()->download());
+ bridge_->download_model()->download()->DangerousDownloadValidated();
}
- (IBAction)discardDownload:(id)sender {
« no previous file with comments | « no previous file | chrome/browser/download/download_file.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698