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

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

Issue 7796014: Make cancel remove cancelled download from active queues at time of cancel. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix to try to get past main waterfall failure. Created 9 years, 3 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) 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 860 matching lines...) Expand 10 before | Expand all | Expand 10 after
871 void DownloadItemGtk::OnDangerousAccept(GtkWidget* button) { 871 void DownloadItemGtk::OnDangerousAccept(GtkWidget* button) {
872 UMA_HISTOGRAM_LONG_TIMES("clickjacking.save_download", 872 UMA_HISTOGRAM_LONG_TIMES("clickjacking.save_download",
873 base::Time::Now() - creation_time_); 873 base::Time::Now() - creation_time_);
874 get_download()->DangerousDownloadValidated(); 874 get_download()->DangerousDownloadValidated();
875 } 875 }
876 876
877 void DownloadItemGtk::OnDangerousDecline(GtkWidget* button) { 877 void DownloadItemGtk::OnDangerousDecline(GtkWidget* button) {
878 UMA_HISTOGRAM_LONG_TIMES("clickjacking.discard_download", 878 UMA_HISTOGRAM_LONG_TIMES("clickjacking.discard_download",
879 base::Time::Now() - creation_time_); 879 base::Time::Now() - creation_time_);
880 if (get_download()->IsPartialDownload()) 880 if (get_download()->IsPartialDownload())
881 get_download()->Cancel(true); 881 get_download()->Cancel();
882 get_download()->Delete(DownloadItem::DELETE_DUE_TO_USER_DISCARD); 882 get_download()->Delete(DownloadItem::DELETE_DUE_TO_USER_DISCARD);
883 } 883 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/download/download_item_controller.mm ('k') | chrome/browser/ui/panels/panel_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698