Chromium Code Reviews| Index: chrome/browser/download/download_util.cc |
| diff --git a/chrome/browser/download/download_util.cc b/chrome/browser/download/download_util.cc |
| index 489cb78786cf71be99b55f846224a77042484ebb..193ccaa9778cc7c823d15bc9cd4d50665652c8e3 100644 |
| --- a/chrome/browser/download/download_util.cc |
| +++ b/chrome/browser/download/download_util.cc |
| @@ -582,10 +582,16 @@ std::wstring GetProgressStatusText(DownloadItem* download) { |
| } else { |
| amount.assign(received_size); |
| } |
| - amount_units = GetByteDisplayUnits(download->CurrentSpeed()); |
| - std::wstring speed_text = |
| - UTF16ToWideHack(FormatSpeed(download->CurrentSpeed(), amount_units, |
| - true)); |
| + std::wstring speed_text; |
| + if (download->is_paused()) { |
|
Paweł Hajdan Jr.
2010/11/10 12:14:02
This seems wrong. Why not do that in download->Cur
|
| + // If the download is paused, set the rate to 0B/s. |
| + amount_units = GetByteDisplayUnits(0); |
| + speed_text = UTF16ToWideHack(FormatSpeed(0, amount_units, true)); |
| + } else { |
| + amount_units = GetByteDisplayUnits(download->CurrentSpeed()); |
| + speed_text = UTF16ToWideHack(FormatSpeed(download->CurrentSpeed(), |
| + amount_units, true)); |
| + } |
| std::wstring speed_text_localized; |
| if (base::i18n::AdjustStringForLocaleDirection(speed_text, |
| &speed_text_localized)) |