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

Unified Diff: chrome/browser/dom_ui/downloads_dom_handler.cc

Issue 115797: Show the time remaining of download items in the download manager.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 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
« chrome/app/generated_resources.grd ('K') | « chrome/app/generated_resources.grd ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/dom_ui/downloads_dom_handler.cc
===================================================================
--- chrome/browser/dom_ui/downloads_dom_handler.cc (revision 16871)
+++ chrome/browser/dom_ui/downloads_dom_handler.cc (working copy)
@@ -332,7 +332,20 @@
&speed_text_localized))
speed_text.assign(speed_text_localized);
- return l10n_util::GetStringF(IDS_DOWNLOAD_TAB_PROGRESS_SPEED,
+
+ base::TimeDelta remaining;
+ std::wstring time_remaining;
+ if (download->is_paused())
+ time_remaining = l10n_util::GetString(IDS_DOWNLOAD_PROGRESS_PAUSED);
+ else if (download->TimeRemaining(&remaining))
+ time_remaining = TimeFormat::TimeRemaining(remaining);
+
+ if (time_remaining.empty())
+ return l10n_util::GetStringF(IDS_DOWNLOAD_TAB_PROGRESS_STATUS_TIME_UNKNOWN,
Peter Kasting 2009/05/26 23:18:30 Nit: Now, on _this_ conditional body, since it's >
+ speed_text,
+ amount);
+ return l10n_util::GetStringF(IDS_DOWNLOAD_TAB_PROGRESS_STATUS,
speed_text,
- amount);
+ amount,
+ time_remaining);
}
« chrome/app/generated_resources.grd ('K') | « chrome/app/generated_resources.grd ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698