| 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/wm_shell.h" | 10 #include "ash/common/wm_shell.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 #include "components/feedback/tracing_manager.h" | 38 #include "components/feedback/tracing_manager.h" |
| 39 #include "components/pref_registry/pref_registry_syncable.h" | 39 #include "components/pref_registry/pref_registry_syncable.h" |
| 40 #include "components/prefs/pref_member.h" | 40 #include "components/prefs/pref_member.h" |
| 41 #include "components/prefs/pref_registry_simple.h" | 41 #include "components/prefs/pref_registry_simple.h" |
| 42 #include "components/prefs/scoped_user_pref_update.h" | 42 #include "components/prefs/scoped_user_pref_update.h" |
| 43 #include "components/syncable_prefs/pref_service_syncable.h" | 43 #include "components/syncable_prefs/pref_service_syncable.h" |
| 44 #include "components/user_manager/known_user.h" | 44 #include "components/user_manager/known_user.h" |
| 45 #include "components/user_manager/user.h" | 45 #include "components/user_manager/user.h" |
| 46 #include "components/user_manager/user_manager.h" | 46 #include "components/user_manager/user_manager.h" |
| 47 #include "content/public/browser/browser_thread.h" | 47 #include "content/public/browser/browser_thread.h" |
| 48 #include "third_party/cros_system_api/dbus/update_engine/dbus-constants.h" |
| 48 #include "third_party/icu/source/i18n/unicode/timezone.h" | 49 #include "third_party/icu/source/i18n/unicode/timezone.h" |
| 49 #include "ui/base/ime/chromeos/extension_ime_util.h" | 50 #include "ui/base/ime/chromeos/extension_ime_util.h" |
| 50 #include "ui/base/ime/chromeos/ime_keyboard.h" | 51 #include "ui/base/ime/chromeos/ime_keyboard.h" |
| 51 #include "ui/base/ime/chromeos/input_method_manager.h" | 52 #include "ui/base/ime/chromeos/input_method_manager.h" |
| 52 #include "ui/chromeos/accessibility_types.h" | 53 #include "ui/chromeos/accessibility_types.h" |
| 53 #include "ui/events/event_constants.h" | 54 #include "ui/events/event_constants.h" |
| 54 #include "ui/events/event_utils.h" | 55 #include "ui/events/event_utils.h" |
| 55 #include "url/gurl.h" | 56 #include "url/gurl.h" |
| 56 | 57 |
| 57 namespace chromeos { | 58 namespace chromeos { |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 | 310 |
| 310 registry->RegisterBooleanPref(prefs::kCaptivePortalAuthenticationIgnoresProxy, | 311 registry->RegisterBooleanPref(prefs::kCaptivePortalAuthenticationIgnoresProxy, |
| 311 true); | 312 true); |
| 312 | 313 |
| 313 registry->RegisterBooleanPref(prefs::kForceMaximizeOnFirstRun, false); | 314 registry->RegisterBooleanPref(prefs::kForceMaximizeOnFirstRun, false); |
| 314 | 315 |
| 315 registry->RegisterBooleanPref(prefs::kLanguageImeMenuActivated, false); | 316 registry->RegisterBooleanPref(prefs::kLanguageImeMenuActivated, false); |
| 316 | 317 |
| 317 registry->RegisterInt64Pref(prefs::kHatsLastInteractionTimestamp, | 318 registry->RegisterInt64Pref(prefs::kHatsLastInteractionTimestamp, |
| 318 base::Time().ToInternalValue()); | 319 base::Time().ToInternalValue()); |
| 320 |
| 321 // We don't sync EOL related prefs because they are device specific. |
| 322 registry->RegisterBooleanPref(prefs::kEolNotificationDismissed, false); |
| 323 registry->RegisterIntegerPref(prefs::kEolStatus, |
| 324 update_engine::EndOfLifeStatus::kSupported); |
| 319 } | 325 } |
| 320 | 326 |
| 321 void Preferences::InitUserPrefs(syncable_prefs::PrefServiceSyncable* prefs) { | 327 void Preferences::InitUserPrefs(syncable_prefs::PrefServiceSyncable* prefs) { |
| 322 prefs_ = prefs; | 328 prefs_ = prefs; |
| 323 | 329 |
| 324 BooleanPrefMember::NamedChangeCallback callback = | 330 BooleanPrefMember::NamedChangeCallback callback = |
| 325 base::Bind(&Preferences::OnPreferenceChanged, base::Unretained(this)); | 331 base::Bind(&Preferences::OnPreferenceChanged, base::Unretained(this)); |
| 326 | 332 |
| 327 performance_tracing_enabled_.Init(prefs::kPerformanceTracingEnabled, | 333 performance_tracing_enabled_.Init(prefs::kPerformanceTracingEnabled, |
| 328 prefs, callback); | 334 prefs, callback); |
| (...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 764 touch_hud_projection_enabled_.SetValue(enabled); | 770 touch_hud_projection_enabled_.SetValue(enabled); |
| 765 } | 771 } |
| 766 | 772 |
| 767 void Preferences::ActiveUserChanged(const user_manager::User* active_user) { | 773 void Preferences::ActiveUserChanged(const user_manager::User* active_user) { |
| 768 if (active_user != user_) | 774 if (active_user != user_) |
| 769 return; | 775 return; |
| 770 ApplyPreferences(REASON_ACTIVE_USER_CHANGED, ""); | 776 ApplyPreferences(REASON_ACTIVE_USER_CHANGED, ""); |
| 771 } | 777 } |
| 772 | 778 |
| 773 } // namespace chromeos | 779 } // namespace chromeos |
| OLD | NEW |