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

Unified Diff: chrome/browser/chromeos/input_method/input_method_persistence.cc

Issue 1055863002: ChromeOS: switch UI language before apps are loaded. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove empty line. Created 5 years, 7 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/input_method/input_method_persistence.cc
diff --git a/chrome/browser/chromeos/input_method/input_method_persistence.cc b/chrome/browser/chromeos/input_method/input_method_persistence.cc
index b89404b3019e34041b3ef6777a366681dac58a12..7bc298f74ff01a9137d252359d895d7df438bb8b 100644
--- a/chrome/browser/chromeos/input_method/input_method_persistence.cc
+++ b/chrome/browser/chromeos/input_method/input_method_persistence.cc
@@ -83,12 +83,12 @@ static void SetUserLRUInputMethod(
}
void PersistUserInputMethod(const std::string& input_method,
- InputMethodManager* const manager) {
+ InputMethodManager* const manager,
+ Profile* profile) {
PrefService* user_prefs = NULL;
// Persist the method on a per user basis. Note that the keyboard settings are
// stored per user desktop and a visiting window will use the same input
// method as the desktop it is on (and not of the owner of the window).
- Profile* profile = ProfileManager::GetActiveUserProfile();
if (profile)
user_prefs = profile->GetPrefs();
if (!user_prefs)
@@ -119,8 +119,9 @@ InputMethodPersistence::~InputMethodPersistence() {
input_method_manager_->RemoveObserver(this);
}
-void InputMethodPersistence::InputMethodChanged(
- InputMethodManager* manager, bool show_message) {
+void InputMethodPersistence::InputMethodChanged(InputMethodManager* manager,
+ Profile* profile,
+ bool show_message) {
DCHECK_EQ(input_method_manager_, manager);
const std::string current_input_method =
manager->GetActiveIMEState()->GetCurrentInputMethod().id();
@@ -135,7 +136,7 @@ void InputMethodPersistence::InputMethodChanged(
PersistSystemInputMethod(current_input_method);
return;
case InputMethodManager::STATE_BROWSER_SCREEN:
- PersistUserInputMethod(current_input_method, manager);
+ PersistUserInputMethod(current_input_method, manager, profile);
return;
case InputMethodManager::STATE_LOCK_SCREEN:
// We use a special set of input methods on the screen. Do not update.

Powered by Google App Engine
This is Rietveld 408576698