| Index: app/l10n_util.cc
|
| diff --git a/app/l10n_util.cc b/app/l10n_util.cc
|
| index e50bbb8f422cf8c21210807a1a9720b474cead4e..9da76fc25239df0b79e4900d444d6c9d69ab577a 100644
|
| --- a/app/l10n_util.cc
|
| +++ b/app/l10n_util.cc
|
| @@ -381,14 +381,7 @@ std::string GetApplicationLocale(const std::wstring& pref_locale) {
|
| // to renderer and plugin processes so they know what language the parent
|
| // process decided to use.
|
| #if defined(OS_WIN)
|
| - // First, check to see if there's a --lang flag.
|
| - const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess();
|
| - const std::string& lang_arg =
|
| - parsed_command_line.GetSwitchValueASCII(switches::kLang);
|
| - if (!lang_arg.empty())
|
| - candidates.push_back(lang_arg);
|
| -
|
| - // Second, try user prefs.
|
| + // First, try the preference value.
|
| if (!pref_locale.empty())
|
| candidates.push_back(WideToASCII(pref_locale));
|
|
|
| @@ -396,15 +389,7 @@ std::string GetApplicationLocale(const std::wstring& pref_locale) {
|
| candidates.push_back(system_locale);
|
|
|
| #elif defined(OS_CHROMEOS)
|
| - // We use --lang on chroemos for debugging/troubleshooting purpose.
|
| - const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess();
|
| - const std::string& lang_arg =
|
| - parsed_command_line.GetSwitchValueASCII(switches::kLang);
|
| - if (!lang_arg.empty())
|
| - candidates.push_back(lang_arg);
|
| -
|
| - // On ChromeOS, try user prefs. This restores the locale used by the
|
| - // previous run of the OS.
|
| + // On ChromeOS, use the application locale preference.
|
| if (!pref_locale.empty())
|
| candidates.push_back(WideToASCII(pref_locale));
|
|
|
| @@ -445,12 +430,11 @@ std::string GetApplicationLocale(const std::wstring& pref_locale) {
|
|
|
| #else // !defined(OS_MACOSX)
|
|
|
| - // Use any override (Cocoa for the browser), otherwise use the command line
|
| - // argument.
|
| + // 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()) {
|
| - const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess();
|
| - app_locale = parsed_command_line.GetSwitchValueASCII(switches::kLang);
|
| + app_locale = WideToASCII(pref_locale);
|
| }
|
|
|
| // The above should handle all of the cases Chrome normally hits, but for some
|
|
|