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/shell.h" | 10 #include "ash/shell.h" |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
82 } | 82 } |
83 | 83 |
84 // static | 84 // static |
85 void Preferences::RegisterPrefs(PrefRegistrySimple* registry) { | 85 void Preferences::RegisterPrefs(PrefRegistrySimple* registry) { |
86 registry->RegisterBooleanPref(prefs::kOwnerPrimaryMouseButtonRight, false); | 86 registry->RegisterBooleanPref(prefs::kOwnerPrimaryMouseButtonRight, false); |
87 registry->RegisterBooleanPref(prefs::kOwnerTapToClickEnabled, true); | 87 registry->RegisterBooleanPref(prefs::kOwnerTapToClickEnabled, true); |
88 registry->RegisterBooleanPref(prefs::kAccessibilityVirtualKeyboardEnabled, | 88 registry->RegisterBooleanPref(prefs::kAccessibilityVirtualKeyboardEnabled, |
89 false); | 89 false); |
90 registry->RegisterStringPref(prefs::kLogoutStartedLast, std::string()); | 90 registry->RegisterStringPref(prefs::kLogoutStartedLast, std::string()); |
91 registry->RegisterBooleanPref(prefs::kResolveDeviceTimezoneByGeolocation, | 91 registry->RegisterBooleanPref(prefs::kResolveDeviceTimezoneByGeolocation, |
92 false); | 92 true); |
93 } | 93 } |
94 | 94 |
95 // static | 95 // static |
96 void Preferences::RegisterProfilePrefs( | 96 void Preferences::RegisterProfilePrefs( |
97 user_prefs::PrefRegistrySyncable* registry) { | 97 user_prefs::PrefRegistrySyncable* registry) { |
98 std::string hardware_keyboard_id; | 98 std::string hardware_keyboard_id; |
99 // TODO(yusukes): Remove the runtime hack. | 99 // TODO(yusukes): Remove the runtime hack. |
100 if (base::SysInfo::IsRunningOnChromeOS()) { | 100 if (base::SysInfo::IsRunningOnChromeOS()) { |
101 DCHECK(g_browser_process); | 101 DCHECK(g_browser_process); |
102 PrefService* local_state = g_browser_process->local_state(); | 102 PrefService* local_state = g_browser_process->local_state(); |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
312 prefs::kTouchHudProjectionEnabled, | 312 prefs::kTouchHudProjectionEnabled, |
313 false, | 313 false, |
314 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 314 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
315 | 315 |
316 registry->RegisterBooleanPref( | 316 registry->RegisterBooleanPref( |
317 prefs::kTouchVirtualKeyboardEnabled, | 317 prefs::kTouchVirtualKeyboardEnabled, |
318 false, | 318 false, |
319 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 319 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
320 | 320 |
321 registry->RegisterBooleanPref( | 321 registry->RegisterBooleanPref( |
322 prefs::kResolveTimezoneByGeolocation, false, | 322 prefs::kResolveTimezoneByGeolocation, true, |
323 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 323 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
Nikita (slow)
2015/02/19 16:34:01
This should be syncable.
Alexander Alekseev
2015/02/19 16:38:46
I've sent this question to PM.
| |
324 | 324 |
325 input_method::InputMethodSyncer::RegisterProfilePrefs(registry); | 325 input_method::InputMethodSyncer::RegisterProfilePrefs(registry); |
326 } | 326 } |
327 | 327 |
328 void Preferences::InitUserPrefs(PrefServiceSyncable* prefs) { | 328 void Preferences::InitUserPrefs(PrefServiceSyncable* prefs) { |
329 prefs_ = prefs; | 329 prefs_ = prefs; |
330 | 330 |
331 BooleanPrefMember::NamedChangeCallback callback = | 331 BooleanPrefMember::NamedChangeCallback callback = |
332 base::Bind(&Preferences::OnPreferenceChanged, base::Unretained(this)); | 332 base::Bind(&Preferences::OnPreferenceChanged, base::Unretained(this)); |
333 | 333 |
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
728 touch_hud_projection_enabled_.SetValue(enabled); | 728 touch_hud_projection_enabled_.SetValue(enabled); |
729 } | 729 } |
730 | 730 |
731 void Preferences::ActiveUserChanged(const user_manager::User* active_user) { | 731 void Preferences::ActiveUserChanged(const user_manager::User* active_user) { |
732 if (active_user != user_) | 732 if (active_user != user_) |
733 return; | 733 return; |
734 ApplyPreferences(REASON_ACTIVE_USER_CHANGED, ""); | 734 ApplyPreferences(REASON_ACTIVE_USER_CHANGED, ""); |
735 } | 735 } |
736 | 736 |
737 } // namespace chromeos | 737 } // namespace chromeos |
OLD | NEW |