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

Unified Diff: chrome/browser/ui/views/download/download_item_view.cc

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/views/download/download_item_view.cc
diff --git a/chrome/browser/ui/views/download/download_item_view.cc b/chrome/browser/ui/views/download/download_item_view.cc
index dce9024addf28526035ea18e2601b44f7c47fa7e..debec62c1b9f95994aa3bf0ec7b6ab5430ce1552 100644
--- a/chrome/browser/ui/views/download/download_item_view.cc
+++ b/chrome/browser/ui/views/download/download_item_view.cc
@@ -524,9 +524,7 @@ void DownloadItemView::ButtonPressed(
if (sender == discard_button_) {
UMA_HISTOGRAM_LONG_TIMES("clickjacking.discard_download",
base::Time::Now() - creation_time_);
- 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'.
} else if (save_button_ && sender == save_button_) {
// The user has confirmed a dangerous download. We'd record how quickly the
@@ -534,7 +532,7 @@ void DownloadItemView::ButtonPressed(
UMA_HISTOGRAM_LONG_TIMES("clickjacking.save_download",
base::Time::Now() - creation_time_);
// This will change the state and notify us.
- download()->DangerousDownloadValidated();
+ download()->ValidateDangerousDownload();
}
}
« no previous file with comments | « chrome/browser/ui/gtk/download/download_item_gtk.cc ('k') | chrome/browser/ui/webui/downloads_dom_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698