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

Unified Diff: chrome/browser/chromeos/input_method/input_method_util.cc

Issue 5990008: Remove wstring from l10n_util. Part 1.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years 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/chromeos/input_method/input_method_util.cc
===================================================================
--- chrome/browser/chromeos/input_method/input_method_util.cc (revision 70069)
+++ chrome/browser/chromeos/input_method/input_method_util.cc (working copy)
@@ -349,11 +349,11 @@
// efficient, but acceptable as the function is cheap, and the language
// list is short (about 40 at most).
bool operator()(const std::string& s1, const std::string& s2) const {
- const std::wstring key1 =
+ const string16 key1 =
chromeos::input_method::GetLanguageDisplayNameFromCode(s1);
- const std::wstring key2 =
+ const string16 key2 =
chromeos::input_method::GetLanguageDisplayNameFromCode(s2);
Evan Martin 2010/12/24 01:00:42 one line?
- return l10n_util::StringComparator<std::wstring>(collator_)(key1, key2);
+ return l10n_util::StringComparator<string16>(collator_)(key1, key2);
}
private:
@@ -578,18 +578,17 @@
kDefaultDisplayName : iter->second;
}
-std::wstring GetLanguageDisplayNameFromCode(const std::string& language_code) {
+string16 GetLanguageDisplayNameFromCode(const std::string& language_code) {
if (!g_browser_process) {
- return L"";
+ return string16();
}
- return UTF16ToWide(l10n_util::GetDisplayNameForLocale(
- language_code, g_browser_process->GetApplicationLocale(), true));
+ return l10n_util::GetDisplayNameForLocale(
+ language_code, g_browser_process->GetApplicationLocale(), true);
}
-std::wstring GetLanguageNativeDisplayNameFromCode(
+string16 GetLanguageNativeDisplayNameFromCode(
const std::string& language_code) {
- return UTF16ToWide(l10n_util::GetDisplayNameForLocale(
- language_code, language_code, true));
+ return l10n_util::GetDisplayNameForLocale(language_code, language_code, true);
}
void SortLanguageCodesByNames(std::vector<std::string>* language_codes) {

Powered by Google App Engine
This is Rietveld 408576698