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 8b58751a864890ed563e5c8b2aaed6d650603c37..1098b2a3d60f5ddaafc879fcbe6d075331c1152a 100644 |
--- a/chrome/browser/download/download_item_model.cc |
+++ b/chrome/browser/download/download_item_model.cc |
@@ -32,15 +32,15 @@ std::wstring DownloadItemModel::GetStatusText() { |
int64 total = download_->total_bytes(); |
DataUnits amount_units = GetByteDisplayUnits(total); |
- const string16 simple_size = WideToUTF16Hack(FormatBytes(size, amount_units, |
- false)); |
+ const string16 simple_size = FormatBytes(size, amount_units, false); |
// In RTL locales, we render the text "size/total" in an RTL context. This |
// is problematic since a string such as "123/456 MB" is displayed |
// as "MB 123/456" because it ends with an LTR run. In order to solve this, |
// we mark the total string as an LTR string if the UI layout is |
// right-to-left so that the string "456 MB" is treated as an LTR run. |
- std::wstring simple_total = FormatBytes(total, amount_units, true); |
+ std::wstring simple_total = |
+ UTF16ToWide(FormatBytes(total, amount_units, true)); |
base::i18n::GetDisplayStringInLTRDirectionality(&simple_total); |
viettrungluu
2010/08/18 16:15:54
I guess we really should make a string16 version o
|
TimeDelta remaining; |
@@ -70,12 +70,11 @@ std::wstring DownloadItemModel::GetStatusText() { |
// Instead of displaying "0 B" we keep the "Starting..." string. |
status_text = (size == 0) ? |
l10n_util::GetStringUTF16(IDS_DOWNLOAD_STATUS_STARTING) : |
- WideToUTF16Hack(FormatBytes(size, GetByteDisplayUnits(size), |
- true)); |
+ FormatBytes(size, GetByteDisplayUnits(size), true); |
} else { |
status_text = l10n_util::GetStringFUTF16( |
IDS_DOWNLOAD_STATUS_IN_PROGRESS, simple_size, |
- WideToUTF16Hack(simple_total), simple_time); |
+ WideToUTF16(simple_total), simple_time); |
} |
} |
break; |