| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #include "chrome/browser/ui/gtk/download/download_item_gtk.h" | 5 #include "chrome/browser/ui/gtk/download/download_item_gtk.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| (...skipping 900 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 911 if (!theme_service_->UsingNativeTheme()) { | 911 if (!theme_service_->UsingNativeTheme()) { |
| 912 // The hbox renderer will take care of the border when in GTK mode. | 912 // The hbox renderer will take care of the border when in GTK mode. |
| 913 dangerous_nine_box_->RenderToWidget(widget); | 913 dangerous_nine_box_->RenderToWidget(widget); |
| 914 } | 914 } |
| 915 return FALSE; // Continue propagation. | 915 return FALSE; // Continue propagation. |
| 916 } | 916 } |
| 917 | 917 |
| 918 void DownloadItemGtk::OnDangerousAccept(GtkWidget* button) { | 918 void DownloadItemGtk::OnDangerousAccept(GtkWidget* button) { |
| 919 UMA_HISTOGRAM_LONG_TIMES("clickjacking.save_download", | 919 UMA_HISTOGRAM_LONG_TIMES("clickjacking.save_download", |
| 920 base::Time::Now() - creation_time_); | 920 base::Time::Now() - creation_time_); |
| 921 download()->DangerousDownloadValidated(); | 921 download()->ValidateDangerousDownload(); |
| 922 } | 922 } |
| 923 | 923 |
| 924 void DownloadItemGtk::OnDangerousDecline(GtkWidget* button) { | 924 void DownloadItemGtk::OnDangerousDecline(GtkWidget* button) { |
| 925 UMA_HISTOGRAM_LONG_TIMES("clickjacking.discard_download", | 925 UMA_HISTOGRAM_LONG_TIMES("clickjacking.discard_download", |
| 926 base::Time::Now() - creation_time_); | 926 base::Time::Now() - creation_time_); |
| 927 if (download()->IsPartialDownload()) | 927 download()->Remove(); |
| 928 download()->Cancel(true); | |
| 929 download()->Delete(DownloadItem::DELETE_DUE_TO_USER_DISCARD); | |
| 930 } | 928 } |
| OLD | NEW |