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

Unified Diff: chrome/browser/language_combobox_model.cc

Issue 5154009: Cleanup AdjustStringForLocaleDirection() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: further fixes Created 10 years, 1 month 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/language_combobox_model.cc
diff --git a/chrome/browser/language_combobox_model.cc b/chrome/browser/language_combobox_model.cc
index 55b98d49fba63351751dd0d03f5c0039ff92b511..7c0cdfff0e1a7e7f6f2c099dce8b303ec823526e 100644
--- a/chrome/browser/language_combobox_model.cc
+++ b/chrome/browser/language_combobox_model.cc
@@ -91,20 +91,11 @@ std::wstring LanguageList::GetLanguageNameAt(int index) const {
// locale name in order to avoid text rendering problems such as misplaced
// parentheses or languages appearing in the wrong order.
std::wstring locale_name_localized;
Avi (use Gerrit) 2010/11/23 16:07:08 This string is no longer needed. Delete.
- std::wstring locale_name;
- if (base::i18n::AdjustStringForLocaleDirection(locale_names_[index],
- &locale_name_localized))
- locale_name.assign(locale_name_localized);
- else
- locale_name.assign(locale_names_[index]);
+ std::wstring locale_name = locale_names_[index];
+ base::i18n::AdjustStringForLocaleDirection(&locale_name);
- std::wstring native_name_localized;
- std::wstring native_name;
- if (base::i18n::AdjustStringForLocaleDirection(it->second.native_name,
- &native_name_localized))
- native_name.assign(native_name_localized);
- else
- native_name.assign(it->second.native_name);
+ std::wstring native_name = it->second.native_name;
+ base::i18n::AdjustStringForLocaleDirection(&native_name);
// We used to have a localizable template here, but none of translators
// changed the format. We also want to switch the order of locale_name

Powered by Google App Engine
This is Rietveld 408576698