| 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/sys_info.h" | 8 #include "base/sys_info.h" |
| 9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
| 10 #include "chrome/browser/chromeos/input_method/input_method_util.h" | |
| 11 #include "chrome/browser/chromeos/language_preferences.h" | 10 #include "chrome/browser/chromeos/language_preferences.h" |
| 12 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
| 13 #include "chrome/browser/profiles/profile_manager.h" | 12 #include "chrome/browser/profiles/profile_manager.h" |
| 14 #include "chrome/common/pref_names.h" | 13 #include "chrome/common/pref_names.h" |
| 15 #include "components/prefs/pref_service.h" | 14 #include "components/prefs/pref_service.h" |
| 16 #include "components/prefs/scoped_user_pref_update.h" | 15 #include "components/prefs/scoped_user_pref_update.h" |
| 16 #include "ui/base/ime/chromeos/input_method_util.h" |
| 17 | 17 |
| 18 namespace chromeos { | 18 namespace chromeos { |
| 19 namespace input_method { | 19 namespace input_method { |
| 20 namespace { | 20 namespace { |
| 21 | 21 |
| 22 void PersistSystemInputMethod(const std::string& input_method) { | 22 void PersistSystemInputMethod(const std::string& input_method) { |
| 23 if (!g_browser_process || !g_browser_process->local_state()) | 23 if (!g_browser_process || !g_browser_process->local_state()) |
| 24 return; | 24 return; |
| 25 | 25 |
| 26 g_browser_process->local_state()->SetString( | 26 g_browser_process->local_state()->SetString( |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 | 155 |
| 156 void SetUserLastInputMethodPreferenceForTesting( | 156 void SetUserLastInputMethodPreferenceForTesting( |
| 157 const std::string& username, | 157 const std::string& username, |
| 158 const std::string& input_method, | 158 const std::string& input_method, |
| 159 PrefService* const local_state) { | 159 PrefService* const local_state) { |
| 160 SetUserLastInputMethodPreference(username, input_method, local_state); | 160 SetUserLastInputMethodPreference(username, input_method, local_state); |
| 161 } | 161 } |
| 162 | 162 |
| 163 } // namespace input_method | 163 } // namespace input_method |
| 164 } // namespace chromeos | 164 } // namespace chromeos |
| OLD | NEW |