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

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: REBASE + rm gitmodules Created 6 years, 3 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
« no previous file with comments | « 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 54f41454541ee03408a627d1ed4d6bbfbb3ee1fa..c3240ce3696d065deda65bd9b23b8d78a6a9b88a 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()));
}
std::string GetLanguage(const std::string& locale) {
@@ -461,7 +462,7 @@ std::string GetApplicationLocaleInternal(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
« no previous file with comments | « ui/base/l10n/l10n_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698