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

Unified Diff: ui/base/l10n/l10n_util.cc

Issue 269943004: Remove base version of GetCanonicalLocale() function. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: U_DISABLE_RENAMING Created 6 years, 7 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
« base/i18n/rtl.h ('K') | « ui/base/l10n/l10n_util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/l10n/l10n_util.cc
diff --git a/ui/base/l10n/l10n_util.cc b/ui/base/l10n/l10n_util.cc
index 70a1c2062cc0cca9a640a939f35f0028d0d35c1f..a0fa79fd1a1a68b7e6d5de0811910d532d4150b5 100644
--- a/ui/base/l10n/l10n_util.cc
+++ b/ui/base/l10n/l10n_util.cc
@@ -308,7 +308,8 @@ base::LazyInstance<std::vector<std::string>, AvailableLocalesTraits>
namespace l10n_util {
std::string GetCanonicalLocale(const std::string& locale) {
- return base::i18n::GetCanonicalLocale(locale.c_str());
+ return base::i18n::GetLocaleString(
+ icu::Locale::createCanonical(locale.c_str()));
}
bool CheckAndResolveLocale(const std::string& locale,
@@ -463,7 +464,7 @@ std::string GetApplicationLocale(const std::string& pref_locale) {
DCHECK(*languages); // At least one entry, "C", is guaranteed.
for (; *languages != NULL; ++languages) {
- candidates.push_back(base::i18n::GetCanonicalLocale(*languages));
+ candidates.push_back(GetCanonicalLocale(*languages));
}
#else
« base/i18n/rtl.h ('K') | « ui/base/l10n/l10n_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698