Chromium Code Reviews| Index: chrome/browser/chromeos/login/login_utils.cc | 
| diff --git a/chrome/browser/chromeos/login/login_utils.cc b/chrome/browser/chromeos/login/login_utils.cc | 
| index 8d45a00f1668dc361b5571d16ff9ce5e6ac97e39..fba6b28aacf260d8bed4dc9d8352f3e02a27bdef 100644 | 
| --- a/chrome/browser/chromeos/login/login_utils.cc | 
| +++ b/chrome/browser/chromeos/login/login_utils.cc | 
| @@ -27,6 +27,7 @@ | 
| #include "chrome/browser/chromeos/input_method/input_method_util.h" | 
| #include "chrome/browser/chromeos/login/cookie_fetcher.h" | 
| #include "chrome/browser/chromeos/login/google_authenticator.h" | 
| +#include "chrome/browser/chromeos/login/language_switch_menu.h" | 
| #include "chrome/browser/chromeos/login/ownership_service.h" | 
| #include "chrome/browser/chromeos/login/parallel_authenticator.h" | 
| #include "chrome/browser/chromeos/login/user_image_downloader.h" | 
| @@ -54,9 +55,8 @@ namespace chromeos { | 
| namespace { | 
| -// Prefix for Auth token received from ClientLogin request. | 
| +// Affixes for Auth token received from ClientLogin request. | 
| const char kAuthPrefix[] = "Auth="; | 
| -// Suffix for Auth token received from ClientLogin request. | 
| const char kAuthSuffix[] = "\n"; | 
| // Increase logging level for Guest mode to avoid LOG(INFO) messages in logs. | 
| @@ -211,6 +211,18 @@ void LoginUtilsImpl::CompleteLogin( | 
| } | 
| btl->AddLoginTimeMarker("TPMOwned", false); | 
| + std::string pref_locale = profile->GetPrefs()->GetString( | 
| 
 
Nikita (slow)
2010/11/13 10:36:59
Please extract into a separate method.
CompleteLog
 
Denis Lagno
2010/11/13 12:48:23
Done.
 
 | 
| + prefs::kApplicationLocale); | 
| + if (pref_locale.empty()) { | 
| + if (first_login) { | 
| 
 
Nikita (slow)
2010/11/13 10:36:59
How do you intend to bootstrap this option to the
 
Denis Lagno
2010/11/13 12:48:23
yes, I think check for first login does not resolv
 
Nikita (slow)
2010/11/15 07:54:41
Agree, there's one more thing remaining - conflict
 
 | 
| + profile->GetPrefs()->SetString( | 
| 
 
Nikita (slow)
2010/11/13 10:36:59
As I understand we're always forcing language sele
 
Denis Lagno
2010/11/13 12:48:23
Done.
 
 | 
| + prefs::kApplicationLocale, | 
| + g_browser_process->GetApplicationLocale()); | 
| + } | 
| + } else { | 
| + LanguageSwitchMenu::SwitchLanguage(pref_locale); | 
| + } | 
| + | 
| static const char kFallbackInputMethodLocale[] = "en-US"; | 
| if (first_login) { | 
| std::string locale(g_browser_process->GetApplicationLocale()); |