Avi Drissman | 3a215d1e | 2022-09-07 19:43:09 | [diff] [blame] | 1 | // Copyright 2019 The Chromium Authors |
Xiyuan Xia | 5a8c417 | 2019-05-13 16:23:48 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #include "ash/public/cpp/ash_prefs.h" |
| 6 | |
Longbo Wei | dcc3837 | 2023-08-23 16:59:18 | [diff] [blame] | 7 | #include "ash/accelerators/accelerator_prefs.h" |
Jimmy | 59b749d | 2023-05-04 17:21:13 | [diff] [blame] | 8 | #include "ash/accelerators/ash_accelerator_configuration.h" |
Katie Dektar | 582ae10 | 2023-12-13 03:15:54 | [diff] [blame] | 9 | #include "ash/accessibility/accessibility_controller.h" |
Josiah K | 466b0dc3 | 2021-06-16 23:39:05 | [diff] [blame] | 10 | #include "ash/accessibility/magnifier/docked_magnifier_controller.h" |
wutao | 3a150d71b | 2020-02-19 22:11:26 | [diff] [blame] | 11 | #include "ash/ambient/ambient_controller.h" |
Emmanuel Arias Soto | 4de5f2b7 | 2023-04-26 15:58:24 | [diff] [blame] | 12 | #include "ash/ambient/managed/screensaver_images_policy_handler.h" |
Xiyuan Xia | 5a8c417 | 2019-05-13 16:23:48 | [diff] [blame] | 13 | #include "ash/app_list/app_list_controller_impl.h" |
Wen-Chien Wang | 9adb624 | 2023-08-14 20:31:04 | [diff] [blame] | 14 | #include "ash/app_list/views/app_list_nudge_controller.h" |
| 15 | #include "ash/app_list/views/search_notifier_controller.h" |
David Black | ec4cbcd | 2020-04-15 20:35:25 | [diff] [blame] | 16 | #include "ash/assistant/assistant_controller_impl.h" |
Ramya Gopalan | 96b2aa2 | 2022-08-23 17:30:00 | [diff] [blame] | 17 | #include "ash/calendar/calendar_controller.h" |
Ahmed Fakhry | 766bac6 | 2021-09-24 02:36:19 | [diff] [blame] | 18 | #include "ash/capture_mode/capture_mode_controller.h" |
Elijah Hewer | 641b2243 | 2023-11-18 02:59:36 | [diff] [blame] | 19 | #include "ash/capture_mode/capture_mode_education_controller.h" |
David Black | fcfe4465 | 2023-08-04 22:57:22 | [diff] [blame] | 20 | #include "ash/clipboard/clipboard_history_controller_impl.h" |
Gordon Seto | c7b5631e | 2021-11-12 22:48:28 | [diff] [blame] | 21 | #include "ash/constants/ash_features.h" |
Henrique Ferreiro | 3777026 | 2021-02-06 01:20:53 | [diff] [blame] | 22 | #include "ash/constants/ash_pref_names.h" |
Jason Thai | aa31bb1 | 2022-06-07 21:50:26 | [diff] [blame] | 23 | #include "ash/controls/contextual_tooltip.h" |
Xiyuan Xia | 14619a2 | 2019-05-14 20:20:44 | [diff] [blame] | 24 | #include "ash/detachable_base/detachable_base_handler.h" |
| 25 | #include "ash/display/display_prefs.h" |
Gil Dekel | 6977703 | 2020-02-07 18:41:53 | [diff] [blame] | 26 | #include "ash/display/privacy_screen_controller.h" |
Gina Domergue | 4dfbac25 | 2024-02-12 19:03:34 | [diff] [blame] | 27 | #include "ash/game_dashboard/game_dashboard_controller.h" |
Matthew Mourgos | 9704006 | 2023-09-27 22:33:44 | [diff] [blame] | 28 | #include "ash/glanceables/glanceables_controller.h" |
Chloe Pelling | 186ed3e | 2020-04-27 01:08:34 | [diff] [blame] | 29 | #include "ash/keyboard/keyboard_controller_impl.h" |
Xiyuan Xia | 5a8c417 | 2019-05-13 16:23:48 | [diff] [blame] | 30 | #include "ash/login/login_screen_controller.h" |
Aya ElAttar | d2b3c8a | 2020-06-22 23:02:13 | [diff] [blame] | 31 | #include "ash/login/ui/login_expanded_public_account_view.h" |
Mia Bergeron | 12fd2f18 | 2019-06-11 23:04:46 | [diff] [blame] | 32 | #include "ash/media/media_controller_impl.h" |
Andrew Xu | cfed58c | 2022-04-13 22:25:51 | [diff] [blame] | 33 | #include "ash/metrics/feature_discovery_duration_reporter_impl.h" |
Courtney Wong | fa3b7190 | 2022-05-12 22:21:34 | [diff] [blame] | 34 | #include "ash/projector/projector_controller_impl.h" |
Ahmed Mehfooz | e6167f5 | 2020-10-22 20:01:33 | [diff] [blame] | 35 | #include "ash/public/cpp/holding_space/holding_space_prefs.h" |
Daniel Classon | e31b84fd2 | 2021-10-05 02:41:57 | [diff] [blame] | 36 | #include "ash/quick_pair/keyed_service/quick_pair_mediator.h" |
Xiaodan Zhu | d5b8187 | 2020-11-12 18:15:29 | [diff] [blame] | 37 | #include "ash/session/fullscreen_controller.h" |
David Black | 57245f3 | 2023-03-07 19:36:08 | [diff] [blame] | 38 | #include "ash/session/session_controller_impl.h" |
Xiyuan Xia | 5a8c417 | 2019-05-13 16:23:48 | [diff] [blame] | 39 | #include "ash/shelf/shelf_controller.h" |
Erica Lee | 50bbcae | 2023-01-14 01:26:56 | [diff] [blame] | 40 | #include "ash/style/color_palette_controller.h" |
minch | c568dd7 | 2022-06-24 17:41:43 | [diff] [blame] | 41 | #include "ash/style/dark_light_mode_controller_impl.h" |
Pi-Hsun Shih | 2ddabea | 2022-07-21 07:45:44 | [diff] [blame] | 42 | #include "ash/system/camera/autozoom_controller_impl.h" |
Pi-Hsun Shih | faac34f | 2022-08-03 10:39:12 | [diff] [blame] | 43 | #include "ash/system/camera/autozoom_nudge_controller.h" |
Wei Lee | 19ecfd93 | 2023-05-23 01:57:39 | [diff] [blame] | 44 | #include "ash/system/camera/camera_app_prefs.h" |
Guoxing Zhao | 191ec87 | 2022-11-28 02:06:34 | [diff] [blame] | 45 | #include "ash/system/camera/camera_effects_controller.h" |
Richard Chui | 6556e8e | 2023-08-29 02:09:35 | [diff] [blame] | 46 | #include "ash/system/focus_mode/focus_mode_controller.h" |
Eric Sum | f97e7b89 | 2023-04-17 22:41:44 | [diff] [blame] | 47 | #include "ash/system/geolocation/geolocation_controller.h" |
Jason Zhang | d42ca486 | 2023-05-04 01:57:49 | [diff] [blame] | 48 | #include "ash/system/hotspot/hotspot_info_cache.h" |
Michael Martis | 0a412c6c | 2022-05-10 03:40:07 | [diff] [blame] | 49 | #include "ash/system/human_presence/snooping_protection_controller.h" |
Michael Checo | 76cfece | 2023-02-08 00:53:24 | [diff] [blame] | 50 | #include "ash/system/input_device_settings/input_device_settings_controller_impl.h" |
Michael Checo | 606fde0 | 2023-07-12 23:39:52 | [diff] [blame] | 51 | #include "ash/system/input_device_settings/input_device_settings_notification_controller.h" |
David Padlipsky | 76712208 | 2023-01-20 00:15:57 | [diff] [blame] | 52 | #include "ash/system/input_device_settings/input_device_tracker.h" |
David Padlipsky | 37b5193 | 2023-01-26 01:44:59 | [diff] [blame] | 53 | #include "ash/system/input_device_settings/keyboard_modifier_metrics_recorder.h" |
Jason Thai | e367085 | 2022-05-10 21:19:18 | [diff] [blame] | 54 | #include "ash/system/keyboard_brightness/keyboard_backlight_color_controller.h" |
Jazz Xu | bfefcba | 2020-09-25 01:59:13 | [diff] [blame] | 55 | #include "ash/system/media/media_tray.h" |
Gordon Seto | 5623514d | 2021-01-27 23:52:28 | [diff] [blame] | 56 | #include "ash/system/network/cellular_setup_notifier.h" |
James Cook | 9d79e981 | 2023-05-05 02:35:29 | [diff] [blame] | 57 | #include "ash/system/network/vpn_detailed_view.h" |
Steven Bennetts | 32f5d55 | 2019-07-09 16:16:13 | [diff] [blame] | 58 | #include "ash/system/night_light/night_light_controller_impl.h" |
Sophie Wen | 815801c | 2024-01-27 00:48:52 | [diff] [blame] | 59 | #include "ash/system/notification_center/message_center_controller.h" |
Xiyuan Xia | 5a8c417 | 2019-05-13 16:23:48 | [diff] [blame] | 60 | #include "ash/system/palette/palette_tray.h" |
| 61 | #include "ash/system/palette/palette_welcome_bubble.h" |
Jimmy Gong | c6f4fd0 | 2021-02-25 01:55:00 | [diff] [blame] | 62 | #include "ash/system/pcie_peripheral/pcie_peripheral_notification_controller.h" |
Pu Shi | 7120e610 | 2023-07-18 00:00:18 | [diff] [blame] | 63 | #include "ash/system/phonehub/onboarding_nudge_controller.h" |
Charles William Dick | e90760e3 | 2023-06-08 02:34:07 | [diff] [blame] | 64 | #include "ash/system/power/battery_saver_controller.h" |
Xiyuan Xia | 5a8c417 | 2019-05-13 16:23:48 | [diff] [blame] | 65 | #include "ash/system/power/power_prefs.h" |
Hongyu Long | 17ad432 | 2023-06-01 19:10:56 | [diff] [blame] | 66 | #include "ash/system/power/power_sounds_controller.h" |
Md Shahadat Hossain Shahin | 36bc361 | 2022-08-09 11:01:25 | [diff] [blame] | 67 | #include "ash/system/privacy_hub/privacy_hub_controller.h" |
Xiyuan Xia | 5a8c417 | 2019-05-13 16:23:48 | [diff] [blame] | 68 | #include "ash/system/session/logout_button_tray.h" |
Maria Petrisor | 878ea9f1 | 2021-04-14 17:55:09 | [diff] [blame] | 69 | #include "ash/system/session/logout_confirmation_controller.h" |
Jiaming Cheng | 5bb7128 | 2022-10-06 00:08:45 | [diff] [blame] | 70 | #include "ash/system/unified/quick_settings_footer.h" |
Kevin Radtke | a8bd8254ca | 2021-11-16 00:37:48 | [diff] [blame] | 71 | #include "ash/system/unified/unified_system_tray_controller.h" |
Jameson Thies | 647d2d3 | 2022-02-24 23:58:21 | [diff] [blame] | 72 | #include "ash/system/usb_peripheral/usb_peripheral_notification_controller.h" |
Xiyuan Xia | 5a8c417 | 2019-05-13 16:23:48 | [diff] [blame] | 73 | #include "ash/touch/touch_devices_controller.h" |
Angus L. M. McLean IV | da2a71d5 | 2023-08-07 21:27:26 | [diff] [blame] | 74 | #include "ash/user_education/user_education_controller.h" |
Jason Thai | b369a4525 | 2023-08-14 20:21:09 | [diff] [blame] | 75 | #include "ash/wallpaper/wallpaper_daily_refresh_scheduler.h" |
Sean Kau | d881d18 | 2022-05-24 19:26:09 | [diff] [blame] | 76 | #include "ash/wallpaper/wallpaper_pref_manager.h" |
Eric Sum | 0866173 | 2023-11-06 23:05:31 | [diff] [blame] | 77 | #include "ash/wallpaper/wallpaper_time_of_day_scheduler.h" |
Ahmed Fakhry | 1d18fafe5 | 2020-02-24 22:40:36 | [diff] [blame] | 78 | #include "ash/wm/desks/desks_restore_util.h" |
Daniel Andersson | 3203dbc | 2022-05-05 23:47:24 | [diff] [blame] | 79 | #include "ash/wm/desks/templates/saved_desk_util.h" |
Elijah Hewer | 4959cc8 | 2023-03-30 22:38:34 | [diff] [blame] | 80 | #include "ash/wm/float/tablet_mode_tuck_education.h" |
Sherri Lin | b6b765a1 | 2022-03-03 11:37:34 | [diff] [blame] | 81 | #include "ash/wm/lock_state_controller.h" |
Cattalyya Nuengsigkapian | f24c05b | 2021-01-15 02:51:18 | [diff] [blame] | 82 | #include "ash/wm/window_cycle/window_cycle_controller.h" |
Sophie Wen | 815801c | 2024-01-27 00:48:52 | [diff] [blame] | 83 | #include "ash/wm/window_util.h" |
Yeunjoo Choi | 2d3704c1 | 2022-06-21 02:44:34 | [diff] [blame] | 84 | #include "chromeos/ash/services/assistant/public/cpp/assistant_prefs.h" |
Yue Li | f0da5bf | 2021-11-19 22:01:57 | [diff] [blame] | 85 | #include "chromeos/components/quick_answers/public/cpp/quick_answers_prefs.h" |
Sammie Quon | 2bb7e39 | 2023-02-13 22:23:42 | [diff] [blame] | 86 | #include "chromeos/ui/frame/multitask_menu/multitask_menu_nudge_controller.h" |
anina koehler | f1e29df6 | 2022-08-10 07:22:32 | [diff] [blame] | 87 | #include "chromeos/ui/wm/fullscreen/pref_names.h" |
Yue Li | 0e81c0c | 2021-09-29 03:22:18 | [diff] [blame] | 88 | #include "components/language/core/browser/pref_names.h" |
Amanda Deacon | 48669b4d | 2021-04-27 00:00:23 | [diff] [blame] | 89 | #include "components/live_caption/pref_names.h" |
Abigail Klein | e4c6b5c | 2022-03-30 21:06:45 | [diff] [blame] | 90 | #include "components/soda/constants.h" |
David Padlipsky | e33d71e | 2023-05-04 21:01:55 | [diff] [blame] | 91 | #include "components/user_manager/known_user.h" |
Xiyuan Xia | 5a8c417 | 2019-05-13 16:23:48 | [diff] [blame] | 92 | |
| 93 | namespace ash { |
| 94 | |
| 95 | namespace { |
| 96 | |
| 97 | // Registers prefs whose default values are same in user and signin prefs. |
John Palmer | 1e70a00 | 2023-08-15 02:20:34 | [diff] [blame] | 98 | void RegisterProfilePrefs(PrefRegistrySimple* registry, |
| 99 | std::string_view country, |
| 100 | bool for_test) { |
Longbo Wei | dcc3837 | 2023-08-23 16:59:18 | [diff] [blame] | 101 | AcceleratorPrefs::RegisterProfilePrefs(registry); |
Katie Dektar | af7f3ca | 2023-12-12 19:41:15 | [diff] [blame] | 102 | AccessibilityController::RegisterProfilePrefs(registry); |
Xiyuan Xia | 5a8c417 | 2019-05-13 16:23:48 | [diff] [blame] | 103 | AppListControllerImpl::RegisterProfilePrefs(registry); |
Wen-Chien Wang | 9adb624 | 2023-08-14 20:31:04 | [diff] [blame] | 104 | AppListNudgeController::RegisterProfilePrefs(registry); |
Jimmy | 59b749d | 2023-05-04 17:21:13 | [diff] [blame] | 105 | AshAcceleratorConfiguration::RegisterProfilePrefs(registry); |
David Black | ec4cbcd | 2020-04-15 20:35:25 | [diff] [blame] | 106 | AssistantControllerImpl::RegisterProfilePrefs(registry); |
Pi-Hsun Shih | 2ddabea | 2022-07-21 07:45:44 | [diff] [blame] | 107 | AutozoomControllerImpl::RegisterProfilePrefs(registry); |
Pi-Hsun Shih | faac34f | 2022-08-03 10:39:12 | [diff] [blame] | 108 | AutozoomNudgeController::RegisterProfilePrefs(registry); |
wutao | 3a150d71b | 2020-02-19 22:11:26 | [diff] [blame] | 109 | AmbientController::RegisterProfilePrefs(registry); |
Ramya Gopalan | 96b2aa2 | 2022-08-23 17:30:00 | [diff] [blame] | 110 | CalendarController::RegisterProfilePrefs(registry); |
Wei Lee | 19ecfd93 | 2023-05-23 01:57:39 | [diff] [blame] | 111 | camera_app_prefs::RegisterProfilePrefs(registry); |
Guoxing Zhao | 191ec87 | 2022-11-28 02:06:34 | [diff] [blame] | 112 | CameraEffectsController::RegisterProfilePrefs(registry); |
Ahmed Fakhry | 766bac6 | 2021-09-24 02:36:19 | [diff] [blame] | 113 | CaptureModeController::RegisterProfilePrefs(registry); |
Elijah Hewer | 641b2243 | 2023-11-18 02:59:36 | [diff] [blame] | 114 | CaptureModeEducationController::RegisterProfilePrefs(registry); |
Gordon Seto | 5623514d | 2021-01-27 23:52:28 | [diff] [blame] | 115 | CellularSetupNotifier::RegisterProfilePrefs(registry); |
Elijah Hewer | 4959cc8 | 2023-03-30 22:38:34 | [diff] [blame] | 116 | chromeos::MultitaskMenuNudgeController::RegisterProfilePrefs(registry); |
Yulun Wu | 1e35513 | 2020-02-11 20:12:22 | [diff] [blame] | 117 | contextual_tooltip::RegisterProfilePrefs(registry); |
David Black | fcfe4465 | 2023-08-04 22:57:22 | [diff] [blame] | 118 | ClipboardHistoryControllerImpl::RegisterProfilePrefs(registry); |
Erica Lee | 50bbcae | 2023-01-14 01:26:56 | [diff] [blame] | 119 | ColorPaletteController::RegisterPrefs(registry); |
minch | c568dd7 | 2022-06-24 17:41:43 | [diff] [blame] | 120 | DarkLightModeControllerImpl::RegisterProfilePrefs(registry); |
Ahmed Fakhry | 1d18fafe5 | 2020-02-24 22:40:36 | [diff] [blame] | 121 | desks_restore_util::RegisterProfilePrefs(registry); |
Daniel Andersson | 3203dbc | 2022-05-05 23:47:24 | [diff] [blame] | 122 | saved_desk_util::RegisterProfilePrefs(registry); |
Sophie Wen | 815801c | 2024-01-27 00:48:52 | [diff] [blame] | 123 | window_util::RegisterProfilePrefs(registry); |
Josiah K | 466b0dc3 | 2021-06-16 23:39:05 | [diff] [blame] | 124 | DockedMagnifierController::RegisterProfilePrefs(registry); |
Andrew Xu | cfed58c | 2022-04-13 22:25:51 | [diff] [blame] | 125 | FeatureDiscoveryDurationReporterImpl::RegisterProfilePrefs(registry); |
Richard Chui | 6556e8e | 2023-08-29 02:09:35 | [diff] [blame] | 126 | FocusModeController::RegisterProfilePrefs(registry); |
Xiaodan Zhu | d5b8187 | 2020-11-12 18:15:29 | [diff] [blame] | 127 | FullscreenController::RegisterProfilePrefs(registry); |
Gina Domergue | 4dfbac25 | 2024-02-12 19:03:34 | [diff] [blame] | 128 | GameDashboardController::RegisterProfilePrefs(registry); |
Eric Sum | f97e7b89 | 2023-04-17 22:41:44 | [diff] [blame] | 129 | GeolocationController::RegisterProfilePrefs(registry); |
Matthew Mourgos | 9704006 | 2023-09-27 22:33:44 | [diff] [blame] | 130 | GlanceablesController::RegisterUserProfilePrefs(registry); |
Ahmed Mehfooz | e6167f5 | 2020-10-22 20:01:33 | [diff] [blame] | 131 | holding_space_prefs::RegisterProfilePrefs(registry); |
Jason Zhang | d42ca486 | 2023-05-04 01:57:49 | [diff] [blame] | 132 | HotspotInfoCache::RegisterProfilePrefs(registry); |
Michael Checo | 76cfece | 2023-02-08 00:53:24 | [diff] [blame] | 133 | InputDeviceSettingsControllerImpl::RegisterProfilePrefs(registry); |
Michael Checo | 606fde0 | 2023-07-12 23:39:52 | [diff] [blame] | 134 | InputDeviceSettingsNotificationController::RegisterProfilePrefs(registry); |
David Padlipsky | 76712208 | 2023-01-20 00:15:57 | [diff] [blame] | 135 | InputDeviceTracker::RegisterProfilePrefs(registry); |
Xiyuan Xia | 5a8c417 | 2019-05-13 16:23:48 | [diff] [blame] | 136 | LoginScreenController::RegisterProfilePrefs(registry, for_test); |
| 137 | LogoutButtonTray::RegisterProfilePrefs(registry); |
Maria Petrisor | 878ea9f1 | 2021-04-14 17:55:09 | [diff] [blame] | 138 | LogoutConfirmationController::RegisterProfilePrefs(registry); |
lbowen | 1e6ed0b | 2022-10-26 21:49:44 | [diff] [blame] | 139 | KeyboardBacklightColorController::RegisterPrefs(registry); |
John Palmer | 1e70a00 | 2023-08-15 02:20:34 | [diff] [blame] | 140 | KeyboardControllerImpl::RegisterProfilePrefs(registry, country); |
David Padlipsky | 37b5193 | 2023-01-26 01:44:59 | [diff] [blame] | 141 | KeyboardModifierMetricsRecorder::RegisterProfilePrefs(registry, for_test); |
Mia Bergeron | 12fd2f18 | 2019-06-11 23:04:46 | [diff] [blame] | 142 | MediaControllerImpl::RegisterProfilePrefs(registry); |
Xiyuan Xia | 5a8c417 | 2019-05-13 16:23:48 | [diff] [blame] | 143 | MessageCenterController::RegisterProfilePrefs(registry); |
Steven Bennetts | 32f5d55 | 2019-07-09 16:16:13 | [diff] [blame] | 144 | NightLightControllerImpl::RegisterProfilePrefs(registry); |
Pu Shi | 7120e610 | 2023-07-18 00:00:18 | [diff] [blame] | 145 | OnboardingNudgeController::RegisterProfilePrefs(registry); |
Xiyuan Xia | 5a8c417 | 2019-05-13 16:23:48 | [diff] [blame] | 146 | PaletteTray::RegisterProfilePrefs(registry); |
| 147 | PaletteWelcomeBubble::RegisterProfilePrefs(registry); |
Jimmy Gong | c6f4fd0 | 2021-02-25 01:55:00 | [diff] [blame] | 148 | PciePeripheralNotificationController::RegisterProfilePrefs(registry); |
Md Shahadat Hossain Shahin | 36bc361 | 2022-08-09 11:01:25 | [diff] [blame] | 149 | PrivacyHubController::RegisterProfilePrefs(registry); |
Gil Dekel | 6977703 | 2020-02-07 18:41:53 | [diff] [blame] | 150 | PrivacyScreenController::RegisterProfilePrefs(registry); |
Courtney Wong | fa3b7190 | 2022-05-12 22:21:34 | [diff] [blame] | 151 | ProjectorControllerImpl::RegisterProfilePrefs(registry); |
Daniel Classon | e31b84fd2 | 2021-10-05 02:41:57 | [diff] [blame] | 152 | quick_pair::Mediator::RegisterProfilePrefs(registry); |
Emmanuel Arias Soto | 4de5f2b7 | 2023-04-26 15:58:24 | [diff] [blame] | 153 | ScreensaverImagesPolicyHandler::RegisterPrefs(registry); |
Wen-Chien Wang | 9adb624 | 2023-08-14 20:31:04 | [diff] [blame] | 154 | SearchNotifierController::RegisterProfilePrefs(registry); |
Xiyuan Xia | 5a8c417 | 2019-05-13 16:23:48 | [diff] [blame] | 155 | ShelfController::RegisterProfilePrefs(registry); |
Michael Martis | 398ffa8 | 2022-05-09 01:11:47 | [diff] [blame] | 156 | SnoopingProtectionController::RegisterProfilePrefs(registry); |
Elijah Hewer | 4959cc8 | 2023-03-30 22:38:34 | [diff] [blame] | 157 | TabletModeTuckEducation::RegisterProfilePrefs(registry); |
Ana Salazar | eb7c2571 | 2020-02-03 20:27:26 | [diff] [blame] | 158 | TouchDevicesController::RegisterProfilePrefs(registry, for_test); |
Angus L. M. McLean IV | da2a71d5 | 2023-08-07 21:27:26 | [diff] [blame] | 159 | UserEducationController::RegisterProfilePrefs(registry); |
Jazz Xu | bfefcba | 2020-09-25 01:59:13 | [diff] [blame] | 160 | MediaTray::RegisterProfilePrefs(registry); |
Jameson Thies | 647d2d3 | 2022-02-24 23:58:21 | [diff] [blame] | 161 | UsbPeripheralNotificationController::RegisterProfilePrefs(registry); |
James Cook | 520a8ac | 2023-05-05 01:20:06 | [diff] [blame] | 162 | VpnDetailedView::RegisterProfilePrefs(registry); |
Jason Thai | b369a4525 | 2023-08-14 20:21:09 | [diff] [blame] | 163 | WallpaperDailyRefreshScheduler::RegisterProfilePrefs(registry); |
Eric Sum | 0866173 | 2023-11-06 23:05:31 | [diff] [blame] | 164 | WallpaperTimeOfDayScheduler::RegisterProfilePrefs(registry); |
Sean Kau | d881d18 | 2022-05-24 19:26:09 | [diff] [blame] | 165 | WallpaperPrefManager::RegisterProfilePrefs(registry); |
Cattalyya Nuengsigkapian | f24c05b | 2021-01-15 02:51:18 | [diff] [blame] | 166 | WindowCycleController::RegisterProfilePrefs(registry); |
James Cook | 4f3640d | 2019-11-19 00:40:35 | [diff] [blame] | 167 | |
Ana Salazar | eb7c2571 | 2020-02-03 20:27:26 | [diff] [blame] | 168 | // Provide prefs registered in the browser for ash_unittests. |
| 169 | if (for_test) { |
Yeunjoo Choi | 65c73cc | 2022-08-02 05:30:16 | [diff] [blame] | 170 | assistant::prefs::RegisterProfilePrefs(registry); |
Yeunjoo Choi | ecf2ba4 | 2021-09-01 01:25:01 | [diff] [blame] | 171 | quick_answers::prefs::RegisterProfilePrefs(registry); |
Roman Sorokin | 8fab497 | 2021-11-17 17:10:36 | [diff] [blame] | 172 | registry->RegisterBooleanPref(prefs::kMouseReverseScroll, false); |
Chloe Pelling | 4a5ed446 | 2022-02-15 02:20:07 | [diff] [blame] | 173 | registry->RegisterBooleanPref(prefs::kSendFunctionKeys, false); |
Yeunjoo Choi | 0c8273a | 2022-11-29 04:22:50 | [diff] [blame] | 174 | registry->RegisterBooleanPref(prefs::kSuggestedContentEnabled, true); |
Roman Sorokin | 8fab497 | 2021-11-17 17:10:36 | [diff] [blame] | 175 | registry->RegisterBooleanPref(::prefs::kLiveCaptionEnabled, false); |
anina koehler | f1e29df6 | 2022-08-10 07:22:32 | [diff] [blame] | 176 | registry->RegisterListPref( |
| 177 | chromeos::prefs::kKeepFullscreenWithoutNotificationUrlAllowList); |
Abigail Klein | e4c6b5c | 2022-03-30 21:06:45 | [diff] [blame] | 178 | registry->RegisterStringPref(::prefs::kLiveCaptionLanguageCode, |
| 179 | speech::kUsEnglishLocale); |
Yue Li | 0e81c0c | 2021-09-29 03:22:18 | [diff] [blame] | 180 | registry->RegisterStringPref(language::prefs::kApplicationLocale, |
| 181 | std::string()); |
Yue Li | 5125160b | 2022-04-04 22:40:39 | [diff] [blame] | 182 | registry->RegisterStringPref(language::prefs::kPreferredLanguages, |
| 183 | std::string()); |
Michael Checo | 1f862594 | 2023-05-23 19:33:47 | [diff] [blame] | 184 | registry->RegisterIntegerPref(prefs::kAltEventRemappedToRightClick, 0); |
| 185 | registry->RegisterIntegerPref(prefs::kSearchEventRemappedToRightClick, 0); |
Michael Checo | 08033c4 | 2023-05-08 22:16:11 | [diff] [blame] | 186 | registry->RegisterIntegerPref(prefs::kKeyEventRemappedToSixPackDelete, 0); |
| 187 | registry->RegisterIntegerPref(prefs::kKeyEventRemappedToSixPackEnd, 0); |
| 188 | registry->RegisterIntegerPref(prefs::kKeyEventRemappedToSixPackHome, 0); |
| 189 | registry->RegisterIntegerPref(prefs::kKeyEventRemappedToSixPackPageUp, 0); |
| 190 | registry->RegisterIntegerPref(prefs::kKeyEventRemappedToSixPackPageDown, 0); |
Ana Salazar | eb7c2571 | 2020-02-03 20:27:26 | [diff] [blame] | 191 | } |
Xiyuan Xia | 5a8c417 | 2019-05-13 16:23:48 | [diff] [blame] | 192 | } |
| 193 | |
| 194 | } // namespace |
| 195 | |
Xiyuan Xia | 14619a2 | 2019-05-14 20:20:44 | [diff] [blame] | 196 | void RegisterLocalStatePrefs(PrefRegistrySimple* registry, bool for_test) { |
| 197 | PaletteTray::RegisterLocalStatePrefs(registry); |
Sean Kau | d881d18 | 2022-05-24 19:26:09 | [diff] [blame] | 198 | WallpaperPrefManager::RegisterLocalStatePrefs(registry); |
Erica Lee | 51e6221 | 2023-06-14 22:29:00 | [diff] [blame] | 199 | ColorPaletteController::RegisterLocalStatePrefs(registry); |
Xiyuan Xia | 14619a2 | 2019-05-14 20:20:44 | [diff] [blame] | 200 | DetachableBaseHandler::RegisterPrefs(registry); |
| 201 | PowerPrefs::RegisterLocalStatePrefs(registry); |
zauri | 7f404de | 2023-04-04 18:02:05 | [diff] [blame] | 202 | PrivacyHubController::RegisterLocalStatePrefs(registry); |
Xiyuan Xia | 14619a2 | 2019-05-14 20:20:44 | [diff] [blame] | 203 | DisplayPrefs::RegisterLocalStatePrefs(registry); |
Aya ElAttar | d2b3c8a | 2020-06-22 23:02:13 | [diff] [blame] | 204 | LoginExpandedPublicAccountView::RegisterLocalStatePrefs(registry); |
Sherri Lin | b6b765a1 | 2022-03-03 11:37:34 | [diff] [blame] | 205 | LockStateController::RegisterPrefs(registry); |
Daniel Classon | 2ded753e | 2021-12-01 18:42:50 | [diff] [blame] | 206 | quick_pair::Mediator::RegisterLocalStatePrefs(registry); |
Jiaming Cheng | 2480e206 | 2023-11-07 21:05:44 | [diff] [blame] | 207 | QuickSettingsFooter::RegisterLocalStatePrefs(registry); |
lbowen | 1e6ed0b | 2022-10-26 21:49:44 | [diff] [blame] | 208 | KeyboardBacklightColorController::RegisterPrefs(registry); |
Charles William Dick | e90760e3 | 2023-06-08 02:34:07 | [diff] [blame] | 209 | BatterySaverController::RegisterLocalStatePrefs(registry); |
Hongyu Long | 981b7ff | 2023-07-17 17:32:54 | [diff] [blame] | 210 | PowerSoundsController::RegisterLocalStatePrefs(registry); |
David Padlipsky | 9bdcaa4 | 2023-05-03 20:59:51 | [diff] [blame] | 211 | |
| 212 | if (for_test) { |
| 213 | registry->RegisterBooleanPref(prefs::kOwnerPrimaryMouseButtonRight, false); |
David Padlipsky | e33d71e | 2023-05-04 21:01:55 | [diff] [blame] | 214 | user_manager::KnownUser::RegisterPrefs(registry); |
David Padlipsky | 9bdcaa4 | 2023-05-03 20:59:51 | [diff] [blame] | 215 | } |
Xiyuan Xia | 14619a2 | 2019-05-14 20:20:44 | [diff] [blame] | 216 | } |
| 217 | |
John Palmer | 1e70a00 | 2023-08-15 02:20:34 | [diff] [blame] | 218 | void RegisterSigninProfilePrefs(PrefRegistrySimple* registry, |
| 219 | std::string_view country, |
| 220 | bool for_test) { |
| 221 | RegisterProfilePrefs(registry, country, for_test); |
James Cook | ef1411e1 | 2019-10-18 23:49:22 | [diff] [blame] | 222 | PowerPrefs::RegisterSigninProfilePrefs(registry); |
Xiyuan Xia | 5a8c417 | 2019-05-13 16:23:48 | [diff] [blame] | 223 | } |
| 224 | |
John Palmer | 1e70a00 | 2023-08-15 02:20:34 | [diff] [blame] | 225 | void RegisterUserProfilePrefs(PrefRegistrySimple* registry, |
| 226 | std::string_view country, |
| 227 | bool for_test) { |
| 228 | RegisterProfilePrefs(registry, country, for_test); |
James Cook | ef1411e1 | 2019-10-18 23:49:22 | [diff] [blame] | 229 | PowerPrefs::RegisterUserProfilePrefs(registry); |
David Black | 57245f3 | 2023-03-07 19:36:08 | [diff] [blame] | 230 | SessionControllerImpl::RegisterUserProfilePrefs(registry); |
Xiyuan Xia | 5a8c417 | 2019-05-13 16:23:48 | [diff] [blame] | 231 | } |
| 232 | |
| 233 | } // namespace ash |