diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-27 18:16:39 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-27 18:16:39 +0000 |
commit | aa033af5a4a6415200781d0704a36fe724ecd803 (patch) | |
tree | d1e8b8bfc2fe0498e1720ac1147a48a75823ae27 /chrome/browser/cocoa/download_item_controller.mm | |
parent | bfb19b64630633eef3dd8fea3bb88bfb02485b67 (diff) | |
download | chromium_src-aa033af5a4a6415200781d0704a36fe724ecd803.zip chromium_src-aa033af5a4a6415200781d0704a36fe724ecd803.tar.gz chromium_src-aa033af5a4a6415200781d0704a36fe724ecd803.tar.bz2 |
Download code cleanup:
- make the code more object-oriented, make the object expose less accessors
- make some parts of code look more obvious, use existing helpers
- make the public interfaces slightly better (less ctor parameters)
- make some names slightly better
TEST=unit_tests, browser_tests, ui_tests
BUG=48913
Review URL: http://codereview.chromium.org/3029025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53808 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/download_item_controller.mm')
-rw-r--r-- | chrome/browser/cocoa/download_item_controller.mm | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/chrome/browser/cocoa/download_item_controller.mm b/chrome/browser/cocoa/download_item_controller.mm index 00e2110..1c77eee 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 { |