| 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" |
| 11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
| 12 #include "base/i18n/time_formatting.h" | 12 #include "base/i18n/time_formatting.h" |
| 13 #include "base/metrics/histogram.h" | 13 #include "base/metrics/histogram.h" |
| 14 #include "base/prefs/pref_member.h" | 14 #include "base/prefs/pref_member.h" |
| 15 #include "base/prefs/pref_registry_simple.h" | 15 #include "base/prefs/pref_registry_simple.h" |
| 16 #include "base/prefs/scoped_user_pref_update.h" | 16 #include "base/prefs/scoped_user_pref_update.h" |
| 17 #include "base/strings/string_split.h" | 17 #include "base/strings/string_split.h" |
| 18 #include "base/strings/string_util.h" | 18 #include "base/strings/string_util.h" |
| 19 #include "base/strings/utf_string_conversions.h" | 19 #include "base/strings/utf_string_conversions.h" |
| 20 #include "base/sys_info.h" | 20 #include "base/sys_info.h" |
| 21 #include "chrome/browser/browser_process.h" | 21 #include "chrome/browser/browser_process.h" |
| 22 #include "chrome/browser/chrome_notification_types.h" | 22 #include "chrome/browser/chrome_notification_types.h" |
| 23 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" | 23 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" |
| 24 #include "chrome/browser/chromeos/drive/file_system_util.h" | 24 #include "chrome/browser/chromeos/drive/file_system_util.h" |
| 25 #include "chrome/browser/chromeos/input_method/input_method_syncer.h" | 25 #include "chrome/browser/chromeos/input_method/input_method_syncer.h" |
| 26 #include "chrome/browser/chromeos/login/session/user_session_manager.h" | 26 #include "chrome/browser/chromeos/login/session/user_session_manager.h" |
| 27 #include "chrome/browser/chromeos/net/captive_portal_ignore_proxy_policy_values.
h" |
| 27 #include "chrome/browser/chromeos/net/wake_on_wifi_manager.h" | 28 #include "chrome/browser/chromeos/net/wake_on_wifi_manager.h" |
| 28 #include "chrome/browser/chromeos/system/input_device_settings.h" | 29 #include "chrome/browser/chromeos/system/input_device_settings.h" |
| 29 #include "chrome/browser/download/download_prefs.h" | 30 #include "chrome/browser/download/download_prefs.h" |
| 30 #include "chrome/browser/prefs/pref_service_syncable.h" | 31 #include "chrome/browser/prefs/pref_service_syncable.h" |
| 31 #include "chrome/common/chrome_switches.h" | 32 #include "chrome/common/chrome_switches.h" |
| 32 #include "chrome/common/pref_names.h" | 33 #include "chrome/common/pref_names.h" |
| 33 #include "chromeos/chromeos_switches.h" | 34 #include "chromeos/chromeos_switches.h" |
| 34 #include "chromeos/system/statistics_provider.h" | 35 #include "chromeos/system/statistics_provider.h" |
| 35 #include "components/feedback/tracing_manager.h" | 36 #include "components/feedback/tracing_manager.h" |
| 36 #include "components/pref_registry/pref_registry_syncable.h" | 37 #include "components/pref_registry/pref_registry_syncable.h" |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 prefs::kTouchHudProjectionEnabled, | 315 prefs::kTouchHudProjectionEnabled, |
| 315 false, | 316 false, |
| 316 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 317 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 317 | 318 |
| 318 registry->RegisterBooleanPref( | 319 registry->RegisterBooleanPref( |
| 319 prefs::kTouchVirtualKeyboardEnabled, | 320 prefs::kTouchVirtualKeyboardEnabled, |
| 320 false, | 321 false, |
| 321 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 322 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 322 | 323 |
| 323 input_method::InputMethodSyncer::RegisterProfilePrefs(registry); | 324 input_method::InputMethodSyncer::RegisterProfilePrefs(registry); |
| 325 |
| 326 registry->RegisterIntegerPref( |
| 327 prefs::kCaptivePortalAuthenticationIgnoresProxy, |
| 328 CAPTIVE_PORTAL_AUTH_IGNORE_PROXY_USER_CONFIGURABLE, |
| 329 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 324 } | 330 } |
| 325 | 331 |
| 326 void Preferences::InitUserPrefs(PrefServiceSyncable* prefs) { | 332 void Preferences::InitUserPrefs(PrefServiceSyncable* prefs) { |
| 327 prefs_ = prefs; | 333 prefs_ = prefs; |
| 328 | 334 |
| 329 BooleanPrefMember::NamedChangeCallback callback = | 335 BooleanPrefMember::NamedChangeCallback callback = |
| 330 base::Bind(&Preferences::OnPreferenceChanged, base::Unretained(this)); | 336 base::Bind(&Preferences::OnPreferenceChanged, base::Unretained(this)); |
| 331 | 337 |
| 332 performance_tracing_enabled_.Init(prefs::kPerformanceTracingEnabled, | 338 performance_tracing_enabled_.Init(prefs::kPerformanceTracingEnabled, |
| 333 prefs, callback); | 339 prefs, callback); |
| (...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 692 touch_hud_projection_enabled_.SetValue(enabled); | 698 touch_hud_projection_enabled_.SetValue(enabled); |
| 693 } | 699 } |
| 694 | 700 |
| 695 void Preferences::ActiveUserChanged(const user_manager::User* active_user) { | 701 void Preferences::ActiveUserChanged(const user_manager::User* active_user) { |
| 696 if (active_user != user_) | 702 if (active_user != user_) |
| 697 return; | 703 return; |
| 698 ApplyPreferences(REASON_ACTIVE_USER_CHANGED, ""); | 704 ApplyPreferences(REASON_ACTIVE_USER_CHANGED, ""); |
| 699 } | 705 } |
| 700 | 706 |
| 701 } // namespace chromeos | 707 } // namespace chromeos |
| OLD | NEW |