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

Unified Diff: chrome/browser/ui/webui/downloads_dom_handler.cc

Issue 14958003: [Resumption 12/12] Support resuming interrupted downloads from the downloads page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/downloads/downloads.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/downloads_dom_handler.cc
diff --git a/chrome/browser/ui/webui/downloads_dom_handler.cc b/chrome/browser/ui/webui/downloads_dom_handler.cc
index 1e8af75fc9b8ebd3c621e53849baf2d4f5af7255..dd06a1d11c96d8b4df30646a88ac1624242511b4 100644
--- a/chrome/browser/ui/webui/downloads_dom_handler.cc
+++ b/chrome/browser/ui/webui/downloads_dom_handler.cc
@@ -145,6 +145,7 @@ DictionaryValue* CreateDownloadItemValue(
file_value->SetBoolean("file_externally_removed",
download_item->GetFileExternallyRemoved());
file_value->SetBoolean("retry", false); // Overridden below if needed.
+ file_value->SetBoolean("resume", download_item->CanResume());
if (download_item->IsInProgress()) {
if (download_item->IsDangerous()) {
@@ -189,7 +190,7 @@ DictionaryValue* CreateDownloadItemValue(
file_value->SetString("last_reason_text",
download_model.GetInterruptReasonText());
if (content::DOWNLOAD_INTERRUPT_REASON_CRASH ==
- download_item->GetLastReason())
+ download_item->GetLastReason() && !download_item->CanResume())
file_value->SetBoolean("retry", true);
} else if (download_item->IsCancelled()) {
file_value->SetString("state", "CANCELLED");
« no previous file with comments | « chrome/browser/resources/downloads/downloads.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698