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

Unified Diff: chrome/browser/chromeos/login/user_manager_impl.cc

Issue 133273032: Guest Mode: input method should default to the underlying latin keyboard layout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Use EnableInputMethod instead of EnableInputMethods. Created 6 years, 11 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
Index: chrome/browser/chromeos/login/user_manager_impl.cc
diff --git a/chrome/browser/chromeos/login/user_manager_impl.cc b/chrome/browser/chromeos/login/user_manager_impl.cc
index 30a547a098b402c8d20ba44526ac98393f23b4c4..bc7eb63bf7510b051e776290bb0bba0b12d4db64 100644
--- a/chrome/browser/chromeos/login/user_manager_impl.cc
+++ b/chrome/browser/chromeos/login/user_manager_impl.cc
@@ -839,13 +839,21 @@ bool UserManagerImpl::RespectLocalePreference(
: (std::string("account_locale - unused. ")))
<< " Selected '" << pref_locale << "'";
profile->ChangeAppLocale(pref_locale, Profile::APP_LOCALE_CHANGED_VIA_LOGIN);
- // Here we don't enable keyboard layouts. Input methods are set up when
- // the user first logs in. Then the user may customize the input methods.
- // Hence changing input methods here, just because the user's UI language
- // is different from the login screen UI language, is not desirable. Note
- // that input method preferences are synced, so users can use their
- // farovite input methods as soon as the preferences are synced.
- locale_util::SwitchLanguage(pref_locale, false, callback.Pass());
+
+ // Here we don't enable keyboard layouts for normal users. Input methods
+ // are set up when the user first logs in. Then the user may customize the
+ // input methods. Hence changing input methods here, just because the user's
+ // UI language is different from the login screen UI language, is not
+ // desirable. Note that input method preferences are synced, so users can use
+ // their farovite input methods as soon as the preferences are synced.
+ //
+ // For Guest mode, user locale preferences will never get initialized.
+ // So input methods should be enabled somewhere.
+ const bool enable_layouts = UserManager::Get()->IsLoggedInAsGuest();
+ locale_util::SwitchLanguage(pref_locale,
+ enable_layouts,
+ false /* login_layouts_only */,
+ callback.Pass());
return true;
}

Powered by Google App Engine
This is Rietveld 408576698