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 a0d774a34bd0529aa704db187997981d0a6f0026..3ffecd109f94889c46ab4e113a2263735ccd84cf 100644 |
| --- a/chrome/browser/download/download_util.cc |
| +++ b/chrome/browser/download/download_util.cc |
| @@ -565,16 +565,10 @@ std::wstring GetProgressStatusText(DownloadItem* download) { |
| } else { |
| amount.assign(received_size); |
| } |
| - std::wstring speed_text; |
| - if (download->is_paused()) { |
| - // 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)); |
| - } |
| + amount_units = GetByteDisplayUnits(download->CurrentSpeed()); |
|
Paweł Hajdan Jr.
2010/11/12 09:18:01
nit: Can you store the value of CurrentSpeed on a
|
| + std::wstring speed_text = |
| + UTF16ToWideHack(FormatSpeed(download->CurrentSpeed(), amount_units, |
| + true)); |
| std::wstring speed_text_localized; |
| if (base::i18n::AdjustStringForLocaleDirection(speed_text, |
| &speed_text_localized)) |
| @@ -754,4 +748,3 @@ bool IsDangerous(DownloadCreateInfo* info, Profile* profile) { |
| } |
| } // namespace download_util |
| - |