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

Side by Side Diff: chrome/browser/ui/gtk/download/download_item_gtk.cc

Issue 14947007: [Downloads] Allow acquiring dangerous download file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 7 years, 6 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 | Annotate | Revision Log
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/download/download_item_controller.mm ('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