| 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/preferences.h" | 5 #include "chrome/browser/chromeos/preferences.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "ash/autoclick/autoclick_controller.h" | 9 #include "ash/autoclick/autoclick_controller.h" |
| 10 #include "ash/common/accessibility_types.h" | 10 #include "ash/common/accessibility_types.h" |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 registry->RegisterIntegerPref( | 104 registry->RegisterIntegerPref( |
| 105 prefs::kSystemTimezoneAutomaticDetectionPolicy, | 105 prefs::kSystemTimezoneAutomaticDetectionPolicy, |
| 106 enterprise_management::SystemTimezoneProto::USERS_DECIDE); | 106 enterprise_management::SystemTimezoneProto::USERS_DECIDE); |
| 107 } | 107 } |
| 108 | 108 |
| 109 // static | 109 // static |
| 110 void Preferences::RegisterProfilePrefs( | 110 void Preferences::RegisterProfilePrefs( |
| 111 user_prefs::PrefRegistrySyncable* registry) { | 111 user_prefs::PrefRegistrySyncable* registry) { |
| 112 std::string hardware_keyboard_id; | 112 std::string hardware_keyboard_id; |
| 113 // TODO(yusukes): Remove the runtime hack. | 113 // TODO(yusukes): Remove the runtime hack. |
| 114 if (base::SysInfo::IsRunningOnChromeOS()) { | 114 if (base::SysInfo::IsRunningAsSystemCompositor()) { |
| 115 DCHECK(g_browser_process); | 115 DCHECK(g_browser_process); |
| 116 PrefService* local_state = g_browser_process->local_state(); | 116 PrefService* local_state = g_browser_process->local_state(); |
| 117 DCHECK(local_state); | 117 DCHECK(local_state); |
| 118 hardware_keyboard_id = | 118 hardware_keyboard_id = |
| 119 local_state->GetString(prefs::kHardwareKeyboardLayout); | 119 local_state->GetString(prefs::kHardwareKeyboardLayout); |
| 120 } else { | 120 } else { |
| 121 hardware_keyboard_id = "xkb:us::eng"; // only for testing. | 121 hardware_keyboard_id = "xkb:us::eng"; // only for testing. |
| 122 } | 122 } |
| 123 | 123 |
| 124 registry->RegisterBooleanPref(prefs::kPerformanceTracingEnabled, false); | 124 registry->RegisterBooleanPref(prefs::kPerformanceTracingEnabled, false); |
| (...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 796 touch_hud_projection_enabled_.SetValue(enabled); | 796 touch_hud_projection_enabled_.SetValue(enabled); |
| 797 } | 797 } |
| 798 | 798 |
| 799 void Preferences::ActiveUserChanged(const user_manager::User* active_user) { | 799 void Preferences::ActiveUserChanged(const user_manager::User* active_user) { |
| 800 if (active_user != user_) | 800 if (active_user != user_) |
| 801 return; | 801 return; |
| 802 ApplyPreferences(REASON_ACTIVE_USER_CHANGED, ""); | 802 ApplyPreferences(REASON_ACTIVE_USER_CHANGED, ""); |
| 803 } | 803 } |
| 804 | 804 |
| 805 } // namespace chromeos | 805 } // namespace chromeos |
| OLD | NEW |