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

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

Issue 14947007: [Downloads] Allow acquiring dangerous download file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 7 years, 7 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
Index: chrome/browser/ui/cocoa/download/download_item_controller.mm
diff --git a/chrome/browser/ui/cocoa/download/download_item_controller.mm b/chrome/browser/ui/cocoa/download/download_item_controller.mm
index 4e9d7478e681a5140d347d682c708ac1adf5b6e9..9487cd4674d0f91426339d30e90efc77cb5997aa 100644
--- a/chrome/browser/ui/cocoa/download/download_item_controller.mm
+++ b/chrome/browser/ui/cocoa/download/download_item_controller.mm
@@ -306,16 +306,14 @@ 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()->DangerousDownloadValidated();
+ bridge_->download_model()->download()->ValidateDangerousDownload();
}
- (IBAction)discardDownload:(id)sender {
UMA_HISTOGRAM_LONG_TIMES("clickjacking.discard_download",
base::Time::Now() - creationTime_);
DownloadItem* download = bridge_->download_model()->download();
- if (download->IsPartialDownload())
- download->Cancel(true);
- download->Delete(DownloadItem::DELETE_DUE_TO_USER_DISCARD);
+ download->Remove();
// WARNING: we are deleted at this point. Don't access 'this'.
}

Powered by Google App Engine
This is Rietveld 408576698