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

Unified Diff: chrome/browser/gtk/download_item_gtk.cc

Issue 3127008: Preliminary work on resuming downloads whose connections have expired.
Patch Set: Waiting to send download automation error message until after other downloads are canceled. Created 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/gtk/download_item_gtk.cc
diff --git a/chrome/browser/gtk/download_item_gtk.cc b/chrome/browser/gtk/download_item_gtk.cc
index 02edbad0edb59943ab7b340347729ff03f2909c7..6ce4398c830e996930eee8e6208b7993ee2978a1 100644
--- a/chrome/browser/gtk/download_item_gtk.cc
+++ b/chrome/browser/gtk/download_item_gtk.cc
@@ -352,6 +352,7 @@ void DownloadItemGtk::OnDownloadUpdated(DownloadItem* download) {
parent_shelf_->RemoveDownloadItem(this); // This will delete us!
return;
case DownloadItem::CANCELLED:
+ case DownloadItem::INTERRUPTED:
StopDownloadProgress();
gtk_widget_queue_draw(progress_area_.get());
break;
@@ -855,7 +856,7 @@ void DownloadItemGtk::OnDangerousAccept(GtkWidget* button) {
void DownloadItemGtk::OnDangerousDecline(GtkWidget* button) {
UMA_HISTOGRAM_LONG_TIMES("clickjacking.discard_download",
base::Time::Now() - creation_time_);
- if (get_download()->state() == DownloadItem::IN_PROGRESS)
+ if (get_download()->IsPartialDownload())
get_download()->Cancel(true);
get_download()->Remove(true);
}

Powered by Google App Engine
This is Rietveld 408576698