| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |