Chromium Code Reviews| 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); |
| } |