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

Unified Diff: chrome/browser/download/download_item_model.cc

Issue 3108027: Convert GetDisplayStringInLTRDirectionality from wstring to string16. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 4 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
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..c360273975b644a29d02d007039b97c19c3c9f29 100644
--- a/chrome/browser/download/download_item_model.cc
+++ b/chrome/browser/download/download_item_model.cc
@@ -40,8 +40,9 @@ std::wstring DownloadItemModel::GetStatusText() {
// 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);
- base::i18n::GetDisplayStringInLTRDirectionality(&simple_total);
+ string16 simple_total = WideToUTF16Hack(FormatBytes(total, amount_units,
+ true));
+ simple_total = base::i18n::GetDisplayStringInLTRDirectionality(simple_total);
TimeDelta remaining;
string16 simple_time;
@@ -74,8 +75,8 @@ std::wstring DownloadItemModel::GetStatusText() {
true));
} else {
status_text = l10n_util::GetStringFUTF16(
- IDS_DOWNLOAD_STATUS_IN_PROGRESS, simple_size,
- WideToUTF16Hack(simple_total), simple_time);
+ IDS_DOWNLOAD_STATUS_IN_PROGRESS, simple_size, simple_total,
+ simple_time);
}
}
break;

Powered by Google App Engine
This is Rietveld 408576698