OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
(...skipping 850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
861 void DownloadItemGtk::OnDangerousAccept(GtkWidget* button) { | 861 void DownloadItemGtk::OnDangerousAccept(GtkWidget* button) { |
862 UMA_HISTOGRAM_LONG_TIMES("clickjacking.save_download", | 862 UMA_HISTOGRAM_LONG_TIMES("clickjacking.save_download", |
863 base::Time::Now() - creation_time_); | 863 base::Time::Now() - creation_time_); |
864 get_download()->DangerousDownloadValidated(); | 864 get_download()->DangerousDownloadValidated(); |
865 } | 865 } |
866 | 866 |
867 void DownloadItemGtk::OnDangerousDecline(GtkWidget* button) { | 867 void DownloadItemGtk::OnDangerousDecline(GtkWidget* button) { |
868 UMA_HISTOGRAM_LONG_TIMES("clickjacking.discard_download", | 868 UMA_HISTOGRAM_LONG_TIMES("clickjacking.discard_download", |
869 base::Time::Now() - creation_time_); | 869 base::Time::Now() - creation_time_); |
870 if (get_download()->IsPartialDownload()) | 870 if (get_download()->IsPartialDownload()) |
871 get_download()->Cancel(true); | 871 get_download()->Cancel(); |
872 get_download()->Delete(DownloadItem::DELETE_DUE_TO_USER_DISCARD); | 872 get_download()->Delete(DownloadItem::DELETE_DUE_TO_USER_DISCARD); |
873 } | 873 } |
OLD | NEW |