Chromium Code Reviews| 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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 313 registry->RegisterBooleanPref( | 314 registry->RegisterBooleanPref( |
| 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 |
| 324 | |
|
bartfab (slow)
2014/12/19 12:08:54
Nit: No need for two blank lines.
Alexander Alekseev
2014/12/22 22:20:11
Done.
| |
| 323 input_method::InputMethodSyncer::RegisterProfilePrefs(registry); | 325 input_method::InputMethodSyncer::RegisterProfilePrefs(registry); |
| 326 | |
| 327 registry->RegisterIntegerPref( | |
| 328 prefs::kCaptivePortalAuthenticationIgnoresProxy, | |
| 329 CAPTIVE_PORTAL_AUTH_IGNORE_PROXY_USER_CONFIGURABLE, | |
| 330 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | |
| 324 } | 331 } |
| 325 | 332 |
| 326 void Preferences::InitUserPrefs(PrefServiceSyncable* prefs) { | 333 void Preferences::InitUserPrefs(PrefServiceSyncable* prefs) { |
| 327 prefs_ = prefs; | 334 prefs_ = prefs; |
| 328 | 335 |
| 329 BooleanPrefMember::NamedChangeCallback callback = | 336 BooleanPrefMember::NamedChangeCallback callback = |
| 330 base::Bind(&Preferences::OnPreferenceChanged, base::Unretained(this)); | 337 base::Bind(&Preferences::OnPreferenceChanged, base::Unretained(this)); |
| 331 | 338 |
| 332 performance_tracing_enabled_.Init(prefs::kPerformanceTracingEnabled, | 339 performance_tracing_enabled_.Init(prefs::kPerformanceTracingEnabled, |
| 333 prefs, callback); | 340 prefs, callback); |
| (...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 692 touch_hud_projection_enabled_.SetValue(enabled); | 699 touch_hud_projection_enabled_.SetValue(enabled); |
| 693 } | 700 } |
| 694 | 701 |
| 695 void Preferences::ActiveUserChanged(const user_manager::User* active_user) { | 702 void Preferences::ActiveUserChanged(const user_manager::User* active_user) { |
| 696 if (active_user != user_) | 703 if (active_user != user_) |
| 697 return; | 704 return; |
| 698 ApplyPreferences(REASON_ACTIVE_USER_CHANGED, ""); | 705 ApplyPreferences(REASON_ACTIVE_USER_CHANGED, ""); |
| 699 } | 706 } |
| 700 | 707 |
| 701 } // namespace chromeos | 708 } // namespace chromeos |
| OLD | NEW |