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

Side by Side Diff: chrome/browser/ui/cocoa/download/download_item_controller.mm

Issue 2164723002: Change Dismiss button to Discard and cancel download (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove IDS_DISMISS_DOWNLOAD from generated_resources.grd 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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "chrome/browser/ui/cocoa/download/download_item_controller.h" 5 #import "chrome/browser/ui/cocoa/download/download_item_controller.h"
6 6
7 #include "base/mac/bundle_locations.h" 7 #include "base/mac/bundle_locations.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/strings/string16.h" 9 #include "base/strings/string16.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 } 355 }
356 356
357 - (IBAction)discardDownload:(id)sender { 357 - (IBAction)discardDownload:(id)sender {
358 UMA_HISTOGRAM_LONG_TIMES("clickjacking.discard_download", 358 UMA_HISTOGRAM_LONG_TIMES("clickjacking.discard_download",
359 base::Time::Now() - creationTime_); 359 base::Time::Now() - creationTime_);
360 DownloadItem* download = bridge_->download_model()->download(); 360 DownloadItem* download = bridge_->download_model()->download();
361 download->Remove(); 361 download->Remove();
362 // WARNING: we are deleted at this point. Don't access 'this'. 362 // WARNING: we are deleted at this point. Don't access 'this'.
363 } 363 }
364 364
365 - (IBAction)dismissMaliciousDownload:(id)sender {
366 // ExperienceSampling: User dismissed the dangerous download.
367 [self updateExperienceSamplingEvent:ExperienceSamplingEvent::kDeny];
368 [self remove];
369 // WARNING: we are deleted at this point.
370 }
371
372 - (IBAction)showContextMenu:(id)sender { 365 - (IBAction)showContextMenu:(id)sender {
373 [progressView_ showContextMenu]; 366 [progressView_ showContextMenu];
374 } 367 }
375 368
376 @end 369 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/download/download_item_controller.h ('k') | chrome/browser/ui/views/download/download_item_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698