summaryrefslogtreecommitdiffstats
path: root/app/l10n_util.cc
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-04 17:07:46 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-04 17:07:46 +0000
commitff622aa41f2eb00c4f0359a1d661f77ea17d29e1 (patch)
tree0eb7fca9bdb735299cdb3224814c8313bb99301e /app/l10n_util.cc
parent568f33de361dbca27e55bd2c1c025663c7a73d3c (diff)
downloadchromium_src-ff622aa41f2eb00c4f0359a1d661f77ea17d29e1.zip
chromium_src-ff622aa41f2eb00c4f0359a1d661f77ea17d29e1.tar.gz
chromium_src-ff622aa41f2eb00c4f0359a1d661f77ea17d29e1.tar.bz2
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
Diffstat (limited to 'app/l10n_util.cc')
-rw-r--r--app/l10n_util.cc12
1 files changed, 5 insertions, 7 deletions
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.