From ff622aa41f2eb00c4f0359a1d661f77ea17d29e1 Mon Sep 17 00:00:00 2001 From: "evan@chromium.org" Date: Wed, 4 Aug 2010 17:07:46 +0000 Subject: Remove wstrings from l10n_util/ResourceBundle locale functions. Review URL: http://codereview.chromium.org/3069026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54917 0039d316-1c4b-4281-b951-d872f2087c98 --- app/l10n_util.cc | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'app/l10n_util.cc') diff --git a/app/l10n_util.cc b/app/l10n_util.cc index 0837c02..7b8ceb3 100644 --- a/app/l10n_util.cc +++ b/app/l10n_util.cc @@ -366,9 +366,8 @@ void SplitAndNormalizeLanguageList(const std::string& env_language, namespace l10n_util { -std::string GetApplicationLocale(const std::wstring& pref_locale) { +std::string GetApplicationLocale(const std::string& pref_locale) { #if !defined(OS_MACOSX) - FilePath locale_path; PathService::Get(app::DIR_LOCALES, &locale_path); std::string resolved_locale; @@ -382,7 +381,7 @@ std::string GetApplicationLocale(const std::wstring& pref_locale) { #if defined(OS_WIN) // First, try the preference value. if (!pref_locale.empty()) - candidates.push_back(WideToASCII(pref_locale)); + candidates.push_back(pref_locale); // Next, try the system locale. candidates.push_back(system_locale); @@ -390,7 +389,7 @@ std::string GetApplicationLocale(const std::wstring& pref_locale) { #elif defined(OS_CHROMEOS) // On ChromeOS, use the application locale preference. if (!pref_locale.empty()) - candidates.push_back(WideToASCII(pref_locale)); + candidates.push_back(pref_locale); #elif defined(OS_POSIX) // On POSIX, we also check LANGUAGE environment variable, which is supported @@ -432,9 +431,8 @@ std::string GetApplicationLocale(const std::wstring& pref_locale) { // Use any override (Cocoa for the browser), otherwise use the preference // passed to the function. std::string app_locale = l10n_util::GetLocaleOverride(); - if (app_locale.empty()) { - app_locale = WideToASCII(pref_locale); - } + if (app_locale.empty()) + app_locale = pref_locale; // The above should handle all of the cases Chrome normally hits, but for some // unit tests, we need something to fall back too. -- cgit v1.1