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

Unified Diff: chrome/browser/download/download_item_model.cc

Issue 10831302: Download resumption - Preliminary (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed content unit tests. Created 8 years, 2 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/download/download_item_model.cc
diff --git a/chrome/browser/download/download_item_model.cc b/chrome/browser/download/download_item_model.cc
index b90808d0a785e83111bf64a4dcc3c0c636137216..e890744ceb0ec2386943ee980188f94fa310f9fe 100644
--- a/chrome/browser/download/download_item_model.cc
+++ b/chrome/browser/download/download_item_model.cc
@@ -57,6 +57,8 @@ string16 DownloadItemModel::GetStatusText() const {
break;
case DownloadItem::INTERRUPTED: {
content::DownloadInterruptReason reason = download_->GetLastReason();
+ // TODO(ahendrickson) -- Add information about whether or not it can be
+ // resumed.
if (reason != content::DOWNLOAD_INTERRUPT_REASON_USER_CANCELED) {
string16 interrupt_reason = InterruptReasonStatusMessage(reason);
string16 size_ratio = GetProgressSizesString();
@@ -242,7 +244,9 @@ string16 DownloadItemModel::GetInProgressStatusString() const {
}
// A paused download: "100/120 MB, Paused"
- if (download_->IsPaused()) {
+ if (download_->IsPaused() ||
+ (download_->CanResumeInterrupted() !=
+ DownloadItem::RESUME_MODE_INVALID)) {
benjhayden 2012/10/15 17:59:37 Can this go on the previous line?
return l10n_util::GetStringFUTF16(
IDS_DOWNLOAD_STATUS_IN_PROGRESS, size_ratio,
l10n_util::GetStringUTF16(IDS_DOWNLOAD_PROGRESS_PAUSED));

Powered by Google App Engine
This is Rietveld 408576698