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

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

Issue 2164723002: Change Dismiss button to Discard and cancel download (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove dissMaliciousDownload from download_item_controller.h/mm Created 4 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 | « chrome/browser/ui/views/download/download_item_view.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/download/download_item_view_md.cc
diff --git a/chrome/browser/ui/views/download/download_item_view_md.cc b/chrome/browser/ui/views/download/download_item_view_md.cc
index 9fa51a0459caabd544c2db5f53dd631bd4a302a2..732c7f8037b6f39d7eebaa9ef1cd972f990df718 100644
--- a/chrome/browser/ui/views/download/download_item_view_md.cc
+++ b/chrome/browser/ui/views/download/download_item_view_md.cc
@@ -572,18 +572,8 @@ void DownloadItemViewMd::ButtonPressed(views::Button* sender,
// WARNING: all end states after this point delete |this|.
DCHECK_EQ(discard_button_, sender);
- if (model_.IsMalicious()) {
- UMA_HISTOGRAM_LONG_TIMES("clickjacking.dismiss_download", warning_duration);
- // ExperienceSampling: User chose to dismiss the dangerous download.
- if (sampling_event_.get()) {
- sampling_event_->CreateUserDecisionEvent(ExperienceSamplingEvent::kDeny);
- sampling_event_.reset(NULL);
- }
- shelf_->RemoveDownloadView(this);
- return;
- }
UMA_HISTOGRAM_LONG_TIMES("clickjacking.discard_download", warning_duration);
- if (model_.ShouldAllowDownloadFeedback() &&
+ if (!model_.IsMalicious() && model_.ShouldAllowDownloadFeedback() &&
!shelf_->browser()->profile()->IsOffTheRecord()) {
if (!shelf_->browser()->profile()->GetPrefs()->HasPrefPath(
prefs::kSafeBrowsingExtendedReportingEnabled)) {
@@ -975,10 +965,8 @@ void DownloadItemViewMd::ShowWarningDialog() {
this, model_.GetWarningConfirmButtonText());
AddChildView(save_button_);
}
- int discard_button_message =
- model_.IsMalicious() ? IDS_DISMISS_DOWNLOAD : IDS_DISCARD_DOWNLOAD;
msw 2016/07/20 20:24:32 Remove IDS_DISMISS_DOWNLOAD from chrome/app/genera
Jialiu Lin 2016/07/20 20:30:01 Done.
discard_button_ = views::MdTextButton::CreateMdButton(
- this, l10n_util::GetStringUTF16(discard_button_message));
+ this, l10n_util::GetStringUTF16(IDS_DISCARD_DOWNLOAD));
AddChildView(discard_button_);
base::string16 dangerous_label =
« no previous file with comments | « chrome/browser/ui/views/download/download_item_view.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698