OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/chromeos/input_method/input_method_persistence.h" | 5 #include "chrome/browser/chromeos/input_method/input_method_persistence.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
9 #include "base/prefs/scoped_user_pref_update.h" | 9 #include "base/prefs/scoped_user_pref_update.h" |
10 #include "base/sys_info.h" | 10 #include "base/sys_info.h" |
11 #include "chrome/browser/browser_process.h" | 11 #include "chrome/browser/browser_process.h" |
12 #include "chrome/browser/chromeos/input_method/input_method_util.h" | 12 #include "chrome/browser/chromeos/input_method/input_method_util.h" |
13 #include "chrome/browser/chromeos/language_preferences.h" | 13 #include "chrome/browser/chromeos/language_preferences.h" |
14 #include "chrome/browser/chromeos/login/users/user_manager.h" | |
15 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
16 #include "chrome/browser/profiles/profile_manager.h" | 15 #include "chrome/browser/profiles/profile_manager.h" |
17 #include "chrome/common/pref_names.h" | 16 #include "chrome/common/pref_names.h" |
| 17 #include "components/user_manager/user_manager.h" |
18 | 18 |
19 namespace chromeos { | 19 namespace chromeos { |
20 namespace input_method { | 20 namespace input_method { |
21 namespace { | 21 namespace { |
22 | 22 |
23 void PersistSystemInputMethod(const std::string& input_method) { | 23 void PersistSystemInputMethod(const std::string& input_method) { |
24 if (!g_browser_process || !g_browser_process->local_state()) | 24 if (!g_browser_process || !g_browser_process->local_state()) |
25 return; | 25 return; |
26 | 26 |
27 g_browser_process->local_state()->SetString( | 27 g_browser_process->local_state()->SetString( |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 NOTREACHED(); | 142 NOTREACHED(); |
143 } | 143 } |
144 | 144 |
145 void InputMethodPersistence::OnSessionStateChange( | 145 void InputMethodPersistence::OnSessionStateChange( |
146 InputMethodManager::State new_state) { | 146 InputMethodManager::State new_state) { |
147 state_ = new_state; | 147 state_ = new_state; |
148 } | 148 } |
149 | 149 |
150 } // namespace input_method | 150 } // namespace input_method |
151 } // namespace chromeos | 151 } // namespace chromeos |
OLD | NEW |