blob: e90e6e48c64584f8c749d34547c947de0b8feb82 [file] [log] [blame]
Avi Drissman4a8573c2022-09-09 19:35:541// Copyright 2012 The Chromium Authors
license.botbf09a502008-08-24 00:55:552// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
initial.commit09911bf2008-07-26 23:55:294
[email protected]37858e52010-08-26 00:22:025#include "chrome/browser/prefs/browser_prefs.h"
initial.commit09911bf2008-07-26 23:55:296
[email protected]c5d4b1842014-06-20 21:19:507#include <string>
8
primiano6221e572015-01-28 12:14:349#include "base/trace_event/trace_event.h"
Nico Webereaa08412019-08-14 01:24:3710#include "build/branding_buildflags.h"
avib896c712015-12-26 02:10:4311#include "build/build_config.h"
Maksim Sisovb2e86e272021-09-28 05:24:4912#include "build/chromecast_buildflags.h"
Yuta Hijikata31a359c2020-11-27 07:50:2613#include "build/chromeos_buildflags.h"
[email protected]1a47d7e2010-10-15 00:37:2414#include "chrome/browser/about_flags.h"
Dominic Mazzoni21fb0282019-02-13 18:32:4715#include "chrome/browser/accessibility/accessibility_labels_service.h"
James Wallace-Lee25a1b05e2018-07-24 00:06:3116#include "chrome/browser/accessibility/accessibility_ui.h"
[email protected]7a25d872012-05-21 19:14:1317#include "chrome/browser/accessibility/invert_bubble_prefs.h"
[email protected]b1de2c72013-02-06 02:45:4718#include "chrome/browser/browser_process_impl.h"
[email protected]bca18382012-06-25 19:15:2319#include "chrome/browser/chrome_content_browser_client.h"
sorinebcfc8dd2016-08-12 21:57:1820#include "chrome/browser/component_updater/component_updater_prefs.h"
[email protected]70019152012-12-19 11:44:1921#include "chrome/browser/devtools/devtools_window.h"
[email protected]e5dc4222010-08-30 22:16:3222#include "chrome/browser/download/download_prefs.h"
dmurph93fa43b2017-02-07 23:45:1623#include "chrome/browser/engagement/important_sites_util.h"
Dominique Fauteux-Chapleau556bb84f2020-04-20 22:06:2924#include "chrome/browser/enterprise/connectors/connectors_prefs.h"
Og Astorga3089fd82021-09-21 00:02:3725#include "chrome/browser/enterprise/reporting/prefs.h"
Dominique Fauteux-Chapleau0e897db02021-04-19 18:42:2226#include "chrome/browser/enterprise/util/managed_browser_utils.h"
[email protected]ed2b1002011-05-25 14:12:1027#include "chrome/browser/external_protocol/external_protocol_handler.h"
[email protected]1b3588d2012-10-10 21:17:2528#include "chrome/browser/first_run/first_run.h"
[email protected]e6933d2a2013-03-12 22:32:2129#include "chrome/browser/gpu/gpu_mode_manager.h"
Avi Drissmand30927342018-05-22 15:04:2730#include "chrome/browser/lifetime/browser_shutdown.h"
rajendrantff2361da2020-12-16 09:18:2731#include "chrome/browser/login_detection/login_detection_prefs.h"
[email protected]cd80cce2013-12-02 15:19:1932#include "chrome/browser/media/media_device_id_salt.h"
Becca Hughes6354b6b2017-08-31 22:01:5533#include "chrome/browser/media/media_engagement_service.h"
John Rummelle5621c12017-09-05 23:52:1034#include "chrome/browser/media/media_storage_id_salt.h"
George Benz13da3df02022-01-14 00:03:5235#include "chrome/browser/media/router/discovery/access_code/access_code_cast_feature.h"
Derek Cheng23a01402018-07-24 13:38:1436#include "chrome/browser/media/router/media_router_feature.h"
mcasasa2023ab2016-09-08 01:06:3637#include "chrome/browser/media/webrtc/media_capture_devices_dispatcher.h"
Evan Stade32d635a2020-04-03 18:51:2538#include "chrome/browser/media/webrtc/permission_bubble_media_access_handler.h"
Sebastien Marchand5a63997a2019-09-27 19:15:3439#include "chrome/browser/memory/enterprise_memory_limit_pref_observer.h"
[email protected]4a55a712014-06-08 16:50:3440#include "chrome/browser/metrics/chrome_metrics_service_client.h"
Eric Secklera5c24e12018-11-28 16:09:2041#include "chrome/browser/net/net_error_tab_helper.h"
Matt Menkecfef87d2017-08-03 13:03:0642#include "chrome/browser/net/profile_network_context_service.h"
Ben Schwartz135746c2020-05-14 04:37:0343#include "chrome/browser/net/secure_dns_util.h"
Matt Menke4dfb375c2018-06-13 18:06:3144#include "chrome/browser/net/system_network_context_manager.h"
Tom Anderson1ef51d032020-02-11 01:05:0845#include "chrome/browser/notifications/notification_display_service_impl.h"
peterc4007912015-07-31 21:13:3746#include "chrome/browser/notifications/notifier_state_tracker.h"
Sharon Yangc6706902018-07-16 13:06:1947#include "chrome/browser/notifications/platform_notification_service_impl.h"
Balazs Engedy715b0ec2019-12-04 15:11:4548#include "chrome/browser/permissions/quiet_notification_permission_ui_state.h"
Simon Pelchate74bbb62021-12-03 23:57:5549#include "chrome/browser/prefetch/prefetch_prefs.h"
[email protected]24f95242014-02-10 17:55:2850#include "chrome/browser/prefs/chrome_pref_service_factory.h"
[email protected]4e94ab32011-08-05 05:28:2751#include "chrome/browser/prefs/incognito_mode_prefs.h"
[email protected]37858e52010-08-26 00:22:0252#include "chrome/browser/prefs/session_startup_pref.h"
Sreeja Kamishetty4ae1ab32022-07-25 19:31:5753#include "chrome/browser/preloading/prefetch/prefetch_proxy/prefetch_proxy_origin_decider.h"
Sreeja Kamishettyb8e18ae2022-07-22 03:12:4354#include "chrome/browser/preloading/prefetch/search_prefetch/search_prefetch_service.h"
Nikita Podguzov26222d12019-12-04 11:44:3155#include "chrome/browser/printing/print_preview_sticky_settings.h"
[email protected]1bee6ed2012-03-14 06:46:3656#include "chrome/browser/profiles/chrome_version_service.h"
[email protected]ee937fe2013-02-27 00:41:5957#include "chrome/browser/profiles/profile.h"
Thomas Tanglc67ace42019-06-07 19:31:5058#include "chrome/browser/profiles/profile_attributes_entry.h"
Alex Ilinbb08a0d2021-07-08 09:37:2459#include "chrome/browser/profiles/profile_attributes_storage.h"
[email protected]8ecad5e2010-12-02 21:18:3360#include "chrome/browser/profiles/profile_impl.h"
[email protected]de71ae992013-07-18 03:30:3861#include "chrome/browser/profiles/profiles_state.h"
johnmecf2da0c2015-10-28 19:42:1262#include "chrome/browser/push_messaging/push_messaging_app_identifier.h"
Illia Klimov4b72378ed2022-07-18 13:46:5763#include "chrome/browser/push_messaging/push_messaging_service_impl.h"
gab3ca4a492017-03-02 00:19:4164#include "chrome/browser/rlz/chrome_rlz_tracker_delegate.h"
[email protected]a7b8e43d2013-03-18 18:52:4365#include "chrome/browser/search/search.h"
Himanshu Jajubcf3b9292019-06-07 12:54:0766#include "chrome/browser/sharing/sharing_sync_preference.h"
Kristi Parkd0f72412021-07-02 01:09:0367#include "chrome/browser/sharing_hub/sharing_hub_features.h"
Ryan Sleevi4689ad32018-04-16 19:09:0568#include "chrome/browser/ssl/ssl_config_service_manager.h"
avi24d693f2016-08-06 18:03:5269#include "chrome/browser/task_manager/task_manager_interface.h"
oysteine386fc9e2015-06-07 18:45:4170#include "chrome/browser/tracing/chrome_tracing_delegate.h"
[email protected]2cd4fde2012-06-26 03:10:2671#include "chrome/browser/ui/browser_ui_prefs.h"
Robert Liao741be302019-07-19 23:24:4272#include "chrome/browser/ui/hats/hats_service.h"
[email protected]297fb7c22012-06-26 12:37:4973#include "chrome/browser/ui/network_profile_bubble.h"
[email protected]9ce7cb42011-12-07 18:53:0774#include "chrome/browser/ui/prefs/prefs_tab_helper.h"
[email protected]62f77772011-02-23 19:45:4275#include "chrome/browser/ui/search_engines/keyword_editor_controller.h"
Victor Hugo Vianna Silva3452787c2022-07-28 23:25:3076#include "chrome/browser/ui/send_tab_to_self/send_tab_to_self_bubble.h"
[email protected]b56e2e32012-05-11 21:18:0477#include "chrome/browser/ui/tabs/pinned_tab_codec.h"
Elaine Chien07f137d2021-01-14 02:57:2178#include "chrome/browser/ui/toolbar/chrome_labs_prefs.h"
Livvie Lin9141d0f132020-03-23 22:47:0479#include "chrome/browser/ui/toolbar/chrome_location_bar_model_delegate.h"
Dana Friedcf8c2142022-01-25 18:33:4280#include "chrome/browser/ui/user_education/browser_feature_promo_snooze_service.h"
dpapad2be5b61c62020-12-08 11:58:4981#include "chrome/browser/ui/webui/flags/flags_ui.h"
[email protected]7c5c6f3a2011-04-28 19:56:4982#include "chrome/browser/ui/webui/ntp/new_tab_ui.h"
Nicolas Ouellet-Payeur4dbdf1e52018-08-06 21:51:0283#include "chrome/browser/ui/webui/print_preview/policy_settings.h"
Xing Liu7252b8d2020-01-22 22:12:4784#include "chrome/browser/updates/announcement_notification/announcement_notification_service.h"
Martin Kreichgauer0e1b15ef2018-06-20 02:59:5085#include "chrome/browser/webauthn/chrome_authenticator_request_delegate.h"
Martin Kreichgauerd7aa4f92022-02-22 20:46:2186#include "chrome/browser/webauthn/webauthn_pref_names.h"
Scott Violet6200d332018-02-23 21:29:2387#include "chrome/common/buildflags.h"
[email protected]f87919d72011-02-02 18:46:1688#include "chrome/common/pref_names.h"
Ayu Ishiifbb1fad2020-06-22 20:15:0789#include "chrome/common/secure_origin_allowlist.h"
Moe Ahmadi173b0a2b2018-08-03 17:35:5190#include "components/autofill/core/common/autofill_prefs.h"
Clark DuVall8236b6a82020-05-28 22:54:3291#include "components/blocked_content/safe_browsing_triggered_popup_blocker.h"
ioanapa8bfbc72016-09-07 16:09:0592#include "components/browsing_data/core/pref_names.h"
Doug Turner9e79cf0c2018-04-05 21:32:3093#include "components/certificate_transparency/pref_names.h"
Matt Jones704e1a62022-09-20 16:28:2494#include "components/commerce/core/pref_names.h"
mukai8eaec822014-10-25 17:53:1695#include "components/content_settings/core/browser/host_content_settings_map.h"
Javier Fernández García-Boente7966a892021-12-09 12:28:2396#include "components/custom_handlers/protocol_handler_registry.h"
[email protected]6a5b0712014-07-16 00:30:1097#include "components/dom_distiller/core/distilled_page_prefs.h"
Katie D1ca4328b2020-02-19 18:08:4798#include "components/dom_distiller/core/dom_distiller_features.h"
99#include "components/dom_distiller/core/pref_names.h"
Mugdha Lakhanida851fd2021-03-16 18:21:02100#include "components/embedder_support/origin_trials/origin_trial_prefs.h"
hmaree31cadf52022-11-09 22:32:55101#include "components/enterprise/browser/identifiers/identifiers_prefs.h"
sdefresne8593e6432015-12-01 12:38:08102#include "components/flags_ui/pref_service_flags_storage.h"
Moe Ahmadi656dd532021-10-06 21:59:18103#include "components/history_clusters/core/history_clusters_prefs.h"
Brandon Wyliec7a94502018-10-18 18:43:25104#include "components/image_fetcher/core/cache/image_cache.h"
Anthony Vallee-Dubois43fded9702020-06-19 16:30:38105#include "components/invalidation/impl/fcm_invalidation_service.h"
Tanja Gornak5c8b5d952018-10-12 14:39:54106#include "components/invalidation/impl/invalidator_registrar_with_memory.h"
Marc Treib8c29f0c2019-12-19 12:48:07107#include "components/invalidation/impl/per_user_topic_subscription_manager.h"
Anthony Vallee-Dubois6f993122018-09-17 16:13:28108#include "components/language/content/browser/geo_language_provider.h"
Alexandre Frechette38f4ef92019-02-25 16:31:57109#include "components/language/content/browser/ulp_language_code_locator/ulp_language_code_locator.h"
Alexandre Frechette572755b2019-02-13 22:30:20110#include "components/language/core/browser/language_prefs.h"
Joe DeBlasio59db500b2020-08-21 00:37:35111#include "components/lookalikes/core/lookalike_url_util.h"
Mikel Astizf4226912020-10-19 19:10:37112#include "components/metrics/demographics/user_demographics.h"
Peter Wen45025ea2018-09-17 15:16:27113#include "components/metrics/metrics_pref_names.h"
[email protected]d0ab865b2014-06-04 19:41:34114#include "components/network_time/network_time_tracker.h"
treibbb0c5af52016-12-09 17:34:15115#include "components/ntp_tiles/most_visited_sites.h"
Scott Violet9ae82892018-03-01 18:38:12116#include "components/offline_pages/buildflags/buildflags.h"
Travis Skare27cee15c2018-07-19 14:34:13117#include "components/omnibox/browser/document_provider.h"
Moe Ahmadi1266de82020-04-10 17:19:53118#include "components/omnibox/browser/omnibox_prefs.h"
blundell2102f7c2015-07-09 10:00:53119#include "components/omnibox/browser/zero_suggest_provider.h"
Sophie Changf2da5f02021-01-07 19:38:47120#include "components/optimization_guide/core/optimization_guide_prefs.h"
Peter Birk Pakkenberg73e07b62022-09-21 11:20:30121#include "components/origin_trials/browser/prefservice_persistence_provider.h"
[email protected]1f730bd2014-02-28 15:11:32122#include "components/password_manager/core/browser/password_manager.h"
anthonyvd6a43b932017-05-11 18:39:27123#include "components/payments/core/payment_prefs.h"
Anthony Vallee-Duboiscee55b12022-03-24 22:54:02124#include "components/performance_manager/public/user_tuning/prefs.h"
Ravjit0dc264742021-10-15 11:09:35125#include "components/permissions/permission_actions_history.h"
brettw03e61962016-03-15 06:27:04126#include "components/policy/core/browser/browser_policy_connector.h"
Aaron Colwellb4226222020-07-25 16:11:36127#include "components/policy/core/browser/url_blocklist_manager.h"
Yann Dago9c1e19512022-02-28 22:27:31128#include "components/policy/core/common/management/management_service.h"
David Bienvenu554a259c2020-02-13 20:20:54129#include "components/policy/core/common/policy_pref_names.h"
brettw03e61962016-03-15 06:27:04130#include "components/policy/core/common/policy_statistics_collector.h"
[email protected]f0c8c4992014-05-15 17:37:26131#include "components/pref_registry/pref_registry_syncable.h"
Martin Šrámek5921f6312020-03-25 09:31:47132#include "components/prefs/pref_registry.h"
brettwb1fc1b82016-02-02 00:19:08133#include "components/prefs/pref_registry_simple.h"
134#include "components/prefs/pref_service.h"
Sean Harrison4685ab72020-12-08 18:26:22135#include "components/privacy_sandbox/privacy_sandbox_prefs.h"
abhishek.a2171c612852015-08-31 10:48:19136#include "components/proxy_config/pref_proxy_config_tracker_impl.h"
Mikel Astiz823b71012022-12-07 09:57:02137#include "components/reading_list/core/reading_list_pref_names.h"
Amanda Velasco Gallardo25f07362022-01-28 02:08:47138#include "components/safe_browsing/content/common/file_type_policies_prefs.h"
Ali Jumafb3dc1f2020-01-07 17:33:47139#include "components/safe_browsing/core/common/safe_browsing_prefs.h"
[email protected]0915b352014-06-25 19:58:14140#include "components/search_engines/template_url_prepopulate_data.h"
Carlos IL06e6c8c2020-07-28 00:25:19141#include "components/security_interstitials/content/insecure_form_blocking_page.h"
Colin Blundell7657b402020-02-25 09:46:50142#include "components/security_interstitials/content/stateful_ssl_host_state_delegate.h"
Shakti Sahu93bfba22021-06-17 18:05:21143#include "components/segmentation_platform/public/segmentation_platform_service.h"
Ramin Halavati52a9a292022-04-28 04:27:49144#include "components/services/screen_ai/buildflags/buildflags.h"
Ayu Ishii73a353d2022-07-07 21:56:42145#include "components/services/storage/public/cpp/storage_prefs.h"
Mikel Astizf61f4ba02018-06-01 10:50:19146#include "components/sessions/core/session_id_generator.h"
David Rogerfbfc9382021-07-12 13:58:45147#include "components/signin/public/base/signin_buildflags.h"
David Roger877bdc72022-10-19 09:38:51148#include "components/signin/public/base/signin_pref_names.h"
Henrique Ferreiro94eb46f2019-07-03 14:38:56149#include "components/signin/public/identity_manager/identity_manager.h"
Evan Stade89158192021-01-27 18:45:23150#include "components/site_engagement/content/site_engagement_service.h"
Eric Robinson49f19b62018-09-17 21:28:15151#include "components/subresource_filter/content/browser/ruleset_service.h"
maxbogue2f960e52016-10-07 01:24:15152#include "components/sync/base/sync_prefs.h"
Mikel Astiz89473c442021-07-13 09:46:12153#include "components/sync/driver/glue/sync_transport_data_prefs.h"
Jeffrey Cohen053be24d2019-07-23 23:44:05154#include "components/sync_device_info/device_info_prefs.h"
maxbogueea16ff412016-10-28 16:35:29155#include "components/sync_preferences/pref_service_syncable.h"
Mikel Astiz0889b2be2018-09-25 16:20:41156#include "components/sync_sessions/session_sync_prefs.h"
Oksana Zhuravlova58c85282022-06-14 20:24:28157#include "components/tracing/common/pref_names.h"
[email protected]81135072014-02-14 14:11:02158#include "components/translate/core/browser/translate_prefs.h"
wafflesd2d9a332016-04-09 01:59:57159#include "components/update_client/update_client.h"
blundell0300cdea2015-09-03 12:47:44160#include "components/variations/service/variations_service.h"
[email protected]f3b1a082011-11-18 00:34:30161#include "content/public/browser/render_process_host.h"
Scott Violetc8240b02018-03-08 22:03:59162#include "extensions/buildflags/buildflags.h"
[email protected]ad66db12014-07-10 12:43:47163#include "net/http/http_server_properties_manager.h"
Andy Phan99ccfb42022-11-29 18:57:07164#include "pdf/buildflags.h"
Scott Violet02e38b92018-03-27 23:42:14165#include "ppapi/buildflags/buildflags.h"
Scott Violet318a55f2018-03-30 19:08:19166#include "printing/buildflags/buildflags.h"
Scott Violeta5f7ba12018-04-02 22:03:40167#include "rlz/buildflags/buildflags.h"
Jan Keitel98b2cc42022-09-20 05:38:39168#include "third_party/abseil-cpp/absl/types/optional.h"
[email protected]a814d8632009-01-31 20:18:52169
Denis Kuznetsov32099f32017-12-15 14:04:57170#if BUILDFLAG(ENABLE_BACKGROUND_MODE)
thestige4155842014-10-20 18:58:02171#include "chrome/browser/background/background_mode_manager.h"
172#endif
173
brettw00899e62016-11-12 02:10:17174#if BUILDFLAG(ENABLE_EXTENSIONS)
je_julie.kim7fbb5a1a2015-02-09 17:26:05175#include "chrome/browser/accessibility/animation_policy_prefs.h"
Dominick Ng6ff51052018-07-06 05:30:20176#include "chrome/browser/apps/platform_apps/shortcut_manager.h"
[email protected]17510602014-06-05 11:02:28177#include "chrome/browser/extensions/activity_log/activity_log.h"
178#include "chrome/browser/extensions/api/commands/command_service.h"
[email protected]17510602014-06-05 11:02:28179#include "chrome/browser/extensions/api/tabs/tabs_api.h"
[email protected]d5a74be2014-08-08 01:01:27180#include "chrome/browser/extensions/extension_web_ui.h"
Daniel Murphy3657906d2021-04-13 20:33:12181#include "chrome/browser/extensions/preinstalled_apps.h"
Devlin Cronina997c8e2021-03-18 00:33:18182#include "chrome/browser/ui/extensions/settings_api_bubble_helpers.h"
Devlin Cronin71f0f532018-04-26 16:35:06183#include "chrome/browser/ui/webui/extensions/extensions_ui.h"
tbarzicfa3c7ef62017-04-17 23:12:02184#include "extensions/browser/api/audio/audio_api.h"
afakhry2bd481832016-06-16 16:17:24185#include "extensions/browser/api/runtime/runtime_api.h"
[email protected]d5a74be2014-08-08 01:01:27186#include "extensions/browser/extension_prefs.h"
Emilia Paz363fa0062022-01-15 05:12:03187#include "extensions/browser/permissions_manager.h"
Yann Dago2cbd7cb2022-06-27 18:18:29188#include "extensions/browser/pref_names.h"
Yuta Hijikata31a359c2020-11-27 07:50:26189#if BUILDFLAG(IS_CHROMEOS_ASH)
Michael Ershov289785c2021-06-29 10:53:32190#include "chrome/browser/ash/attestation/tpm_challenge_key.h"
Yuta Hijikata54df9132021-10-09 01:27:12191#include "chrome/browser/ash/crosapi/browser_data_migrator.h"
Henrique Ferreiro7967dce2021-09-23 11:37:47192#include "chrome/browser/ash/device_name/device_name_store.h"
Henrique Ferreirod67f0472022-11-05 00:40:09193#include "chrome/browser/ash/extensions/extensions_permissions_tracker.h"
Yeunjoo Choi5e8463292021-04-28 01:19:42194#include "chrome/browser/ash/kerberos/kerberos_credentials_manager.h"
Henrique Ferreirob3c117562021-02-24 20:12:45195#include "chrome/browser/ash/login/easy_unlock/easy_unlock_service.h"
Henrique Ferreirod57c4962021-09-29 07:26:59196#include "chrome/browser/ash/net/system_proxy_manager.h"
Henrique Ferreiro4ebaaa32021-10-13 16:59:35197#include "chrome/browser/ash/platform_keys/key_permissions/key_permissions_manager_impl.h"
Anatoliy Potapchuka460bc12021-11-05 19:23:10198#include "chrome/browser/ash/policy/networking/euicc_status_uploader.h"
Danila Kuzmin90a42f02021-12-08 14:00:16199#include "chrome/browser/ash/settings/hardware_data_usage_controller.h"
Yeunjoo Choi5097e9c2021-02-25 08:46:52200#include "chrome/browser/ash/settings/stats_reporting_controller.h"
Xiaochu Liu48ab5932018-05-11 03:44:04201#include "chrome/browser/component_updater/metadata_table_chromeos.h"
Joel Hockeya9ccf0e2022-05-27 22:11:19202#include "chrome/browser/extensions/api/shared_storage/shared_storage_private_api.h"
yilkal95d9f882021-10-18 21:59:00203#include "chrome/browser/ui/ash/projector/projector_app_client_impl.h"
Yeunjoo Choi38cea422022-10-18 06:19:17204#include "chrome/browser/ui/webui/ash/edu_coexistence/edu_coexistence_login_handler.h"
Yeunjoo Choiebbdaa62022-10-20 01:05:31205#include "chrome/browser/ui/webui/signin/ash/inline_login_handler_impl.h"
Yuta Hijikata31a359c2020-11-27 07:50:26206#endif // BUILDFLAG(IS_CHROMEOS_ASH)
brettw00899e62016-11-12 02:10:17207#endif // BUILDFLAG(ENABLE_EXTENSIONS)
[email protected]17510602014-06-05 11:02:28208
jianliac940cb2017-06-07 05:13:08209#if BUILDFLAG(ENABLE_OFFLINE_PAGES)
Dmitry Titov4d2bde02017-06-30 05:29:52210#include "chrome/browser/offline_pages/prefetch/offline_metrics_collector_impl.h"
Justin DeWittfa60f892017-07-26 01:33:33211#include "chrome/browser/offline_pages/prefetch/prefetch_background_task_handler_impl.h"
Dan Harrington57be4a02018-09-14 17:50:19212#include "components/offline_pages/core/prefetch/prefetch_prefs.h"
jianliac940cb2017-06-07 05:13:08213#endif
214
Andy Phan99ccfb42022-11-29 18:57:07215#if BUILDFLAG(ENABLE_PDF)
216#include "chrome/browser/pdf/pdf_pref_names.h"
217#endif // BUILDFLAG(ENABLE_PDF)
218
bauerbecab4f52017-03-13 20:16:41219#if BUILDFLAG(ENABLE_PLUGINS)
Nicholas Verned391eae2017-11-13 02:41:38220#include "chrome/browser/plugins/plugin_info_host_impl.h"
bauerb4da36132014-12-26 19:53:13221#endif
222
Ramin Halavati52a9a292022-04-28 04:27:49223#if BUILDFLAG(ENABLE_SCREEN_AI_SERVICE)
224#include "components/services/screen_ai/public/cpp/pref_names.h" // nogncheck
225#endif
226
Lei Zhang6cb9b842019-12-16 20:29:12227#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
228#include "chrome/browser/supervised_user/child_accounts/child_account_service.h"
229#include "chrome/browser/supervised_user/supervised_user_service.h"
Bettina Deaf3dac202017-09-16 20:53:22230#endif
231
Jian Lic9a227c2022-02-28 22:55:44232#include "components/feed/buildflags.h"
233#include "components/feed/core/common/pref_names.h"
234#include "components/feed/core/shared_prefs/pref_names.h"
235
Xiaohan Wangae7f9182022-01-16 00:37:52236#if BUILDFLAG(IS_ANDROID)
zpengdb4a58e2017-01-10 17:40:32237#include "chrome/browser/android/bookmarks/partner_bookmarks_shim.h"
Dmitry Titov5f6cfb42018-10-05 18:52:14238#include "chrome/browser/android/explore_sites/history_statistics_reporter.h"
zpengdb4a58e2017-01-10 17:40:32239#include "chrome/browser/android/ntp/recent_tabs_page_prefs.h"
Kenichi Ishibashi35ac7132017-12-08 03:44:30240#include "chrome/browser/android/oom_intervention/oom_intervention_decider.h"
mlliuee3a405c2016-10-28 22:34:52241#include "chrome/browser/android/preferences/browser_prefs_android.h"
Jan Keitel98b2cc42022-09-20 05:38:39242#include "chrome/browser/android/preferences/shared_preferences_migrator_android.h"
Patrick Noland87d9f842019-01-16 03:52:02243#include "chrome/browser/android/usage_stats/usage_stats_bridge.h"
Sky Maliced8eb4302020-08-03 05:46:44244#include "chrome/browser/first_run/android/first_run_prefs.h"
Yu Su4d459862021-04-15 04:19:54245#include "chrome/browser/lens/android/lens_prefs.h"
John Rummell4703af62019-02-15 02:31:00246#include "chrome/browser/media/android/cdm/media_drm_origin_id_manager.h"
Lei Zhangdb0c0872022-03-04 04:26:59247#include "chrome/browser/notifications/notification_channels_provider_android.h"
Christopher Thompson2602fea2019-11-26 19:36:54248#include "chrome/browser/ssl/known_interception_disclosure_infobar_delegate.h"
Shakti Sahu623d00c2020-09-22 00:32:42249#include "chrome/browser/video_tutorials/prefs.h"
Glen Robertson8a825ae4f2020-09-16 06:50:08250#include "components/cdm/browser/media_drm_storage_impl.h" // nogncheck crbug.com/1125897
Sebastien Lalancette374cf6a2021-06-22 17:23:52251#include "components/content_creation/notes/core/note_prefs.h"
zpengdb4a58e2017-01-10 17:40:32252#include "components/ntp_tiles/popular_sites_impl.h"
Clark DuVall600abea2020-03-23 16:16:17253#include "components/permissions/contexts/geolocation_permission_context_android.h"
Xing Liu0327d832020-05-15 21:07:03254#include "components/query_tiles/tile_service_prefs.h"
Xiaohan Wangae7f9182022-01-16 00:37:52255#else // BUILDFLAG(IS_ANDROID)
Yue Zhang87902392020-12-23 23:12:05256#include "chrome/browser/cart/cart_service.h"
Anqing Zhao9595e482021-06-10 11:33:55257#include "chrome/browser/device_api/device_service_impl.h"
peter9f4490a2017-01-27 00:58:36258#include "chrome/browser/gcm/gcm_product_util.h"
Matt Reynolds1914ff6b2022-02-04 08:48:26259#include "chrome/browser/hid/hid_policy_allowed_devices.h"
Tommy Lid5b7c22b2020-10-28 01:26:51260#include "chrome/browser/intranet_redirect_detector.h"
Lei Zhang6cb9b842019-12-16 20:29:12261#include "chrome/browser/media/unified_autoplay_config.h"
Sebastien Marchande9f7b992021-02-10 03:11:08262#include "chrome/browser/metrics/tab_stats/tab_stats_tracker.h"
Josh Nohle13ea6b432020-07-21 20:46:59263#include "chrome/browser/nearby_sharing/common/nearby_share_prefs.h"
Tibor Goldschwendt83b26a02021-07-09 23:13:18264#include "chrome/browser/new_tab_page/modules/drive/drive_service.h"
Jeremy Selier730b56d32021-09-17 02:59:39265#include "chrome/browser/new_tab_page/modules/photos/photos_service.h"
Riley Tatumc48258f12022-08-18 22:13:13266#include "chrome/browser/new_tab_page/modules/recipes/recipes_service.h"
Rohit Bhatia22e544f2021-10-05 15:32:26267#include "chrome/browser/new_tab_page/modules/safe_browsing/safe_browsing_handler.h"
Tibor Goldschwendt53a0eab2021-07-29 10:40:25268#include "chrome/browser/new_tab_page/promos/promo_service.h"
Yann Dago44d6cc322022-07-13 17:46:25269#include "chrome/browser/policy/developer_tools_policy_handler.h"
Tibor Goldschwendtf3a3ce92021-08-17 00:42:16270#include "chrome/browser/search/background/ntp_custom_background_service.h"
Reilly Grantd4fb5842021-03-15 23:16:49271#include "chrome/browser/serial/serial_policy_allowed_ports.h"
thestigc91176f42014-10-28 20:16:35272#include "chrome/browser/signin/signin_promo.h"
Mei Liang74df4f82022-09-26 23:00:33273#include "chrome/browser/ui/commerce/price_tracking/shopping_list_ui_tab_helper.h"
zpengdb4a58e2017-01-10 17:40:32274#include "chrome/browser/ui/startup/startup_browser_creator.h"
rbpotterbe128632019-11-22 04:50:42275#include "chrome/browser/ui/webui/history/foreign_session_handler.h"
Tibor Goldschwendt53ca78b2020-10-07 19:56:18276#include "chrome/browser/ui/webui/new_tab_page/new_tab_page_handler.h"
Tibor Goldschwendtbbdbe8f2021-05-20 19:27:39277#include "chrome/browser/ui/webui/new_tab_page/new_tab_page_ui.h"
John Lee136759f02019-04-15 20:19:11278#include "chrome/browser/ui/webui/settings/settings_ui.h"
Mark Schillaciba4a7322022-06-29 15:08:35279#include "chrome/browser/ui/webui/side_panel/read_anything/read_anything_prefs.h"
Roman Aroracd8462c2021-08-03 01:20:33280#include "chrome/browser/ui/webui/tab_search/tab_search_prefs.h"
rbpotter73c13252021-07-16 21:29:34281#include "chrome/browser/ui/webui/whats_new/whats_new_ui.h"
Greg Thompson8bcd799b2018-08-10 09:49:33282#include "chrome/browser/upgrade_detector/upgrade_detector.h"
Abigail Klein153fa7a2021-08-26 19:50:50283#include "components/live_caption/live_caption_controller.h"
evliuc5b5a722022-10-28 00:05:49284#include "components/live_caption/live_translate_controller.h"
Lei Zhang6cb9b842019-12-16 20:29:12285#include "components/ntp_tiles/custom_links_manager_impl.h"
Xiaohan Wangae7f9182022-01-16 00:37:52286#endif // BUILDFLAG(IS_ANDROID)
thestigc91176f42014-10-28 20:16:35287
Xiaohan Wangae7f9182022-01-16 00:37:52288#if BUILDFLAG(IS_CHROMEOS)
Tim Sergeant2b6bc66e2022-04-14 20:15:21289#include "chrome/browser/apps/intent_helper/supported_links_infobar_prefs_service.h"
Erik Chen643355d2022-04-22 05:44:49290#include "chrome/browser/chromeos/extensions/echo_private/echo_private_api.h"
Maria Petrisorbb5226b2022-06-02 09:10:51291#include "chrome/browser/chromeos/extensions/login_screen/login/login_api_prefs.h"
Alvin Lee99f8d9a82021-11-18 18:45:55292#include "chrome/browser/chromeos/policy/dlp/dlp_rules_manager_impl.h"
Olya Kalitova39e913d52021-03-16 22:26:22293#include "chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_api.h"
Kuo-Hsin Yang40227972022-05-16 18:39:09294#include "chrome/browser/memory/oom_kills_monitor.h"
Michael Ershov5b2a7062022-01-17 14:28:45295#include "chrome/browser/policy/networking/policy_cert_service.h"
Ben Franz73537362021-11-08 11:53:40296#include "chrome/browser/policy/system_features_disable_list_policy_handler.h"
Michael Ershovd9a627e2021-11-03 13:55:27297#include "chrome/browser/ui/webui/certificates_handler.h"
anina koehlerf1e29df62022-08-10 07:22:32298#include "chromeos/ui/wm/fullscreen/pref_names.h"
Pranav Batrae71407672021-08-16 23:53:00299#if defined(USE_CUPS)
300#include "chrome/browser/extensions/api/printing/printing_api_handler.h"
301#endif // defined(USE_CUPS)
Xiaohan Wangae7f9182022-01-16 00:37:52302#endif // BUILDFLAG(IS_CHROMEOS)
Olya Kalitova39e913d52021-03-16 22:26:22303
Yuta Hijikata31a359c2020-11-27 07:50:26304#if BUILDFLAG(IS_CHROMEOS_ASH)
Yao Li646187a2021-11-16 01:02:11305#include "ash/components/arc/arc_prefs.h"
Henrique Ferreirof9d1cb22021-07-13 01:32:47306#include "ash/constants/ash_pref_names.h"
Xiyuan Xia5a8c4172019-05-13 16:23:48307#include "ash/public/cpp/ash_prefs.h"
Jeevan Shikarama73dec1a2022-09-08 05:51:52308#include "chrome/browser/apps/app_preload_service/app_preload_service.h"
Nancy Wang811fe4f92021-10-08 12:28:13309#include "chrome/browser/apps/app_service/metrics/app_platform_metrics_service.h"
Tim Sergeant1231dcc2021-05-10 14:00:57310#include "chrome/browser/apps/app_service/webapk/webapk_prefs.h"
Anastasiia N0582a902021-12-08 17:44:59311#include "chrome/browser/ash/account_manager/account_apps_availability.h"
Pranav Batra468fbe622021-06-23 01:42:36312#include "chrome/browser/ash/account_manager/account_manager_edu_coexistence_controller.h"
Yeunjoo Choi366e3462022-12-06 08:58:53313#include "chrome/browser/ash/app_list/arc/arc_app_list_prefs.h"
Henrique Ferreiro53d4dc42021-01-27 01:02:38314#include "chrome/browser/ash/app_mode/arc/arc_kiosk_app_manager.h"
315#include "chrome/browser/ash/app_mode/kiosk_app_manager.h"
316#include "chrome/browser/ash/app_mode/kiosk_cryptohome_remover.h"
317#include "chrome/browser/ash/app_mode/web_app/web_kiosk_app_manager.h"
Sammie Quon21285822021-09-20 19:48:34318#include "chrome/browser/ash/app_restore/full_restore_prefs.h"
Yeunjoo Choidf64fe692021-03-08 05:32:34319#include "chrome/browser/ash/apps/apk_web_app_service.h"
Henrique Ferreiro2ef82302021-03-24 12:12:25320#include "chrome/browser/ash/arc/policy/arc_policy_bridge.h"
Henrique Ferreiro717d3022021-03-24 15:43:56321#include "chrome/browser/ash/arc/session/arc_session_manager.h"
Yeunjoo Choi2c5e78c2021-04-01 10:51:52322#include "chrome/browser/ash/bluetooth/debug_logs_manager.h"
Pranav Batra468fbe622021-06-23 01:42:36323#include "chrome/browser/ash/borealis/borealis_prefs.h"
Fergus Dall54a6a432022-11-18 17:35:29324#include "chrome/browser/ash/bruschetta/bruschetta_pref_names.h"
Yeunjoo Choiebf07312021-03-24 01:48:51325#include "chrome/browser/ash/cert_provisioning/cert_provisioning_common.h"
Yeunjoo Choi8a355962021-04-13 01:22:27326#include "chrome/browser/ash/child_accounts/family_user_chrome_activity_metrics.h"
327#include "chrome/browser/ash/child_accounts/family_user_metrics_service.h"
328#include "chrome/browser/ash/child_accounts/family_user_session_metrics.h"
Yeunjoo Choi52e1c572021-04-08 07:56:27329#include "chrome/browser/ash/child_accounts/parent_access_code/parent_access_service.h"
Yeunjoo Choi8a355962021-04-13 01:22:27330#include "chrome/browser/ash/child_accounts/screen_time_controller.h"
Yeunjoo Choi882388a2021-04-12 05:17:29331#include "chrome/browser/ash/child_accounts/time_limits/app_activity_registry.h"
332#include "chrome/browser/ash/child_accounts/time_limits/app_time_controller.h"
Pranav Batra468fbe622021-06-23 01:42:36333#include "chrome/browser/ash/crosapi/browser_util.h"
Andreea Costinas2a142bd2021-10-05 10:22:49334#include "chrome/browser/ash/crosapi/network_settings_service_ash.h"
Yeunjoo Choiaba21c02021-05-07 09:06:34335#include "chrome/browser/ash/crostini/crostini_pref_names.h"
Henrique Ferreiro2029590e2021-09-23 08:01:52336#include "chrome/browser/ash/cryptauth/client_app_metadata_provider_service.h"
337#include "chrome/browser/ash/cryptauth/cryptauth_device_id_provider_impl.h"
Yeunjoo Choi91907642021-04-16 13:18:19338#include "chrome/browser/ash/customization/customization_document.h"
Nigel Taoa1d4dce2022-10-18 00:01:20339#include "chrome/browser/ash/file_manager/file_manager_pref_names.h"
Andrew Rayskiy47076d72022-09-27 18:46:14340#include "chrome/browser/ash/file_manager/file_tasks.h"
Yeunjoo Choi627505b7b2021-05-13 15:56:31341#include "chrome/browser/ash/file_system_provider/registry.h"
Yeunjoo Choi55626172021-07-27 03:17:27342#include "chrome/browser/ash/first_run/first_run.h"
Geng Li11526bb42022-02-15 23:59:14343#include "chrome/browser/ash/floating_workspace/floating_workspace_util.h"
Joel Hockeyfcc56a292022-06-17 02:28:00344#include "chrome/browser/ash/guest_os/guest_id.h"
Yeunjoo Choi0a9c1d42021-03-31 01:38:56345#include "chrome/browser/ash/guest_os/guest_os_pref_names.h"
David Munro86435df2022-07-25 01:27:45346#include "chrome/browser/ash/guest_os/guest_os_terminal.h"
Yeunjoo Choi6aa07d82021-03-22 08:55:28347#include "chrome/browser/ash/lock_screen_apps/state_controller.h"
Henrique Ferreiro606669a2021-02-24 13:36:55348#include "chrome/browser/ash/login/demo_mode/demo_mode_resources_remover.h"
349#include "chrome/browser/ash/login/demo_mode/demo_session.h"
350#include "chrome/browser/ash/login/demo_mode/demo_setup_controller.h"
Henrique Ferreiroe55c0d5f2021-02-25 02:16:05351#include "chrome/browser/ash/login/quick_unlock/fingerprint_storage.h"
352#include "chrome/browser/ash/login/quick_unlock/pin_storage_prefs.h"
353#include "chrome/browser/ash/login/quick_unlock/quick_unlock_utils.h"
Ahmed Nasrbe0670b72022-03-09 23:28:17354#include "chrome/browser/ash/login/reporting/login_logout_reporter.h"
Henrique Ferreiro96143e5a2021-02-25 12:52:36355#include "chrome/browser/ash/login/saml/saml_profile_prefs.h"
Henrique Ferreiro1786d45a2021-02-25 22:48:19356#include "chrome/browser/ash/login/screens/enable_adb_sideloading_screen.h"
Henrique Ferreiro81312ab2021-02-25 23:14:03357#include "chrome/browser/ash/login/screens/reset_screen.h"
Henrique Ferreiro995b1db2021-03-06 00:41:41358#include "chrome/browser/ash/login/security_token_session_controller.h"
Henrique Ferreiroad3c6a572021-03-02 12:43:51359#include "chrome/browser/ash/login/session/user_session_manager.h"
Henrique Ferreiroa264c8c02021-07-20 08:31:47360#include "chrome/browser/ash/login/signin/signin_error_notifier.h"
Henrique Ferreiro995b1db2021-03-06 00:41:41361#include "chrome/browser/ash/login/startup_utils.h"
Henrique Ferreiro2dc9e1c2021-03-04 17:33:58362#include "chrome/browser/ash/login/users/avatar/user_image_manager.h"
363#include "chrome/browser/ash/login/users/avatar/user_image_sync_observer.h"
364#include "chrome/browser/ash/login/users/chrome_user_manager_impl.h"
Henrique Ferreiro12a42b02021-03-04 23:45:53365#include "chrome/browser/ash/login/users/multi_profile_user_controller.h"
Henrique Ferreirod57c4962021-09-29 07:26:59366#include "chrome/browser/ash/net/network_throttling_observer.h"
Yeunjoo Choic5b3bf492021-03-15 13:57:19367#include "chrome/browser/ash/plugin_vm/plugin_vm_pref_names.h"
Felipe Andrade5cb496c52022-01-18 19:13:28368#include "chrome/browser/ash/policy/active_directory/active_directory_migration_manager.h"
Yeunjoo Choi7227dba2021-08-04 06:35:47369#include "chrome/browser/ash/policy/core/browser_policy_connector_ash.h"
Yeunjoo Choiead8b3c2021-07-27 08:08:19370#include "chrome/browser/ash/policy/core/device_cloud_policy_manager_ash.h"
Yeunjoo Choi8623e4a2021-07-02 01:57:06371#include "chrome/browser/ash/policy/core/dm_token_storage.h"
Yeunjoo Choia60b6212021-07-06 11:25:12372#include "chrome/browser/ash/policy/enrollment/auto_enrollment_client_impl.h"
373#include "chrome/browser/ash/policy/enrollment/enrollment_requisition_manager.h"
374#include "chrome/browser/ash/policy/external_data/handlers/device_wallpaper_image_external_data_handler.h"
Yeunjoo Choi5d6eb012021-07-09 03:03:05375#include "chrome/browser/ash/policy/handlers/adb_sideloading_allowance_mode_policy_handler.h"
376#include "chrome/browser/ash/policy/handlers/minimum_version_policy_handler.h"
Henrique Ferreiro11492caf2021-11-02 22:16:16377#include "chrome/browser/ash/policy/handlers/tpm_auto_update_mode_policy_handler.h"
Yeunjoo Choiad73a322021-07-20 04:55:49378#include "chrome/browser/ash/policy/reporting/app_install_event_log_manager_wrapper.h"
379#include "chrome/browser/ash/policy/reporting/arc_app_install_event_logger.h"
Sanja Perisic91217932022-04-13 13:45:02380#include "chrome/browser/ash/policy/scheduled_task_handler/reboot_notifications_scheduler.h"
Felipe Andrade8f81c5f2021-11-09 00:44:02381#include "chrome/browser/ash/policy/server_backed_state/active_directory_device_state_uploader.h"
Yeunjoo Choid33fdb62021-07-21 06:57:42382#include "chrome/browser/ash/policy/status_collector/device_status_collector.h"
383#include "chrome/browser/ash/policy/status_collector/status_collector.h"
Yeunjoo Choi0bab0cf2021-05-31 05:14:03384#include "chrome/browser/ash/power/auto_screen_brightness/metrics_reporter.h"
Yeunjoo Choi7629a77a12021-06-02 06:37:18385#include "chrome/browser/ash/power/power_metrics_reporter.h"
Henrique Ferreiroae846062021-10-04 14:44:34386#include "chrome/browser/ash/preferences.h"
Pranav Batra9c0eb782022-02-01 23:13:33387#include "chrome/browser/ash/printing/cups_printers_manager.h"
Yeunjoo Choia52715a2021-09-09 02:45:17388#include "chrome/browser/ash/printing/enterprise_printers_provider.h"
Yeunjoo Choi0fb01cf62021-04-21 01:30:15389#include "chrome/browser/ash/release_notes/release_notes_storage.h"
Pranav Batra468fbe622021-06-23 01:42:36390#include "chrome/browser/ash/scanning/chrome_scanning_app_delegate.h"
Henrique Ferreiro11492caf2021-11-02 22:16:16391#include "chrome/browser/ash/scheduler_configuration_manager.h"
Yeunjoo Choi5097e9c2021-02-25 08:46:52392#include "chrome/browser/ash/settings/device_settings_cache.h"
Yeunjoo Choia43d74a2021-02-10 23:23:19393#include "chrome/browser/ash/system/automatic_reboot_manager.h"
394#include "chrome/browser/ash/system/input_device_settings.h"
Henrique Ferreiro11492caf2021-11-02 22:16:16395#include "chrome/browser/ash/web_applications/help_app/help_app_notification_controller.h"
Anthony Vallee-Dubois85edf222020-03-24 20:30:02396#include "chrome/browser/device_identity/chromeos/device_oauth2_token_store_chromeos.h"
[email protected]5a145e82014-05-29 22:19:07397#include "chrome/browser/extensions/extension_assets_manager_chromeos.h"
xhwangc84739e2015-03-14 01:02:46398#include "chrome/browser/media/protected_media_identifier_permission_context.h"
[email protected]8304f61a2014-05-24 12:17:33399#include "chrome/browser/metrics/chromeos_metrics_provider.h"
James Cookc542d992019-11-08 23:34:24400#include "chrome/browser/ui/app_list/app_list_syncable_service.h"
Erik Chenc2927bbd2021-09-22 23:20:07401#include "chrome/browser/ui/ash/shelf/chrome_shelf_prefs.h"
Yeunjoo Choi3fc970b2022-10-28 02:55:48402#include "chrome/browser/ui/webui/ash/login/enable_debugging_screen_handler.h"
Yeunjoo Choib727c2d2022-11-01 03:09:34403#include "chrome/browser/ui/webui/ash/login/signin_screen_handler.h"
Yeunjoo Choi6edb40f2022-08-31 04:00:52404#include "chrome/browser/ui/webui/settings/ash/os_settings_ui.h"
Roman Aleksandrovd32e34e72019-05-22 17:29:50405#include "chrome/browser/upgrade_detector/upgrade_detector_chromeos.h"
Henrique Ferreiro94c5e502022-08-17 14:20:22406#include "chromeos/ash/components/audio/audio_devices_pref_handler_impl.h"
Henrique Ferreiro35a7b8c2022-08-19 01:32:13407#include "chromeos/ash/components/device_activity/device_activity_controller.h"
Henrique Ferreiroc9e2aaf2022-07-07 13:45:18408#include "chromeos/ash/components/local_search_service/search_metrics_reporter.h"
Yeunjoo Choi1a8bc9942022-06-20 05:31:16409#include "chromeos/ash/components/network/cellular_esim_profile_handler_impl.h"
410#include "chromeos/ash/components/network/cellular_metrics_logger.h"
Yeunjoo Choibe813122022-06-29 15:13:44411#include "chromeos/ash/components/network/fast_transition_observer.h"
412#include "chromeos/ash/components/network/managed_cellular_pref_handler.h"
Yeunjoo Choi643dead2022-07-11 12:52:16413#include "chromeos/ash/components/network/network_metadata_store.h"
Yeunjoo Choida91d6452022-06-02 15:26:42414#include "chromeos/ash/components/network/proxy/proxy_config_handler.h"
Henrique Ferreiroacf002702022-10-06 21:54:59415#include "chromeos/ash/components/timezone/timezone_resolver.h"
Yeunjoo Choi2d3704c12022-06-21 02:44:34416#include "chromeos/ash/services/assistant/public/cpp/assistant_prefs.h"
Anastasiia N1ad94e1e2022-09-15 08:47:28417#include "chromeos/ash/services/auth_factor_config/auth_factor_config.h"
Henrique Ferreiroae001e92022-09-01 16:58:46418#include "chromeos/ash/services/bluetooth_config/bluetooth_power_controller_impl.h"
419#include "chromeos/ash/services/bluetooth_config/device_name_manager_impl.h"
Yeunjoo Choia292ed72022-11-01 01:19:55420#include "chromeos/ash/services/device_sync/public/cpp/device_sync_prefs.h"
Yeunjoo Choie4980f452022-10-21 16:07:58421#include "chromeos/ash/services/multidevice_setup/multidevice_setup_service.h"
Yue Lif0da5bf2021-11-19 22:01:57422#include "chromeos/components/quick_answers/public/cpp/quick_answers_prefs.h"
Kushagra Sinhab37e24db2021-07-02 15:14:24423#include "components/account_manager_core/chromeos/account_manager.h"
stevenjbf22f82e2016-10-26 21:47:38424#include "components/onc/onc_pref_names.h"
glevin5dd01a72016-03-23 23:08:12425#include "components/quirks/quirks_manager.h"
tbarzicd9a88fc92017-07-14 02:18:10426#include "extensions/browser/api/lock_screen_data/lock_screen_item_storage.h"
Pranav Batra468fbe622021-06-23 01:42:36427
Pranav Batra468fbe622021-06-23 01:42:36428#endif // BUILDFLAG(IS_CHROMEOS_ASH)
429
Xiaohan Wangae7f9182022-01-16 00:37:52430#if BUILDFLAG(IS_MAC)
Lei Zhangdb0c0872022-03-04 04:26:59431#include "chrome/browser/media/webrtc/system_media_capture_permissions_stats_mac.h"
[email protected]425f7a02014-04-29 01:51:44432#include "chrome/browser/ui/cocoa/apps/quit_with_apps_controller_mac.h"
Tom Anderson6a496032018-08-30 23:38:37433#include "chrome/browser/ui/cocoa/confirm_quit.h"
Song Fangzhencda4af62021-09-09 05:24:02434#include "chrome/browser/web_applications/app_shim_registry_mac.h"
[email protected]2366a3a2012-10-02 20:41:14435#endif
436
Xiaohan Wangae7f9182022-01-16 00:37:52437#if BUILDFLAG(IS_WIN)
[email protected]c5d4b1842014-06-20 21:19:50438#include "chrome/browser/component_updater/sw_reporter_installer_win.h"
Scott Violet3ff87d062021-12-21 06:10:10439#include "chrome/browser/font_prewarmer_tab_helper.h"
Alex St-Onge9e4b9b72021-06-08 15:35:54440#include "chrome/browser/media/cdm_pref_service_helper.h"
Xiaohan Wang259f34c7a2022-03-26 23:18:19441#include "chrome/browser/media/media_foundation_service_monitor.h"
Will Harriseb364b2c2022-06-23 00:49:01442#include "chrome/browser/os_crypt/app_bound_encryption_metrics_win.h"
Nico Webereaa08412019-08-14 01:24:37443#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
Patrick Monettebb543942019-05-17 17:45:32444#include "chrome/browser/win/conflicts/incompatible_applications_updater.h"
445#include "chrome/browser/win/conflicts/module_database.h"
446#include "chrome/browser/win/conflicts/third_party_conflicts_manager.h"
Nico Webereaa08412019-08-14 01:24:37447#endif // BUILDFLAG(GOOGLE_CHROME_BRANDING)
Rainhard Findling4d621ca2020-10-26 20:46:06448#include "chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_controller_win.h"
ftirelo46b34222017-06-19 10:36:57449#include "chrome/browser/safe_browsing/chrome_cleaner/settings_resetter_win.h"
alito856526d2017-03-03 09:16:17450#include "chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_prefs_manager.h"
[email protected]bdb8a1e2013-10-03 08:14:00451#endif
452
Xiaohan Wangae7f9182022-01-16 00:37:52453#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
Will Harris265b3942019-10-21 01:01:33454#include "components/os_crypt/os_crypt.h"
455#endif
456
Zonghan Xuc528f6e82022-08-09 22:31:58457#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
Song Fangzhencda4af62021-09-09 05:24:02458#include "chrome/browser/web_applications/url_handler_prefs.h"
Zonghan Xuc528f6e82022-08-09 22:31:58459#include "components/device_signals/core/browser/pref_names.h"
Lu Huangcd11f21c2021-02-03 22:24:56460#endif
461
Yuta Hijikata31a359c2020-11-27 07:50:26462// TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
463// of lacros-chrome is complete.
Xiaohan Wangae7f9182022-01-16 00:37:52464#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \
465 (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS))
Nicolas Ouellet-Payeur9a4a94d2018-09-17 15:26:11466#include "chrome/browser/browser_switcher/browser_switcher_prefs.h"
467#endif
468
Erik Chen38ceca082020-12-16 01:31:35469#if BUILDFLAG(IS_CHROMEOS_LACROS)
Nancy Wangc84098e2022-10-24 10:30:36470#include "chrome/browser/apps/app_service/metrics/website_metrics_service_lacros.h"
Alex Ilin953f1092021-11-26 15:49:10471#include "chrome/browser/lacros/account_manager/account_cache.h"
Polina Bondarenko3f3dc4f2022-04-25 07:55:01472#include "chrome/browser/lacros/app_mode/kiosk_session_service_lacros.h"
Erik Chen38ceca082020-12-16 01:31:35473#include "chrome/browser/lacros/lacros_prefs.h"
Andreea Costinas68cad91f2021-09-22 15:58:09474#include "chrome/browser/lacros/net/proxy_config_service_lacros.h"
Nicolas Dossou-Gbete7ccc8802022-11-10 15:12:46475#endif
476
477#if BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(ENABLE_DICE_SUPPORT)
478#include "chrome/browser/ui/startup/first_run_service.h"
Erik Chen38ceca082020-12-16 01:31:35479#endif
480
Xiaohan Wangae7f9182022-01-16 00:37:52481#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH)
Yusuke Sato28ab25092021-05-07 23:04:02482#include "chrome/browser/device_identity/device_oauth2_token_store_desktop.h"
Yann Dago0d896f62020-02-04 19:59:15483#include "chrome/browser/downgrade/downgrade_prefs.h"
thestigf2a0fa92016-09-07 09:37:29484#include "chrome/browser/ui/startup/default_browser_prompt.h"
485#endif
486
[email protected]ceafc462013-11-04 12:26:03487#if defined(TOOLKIT_VIEWS)
488#include "chrome/browser/ui/browser_view_prefs.h"
Yuheng Huang9ce54892022-05-06 19:29:39489#include "chrome/browser/ui/side_search/side_search_prefs.h"
[email protected]ceafc462013-11-04 12:26:03490#endif
491
Scott Violet53fb03c2021-01-15 23:48:16492#if BUILDFLAG(ENABLE_SESSION_SERVICE)
Christian Dullweber0747d7c92021-05-10 10:05:13493#include "chrome/browser/sessions/session_data_service.h"
Scott Violet53fb03c2021-01-15 23:48:16494#include "chrome/browser/sessions/session_service_log.h"
495#endif
tomc5dd0cd2021-10-01 22:15:52496
Tom Andersoncb3408482022-09-02 19:06:41497#if BUILDFLAG(IS_LINUX)
498#include "ui/color/system_theme.h"
499#endif
500
[email protected]572f40c9b2012-07-06 20:35:33501namespace {
Yao Xiao9255aec2022-02-05 00:02:19502
Lei Zhang9523de82022-03-14 21:40:21503// Please keep the list of deprecated prefs in chronological order. i.e. Add to
504// the bottom of the list, not here at the top.
Toby Huang33753282020-05-05 18:55:22505
Kevin Radtke766244c2021-11-23 02:20:45506// Deprecated 11/2021.
507const char kWasPreviouslySetUpPrefName[] = "android_sms.was_previously_set_up";
508
Simon Pelchat83b8a452021-12-07 15:49:39509// Deprecated 12/2021.
510const char kAvailabilityProberOriginCheck[] =
511 "Availability.Prober.cache.IsolatedPrerenderOriginCheck";
512const char kAvailabilityProberTLSCanaryCheck[] =
513 "Availability.Prober.cache.IsolatedPrerenderTLSCanaryCheck";
514const char kAvailabilityProberDNSCanaryCheck[] =
515 "Availability.Prober.cache.IsolatedPrerenderDNSCanaryCheck";
Caitlin Fischer0f812b02021-12-13 17:00:56516const char kStabilityRendererHangCount[] =
517 "user_experience_metrics.stability.renderer_hang_count";
Caitlin Fischer03ab6cb2021-12-07 19:54:06518const char kStabilityIncompleteSessionEndCount[] =
519 "user_experience_metrics.stability.incomplete_session_end_count";
520const char kStabilitySessionEndCompleted[] =
521 "user_experience_metrics.stability.session_end_completed";
Simon Pelchat83b8a452021-12-07 15:49:39522
Aga Wronska5c15cec2021-12-10 16:21:32523#if BUILDFLAG(IS_CHROMEOS_ASH)
524// Deprecated 12/2021.
525const char kEduCoexistenceSecondaryAccountsInvalidationVersion[] =
526 "account_manager.edu_coexistence_secondary_accounts_invalidation_version";
Aga Wronska5c15cec2021-12-10 16:21:32527
Boris Sazonov4f61fe382021-12-13 19:05:30528// Deprecated 12/2021.
529const char kSyncFirstRunCompleted[] = "sync.first_run_completed";
Rachel Wongae7ad5d2021-12-14 01:57:27530
531// Deprecated 12/2021.
532const char kArcAppReinstallState[] = "arc_app_reinstall_state";
Boris Sazonov6bc149b2021-12-29 11:02:58533
534// Deprecated 12/2021.
535const char kOsSyncFeatureEnabled[] = "sync.os_sync_feature_enabled";
Boris Sazonov4f61fe382021-12-13 19:05:30536#endif // BUILDFLAG(IS_CHROMEOS_ASH)
537
Andy Paicu5b05dd6d2021-12-28 17:40:07538// Deprecated 12/2021.
Xiaohan Wangae7f9182022-01-16 00:37:52539#if BUILDFLAG(IS_ANDROID)
Andy Paicu5b05dd6d2021-12-28 17:40:07540const char kSearchGeolocationDisclosureDismissed[] =
541 "search_geolocation_disclosure.dismissed";
542const char kSearchGeolocationDisclosureShownCount[] =
543 "search_geolocation_disclosure.shown_count";
544const char kSearchGeolocationDisclosureLastShowDate[] =
545 "search_geolocation_disclosure.last_show_date";
546const char kSearchGeolocationPreDisclosureMetricsRecorded[] =
547 "search_geolocation_pre_disclosure_metrics_recorded";
548const char kSearchGeolocationPostDisclosureMetricsRecorded[] =
549 "search_geolocation_post_disclosure_metrics_recorded";
Xiaohan Wangae7f9182022-01-16 00:37:52550#endif // BUILDFLAG(IS_ANDROID)
Andy Paicu5b05dd6d2021-12-28 17:40:07551
Tarun Bansal19172682022-01-27 01:26:24552// Deprecated 01/2022.
553constexpr char kHasSeenLiteModeInfoBar[] =
554 "litemode.https-image-compression.user-has-seen-infobar";
555const char kDailyHttpContentLengthLastUpdateDate[] =
556 "data_reduction.last_update_date";
557const char kDailyHttpOriginalContentLength[] =
558 "data_reduction.daily_original_length";
559const char kDailyHttpReceivedContentLength[] =
560 "data_reduction.daily_received_length";
561const char kDataUsageReportingEnabled[] = "data_usage_reporting.enabled";
562const char kHttpReceivedContentLength[] = "http_received_content_length";
563const char kHttpOriginalContentLength[] = "http_original_content_length";
564const char kThisWeekNumber[] = "data_reduction.this_week_number";
565const char kThisWeekServicesDownstreamBackgroundKB[] =
566 "data_reduction.this_week_services_downstream_background_kb";
567const char kThisWeekServicesDownstreamForegroundKB[] =
568 "data_reduction.this_week_services_downstream_foreground_kb";
569const char kLastWeekServicesDownstreamBackgroundKB[] =
570 "data_reduction.last_week_services_downstream_background_kb";
571const char kLastWeekServicesDownstreamForegroundKB[] =
572 "data_reduction.last_week_services_downstream_foreground_kb";
573const char kThisWeekUserTrafficContentTypeDownstreamKB[] =
574 "data_reduction.this_week_user_traffic_contenttype_downstream_kb";
575const char kLastWeekUserTrafficContentTypeDownstreamKB[] =
576 "data_reduction.last_week_user_traffic_contenttype_downstream_kb";
Tarun Bansal556a5692022-02-01 18:56:24577const char kDataSaverEnabled[] = "spdy_proxy.enabled";
578const char kDataReductionProxyWasEnabledBefore[] =
579 "spdy_proxy.was_enabled_before";
580const char kDataReductionProxyLastEnabledTime[] =
581 "data_reduction.last_enabled_time";
Tarun Bansal19172682022-01-27 01:26:24582
Caitlin Fischer0d69a3b2022-02-04 21:54:05583// Deprecated 02/2022.
Muyao Xubb2cb51ce2022-02-14 19:01:18584#if !BUILDFLAG(IS_ANDROID)
585const char kMediaRouterCloudServicesPrefSet[] =
586 "media_router.cloudservices.prefset";
587const char kMediaRouterEnableCloudServices[] =
588 "media_router.cloudservices.enabled";
589#endif
Ari Chivukula3f8b6562022-02-18 23:33:43590const char kWebSQLInThirdPartyContextEnabled[] =
591 "policy.web_sql_in_third_party_context_enabled";
Caitlin Fischer0d69a3b2022-02-04 21:54:05592
Matt Walliserc83a0ef42022-02-17 21:12:05593#if BUILDFLAG(IS_CHROMEOS_ASH)
594// Deprecated 02/2022
595const char kPhoneHubCameraRollPendingStatePrefName[] =
596 "multidevice_setup.phone_hub_camera_roll_pending_state";
597#endif // BUILDFLAG(IS_CHROMEOS_ASH)
598
Lei Zhang9523de82022-03-14 21:40:21599// Deprecated 02/2022
600const char kFlocIdValuePrefKey[] = "federated_learning.floc_id.value";
601const char kFlocIdStatusPrefKey[] = "federated_learning.floc_id.status";
602const char kFlocIdHistoryBeginTimePrefKey[] =
603 "federated_learning.floc_id.history_begin_time";
604const char kFlocIdHistoryEndTimePrefKey[] =
605 "federated_learning.floc_id.history_end_time";
606const char kFlocIdFinchConfigVersionPrefKey[] =
607 "federated_learning.floc_id.finch_config_version";
608const char kFlocIdSortingLshVersionPrefKey[] =
609 "federated_learning.floc_id.sorting_lsh_version";
610const char kFlocIdComputeTimePrefKey[] =
611 "federated_learning.floc_id.compute_time";
612
Caitlin Fischerf52dbab2022-03-02 22:11:39613// Deprecated 03/2022.
614const char kStabilityChildProcessCrashCount[] =
615 "user_experience_metrics.stability.child_process_crash_count";
Caitlin Fischer13cf5e782022-03-31 13:27:27616const char kStabilityRendererFailedLaunchCount[] =
617 "user_experience_metrics.stability.renderer_failed_launch_count";
618const char kStabilityExtensionRendererFailedLaunchCount[] =
619 "user_experience_metrics.stability.extension_renderer_failed_launch_count";
Caitlin Fischerf52dbab2022-03-02 22:11:39620#if BUILDFLAG(ENABLE_PLUGINS)
621const char kStabilityPluginStats[] =
622 "user_experience_metrics.stability.plugin_stats2";
623#endif
Caitlin Fischer92fb62d2022-03-28 15:43:28624#if !BUILDFLAG(IS_ANDROID)
625const char kStabilityLaunchCount[] =
626 "user_experience_metrics.stability.launch_count";
627#endif
Caitlin Fischer6134e2712022-03-30 22:54:23628const char kStabilityExtensionRendererLaunchCount[] =
629 "user_experience_metrics.stability.extension_renderer_launch_count";
Caroline Rising663480d2022-04-01 16:07:26630const char kShowReadingListInBookmarkBar[] = "bookmark_bar.show_reading_list";
Caitlin Fischerf52dbab2022-03-02 22:11:39631
Robert Seseka1734d62022-04-20 19:09:31632// Deprecated 04/2022.
633#if BUILDFLAG(ENABLE_PLUGINS)
Robert Seseka1734d62022-04-20 19:09:31634const char kPluginsMetadata[] = "plugins.metadata";
Robert Seseka1734d62022-04-20 19:09:31635const char kPluginsResourceCacheUpdate[] = "plugins.resource_cache_update";
Caitlin Fischere321b452022-04-25 20:29:22636#endif // BUILDFLAG(ENABLE_PLUGINS)
Anastasiia N7e9dd802022-04-21 20:52:20637#if BUILDFLAG(IS_CHROMEOS_ASH)
638const char kAccountManagerNumTimesWelcomeScreenShown[] =
639 "account_manager.num_times_welcome_screen_shown";
640#endif // BUILDFLAG(IS_CHROMEOS_ASH)
Caitlin Fischere321b452022-04-25 20:29:22641#if !BUILDFLAG(IS_ANDROID)
642const char kStabilityRendererLaunchCount[] =
643 "user_experience_metrics.stability.renderer_launch_count";
644#endif // !BUILDFLAG(IS_ANDROID)
Anastasiia N7e9dd802022-04-21 20:52:20645
Geng Li8e6265f2022-04-28 21:34:27646#if BUILDFLAG(IS_CHROMEOS_ASH)
647// Deprecated 04/2022.
648const char kTimeOnOobe[] = "settings.time_on_oobe";
649#endif // BUILDFLAG(IS_CHROMEOS_ASH)
650
Sophie Changd5246ca2022-04-29 20:13:54651// Deprecated 04/2022.
652const char kOptimizationGuideRemoteFetchingEnabled[] =
653 "optimization_guide.remote_fetching_enabled";
654
George Benza2c5d6232022-05-06 23:35:44655#if !BUILDFLAG(IS_ANDROID)
656// Deprecated 05/2022.
657const char kAccessCodeCastDiscoveredNetworks[] =
658 "media_router.access_code_cast.discovered_networks";
659#endif // !BUILDFLAG(IS_ANDROID)
660
Mihai Sardarescub5b2c4a2022-05-23 14:55:40661#if !BUILDFLAG(IS_CHROMEOS_ASH)
662// Deprecated on non-ChromeOS on 05/2022.
663extern const char kAccountIdMigrationState[] = "account_id_migration_state";
664#endif // !BUILDFLAG(IS_CHROMEOS_ASH)
665
minch417d2ac2022-05-24 16:41:09666#if BUILDFLAG(IS_CHROMEOS_ASH)
667// Deprecated 05/2022.
668const char kColorModeThemed[] = "ash.dark_mode.color_mode_themed";
669#endif // BUILDFLAG(IS_CHROMEOS_ASH)
670
Josh Horwich73bda3e2022-05-26 22:13:27671#if BUILDFLAG(IS_CHROMEOS_ASH)
672// Deprecated 05/2022.
673const char kNativeBridge64BitSupportExperimentEnabled[] =
674 "arc.native_bridge_64bit_support_experiment";
675#endif // BUILDFLAG(IS_CHROMEOS_ASH)
676
Oksana Zhuravlova58c85282022-06-14 20:24:28677// Deprecated 06/2022.
678const char kBackgroundTracingLastUpload[] = "background_tracing.last_upload";
Caitlin Fischera3cec3e02022-06-23 04:29:10679const char kStabilityGpuCrashCount[] =
680 "user_experience_metrics.stability.gpu_crash_count";
Caitlin Fischerc1d6f3172022-06-28 23:10:02681const char kStabilityRendererCrashCount[] =
682 "user_experience_metrics.stability.renderer_crash_count";
683const char kStabilityExtensionRendererCrashCount[] =
684 "user_experience_metrics.stability.extension_renderer_crash_count";
Caitlin Fischer69c1ca892022-07-06 18:32:45685const char kPrivacySandboxPreferencesReconciled[] =
686 "privacy_sandbox.preferences_reconciled";
Caitlin Fischer07366b12022-06-23 17:18:24687#if BUILDFLAG(ENABLE_DICE_SUPPORT)
688const char kTokenServiceDiceCompatible[] = "token_service.dice_compatible";
689#endif
690#if !BUILDFLAG(IS_ANDROID)
691const char kStabilityPageLoadCount[] =
692 "user_experience_metrics.stability.page_load_count";
693#endif
David Padlipsky6bc14aa2022-06-23 21:08:34694#if BUILDFLAG(IS_CHROMEOS_ASH)
David Padlipsky6bc14aa2022-06-23 21:08:34695const char kImprovedShortcutsNotificationShownCount[] =
696 "ash.improved_shortcuts_notification_shown_count";
697#endif // BUILDFLAG(IS_CHROMEOS_ASH)
Min Qin2435d852022-06-29 22:38:31698#if BUILDFLAG(IS_ANDROID)
Min Qin2435d852022-06-29 22:38:31699const char kDownloadLaterPromptStatus[] =
700 "download.download_later_prompt_status";
701#endif // BUILDFLAG(IS_ANDROID)
702
Caitlin Fischer69c1ca892022-07-06 18:32:45703// Deprecated 07/2022
704const char kPrivacySandboxFlocEnabled[] = "privacy_sandbox.floc_enabled";
705const char kPrivacySandboxFlocDataAccessibleSince[] =
706 "privacy_sandbox.floc_data_accessible_since";
707const char kStabilityCrashCount[] =
708 "user_experience_metrics.stability.crash_count";
sauskiad03aa42022-07-12 10:38:18709const char kPrivacySandboxApisEnabledV2Init[] =
710 "privacy_sandbox.apis_enabled_v2_init";
Caitlin Fischer69c1ca892022-07-06 18:32:45711
JunHo Seo1f0506f22022-07-26 02:52:25712#if BUILDFLAG(ENABLE_EXTENSIONS)
Martin Kreichgauerc86cc652022-10-28 16:52:04713// Deprecated 06/2022.
714const char kU2fSecurityKeyApiEnabled[] =
715 "extensions.u2f_security_key_api_enabled";
716
JunHo Seo1f0506f22022-07-26 02:52:25717// Deprecated 07/2022.
718const char kExtensionToolbar[] = "extensions.toolbar";
Martin Kreichgauerc86cc652022-10-28 16:52:04719
720// Deprecated 10/2022.
721const char kLoadCryptoTokenExtension[] =
722 "extensions.load_cryptotoken_extension";
JunHo Seo1f0506f22022-07-26 02:52:25723#endif
724
dpapad8ad510132022-07-29 18:21:07725#if BUILDFLAG(IS_CHROMEOS_ASH)
726// Deprecated 07/2022.
Colin Kincaidf11f8562022-09-14 15:41:06727// The name of a boolean pref that determines whether we can show the folder
728// selection user nudge for the screen capture tool. When this pref is false, it
729// means that we showed the nudge at some point and the user interacted with the
730// capture mode session UI in such a way that the nudge no longer needs to be
731// displayed again.
732constexpr char kCanShowFolderSelectionNudge[] =
733 "ash.capture_mode.can_show_folder_selection_nudge";
dpapad8ad510132022-07-29 18:21:07734const char kSettingsShowOSBanner[] = "settings.cros.show_os_banner";
735#endif
736
Maksim Ivanov5705be32022-08-09 22:07:48737#if BUILDFLAG(IS_CHROMEOS_ASH)
738// Deprecated 08/2022.
739constexpr char kSecurityTokenSessionNotificationDisplayed[] =
740 "security_token_session_notification_displayed";
741#endif
742
Ryan Sultanemb3b422e2022-08-12 12:13:02743#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH)
744// Deprecated 08/2022.
745const char kProfileAvatarTutorialShown[] =
746 "profile.avatar_bubble_tutorial_shown";
747#endif
748
Roman Sorokinc138f2982022-09-05 16:42:30749#if BUILDFLAG(IS_CHROMEOS_ASH)
750// Deprecated 09/2022.
Colin Kincaidf11f8562022-09-14 15:41:06751constexpr char kClipboardHistoryNewFeatureBadgeCount[] =
752 "ash.clipboard.multipaste_nudges.new_feature_shown_count";
Roman Sorokinc138f2982022-09-05 16:42:30753constexpr char kUsersLastInputMethod[] = "UsersLRUInputMethod";
754#endif // BUILDFLAG(IS_CHROMEOS_ASH)
755
Theodore Olsauskas-Warren221e3ecd2022-09-08 08:21:24756// Deprecated 09/2022.
757const char kPrivacySandboxFirstPartySetsDataAccessAllowed[] =
758 "privacy_sandbox.first_party_sets_data_access_allowed";
759
Kirubel Aklilud8f571c92022-09-22 16:37:44760// Deprecated 09/2022.
761const char kFirstPartySetsEnabled[] = "first_party_sets.enabled";
762
Jan Keitel4707c1f2022-11-30 11:08:59763#if BUILDFLAG(IS_ANDROID)
764// Deprecated 09/2022.
765const char kDeprecatedAutofillAssistantConsent[] = "autofill_assistant_switch";
766const char kDeprecatedAutofillAssistantEnabled[] =
767 "AUTOFILL_ASSISTANT_ONBOARDING_ACCEPTED";
768const char kDeprecatedAutofillAssistantTriggerScriptsEnabled[] =
769 "Chrome.AutofillAssistant.ProactiveHelp";
770const char kDeprecatedAutofillAssistantTriggerScriptsIsFirstTimeUser[] =
771 "Chrome.AutofillAssistant.LiteScriptFirstTimeUser";
772#endif // BUILDFLAG(IS_ANDROID)
773
Yulun Wu066dab712022-11-01 17:20:24774#if BUILDFLAG(IS_CHROMEOS_ASH)
775// Deprecated 10/2022.
776const char kSuggestedContentInfoShownInLauncher[] =
777 "ash.launcher.suggested_content_info_shown";
778const char kSuggestedContentInfoDismissedInLauncher[] =
779 "ash.launcher.suggested_content_info_dismissed";
780#endif
781
Avi Drissmanfee70e5f2022-11-02 20:50:11782#if BUILDFLAG(ENABLE_BACKGROUND_MODE) && BUILDFLAG(IS_MAC)
783// Deprecated 11/2022.
784const char kUserRemovedLoginItem[] = "background_mode.user_removed_login_item";
785const char kChromeCreatedLoginItem[] =
786 "background_mode.chrome_created_login_item";
787const char kMigratedLoginItemPref[] =
788 "background_mode.migrated_login_item_pref";
789#endif
Nicolas Dossou-Gbete2804a372022-11-09 17:25:35790#if BUILDFLAG(IS_CHROMEOS_LACROS)
791const char kPrimaryProfileFirstRunFinished[] =
792 "lacros.primary_profile_first_run_finished";
793#endif
Avi Drissmanfee70e5f2022-11-02 20:50:11794
Victor Hugo Vianna Silva29ab0a32022-11-10 03:48:38795// Deprecated 11/2022.
796const char kLocalConsentsDictionary[] = "local_consents";
797
Jan Keitel4707c1f2022-11-30 11:08:59798// Deprecated 11/2022.
799const char kAutofillAssistantConsent[] = "autofill_assistant.consent";
800const char kAutofillAssistantEnabled[] = "autofill_assistant.enabled";
801const char kAutofillAssistantTriggerScriptsEnabled[] =
802 "autofill_assistant.trigger_scripts.enabled";
803const char kAutofillAssistantTriggerScriptsIsFirstTimeUser[] =
804 "autofill_assistant.trigger_scripts.is_first_time_user";
805
Lei Zhangb76b80e32020-04-08 16:58:16806// Register local state used only for migration (clearing or moving to a new
807// key).
808void RegisterLocalStatePrefsForMigration(PrefRegistrySimple* registry) {
Jonathan Freed4d49f522022-11-03 17:52:37809 // Deprecated 12/2021.
Caitlin Fischer0f812b02021-12-13 17:00:56810 registry->RegisterIntegerPref(kStabilityRendererHangCount, 0);
Caitlin Fischer03ab6cb2021-12-07 19:54:06811 registry->RegisterIntegerPref(kStabilityIncompleteSessionEndCount, 0);
812 registry->RegisterBooleanPref(kStabilitySessionEndCompleted, true);
Ari Chivukula3f8b6562022-02-18 23:33:43813
814 // Deprecated 02/2022.
Ari Chivukula3f8b6562022-02-18 23:33:43815 registry->RegisterBooleanPref(kWebSQLInThirdPartyContextEnabled, false);
Caitlin Fischerf52dbab2022-03-02 22:11:39816
Caitlin Fischere321b452022-04-25 20:29:22817 // Deprecated 03/2022.
Caitlin Fischerf52dbab2022-03-02 22:11:39818 registry->RegisterIntegerPref(kStabilityChildProcessCrashCount, 0);
Caitlin Fischer13cf5e782022-03-31 13:27:27819 registry->RegisterIntegerPref(kStabilityRendererFailedLaunchCount, 0);
820 registry->RegisterIntegerPref(kStabilityExtensionRendererFailedLaunchCount,
821 0);
Caitlin Fischerf52dbab2022-03-02 22:11:39822#if BUILDFLAG(ENABLE_PLUGINS)
823 registry->RegisterListPref(kStabilityPluginStats);
824#endif
Caitlin Fischer92fb62d2022-03-28 15:43:28825#if !BUILDFLAG(IS_ANDROID)
826 registry->RegisterIntegerPref(kStabilityLaunchCount, 0);
827#endif
Caitlin Fischer6134e2712022-03-30 22:54:23828 registry->RegisterIntegerPref(kStabilityExtensionRendererLaunchCount, 0);
Robert Seseka1734d62022-04-20 19:09:31829
830#if BUILDFLAG(ENABLE_PLUGINS)
831 // Deprecated 04/2022.
832 registry->RegisterDictionaryPref(kPluginsMetadata);
833 registry->RegisterStringPref(kPluginsResourceCacheUpdate, "0");
834#endif // BUILDFLAG(ENABLE_PLUGINS)
Caitlin Fischere321b452022-04-25 20:29:22835#if !BUILDFLAG(IS_ANDROID)
836 registry->RegisterIntegerPref(kStabilityRendererLaunchCount, 0);
837#endif // !BUILDFLAG(IS_ANDROID)
Josh Horwich73bda3e2022-05-26 22:13:27838
839#if BUILDFLAG(IS_CHROMEOS_ASH)
840 registry->RegisterBooleanPref(kNativeBridge64BitSupportExperimentEnabled,
841 false);
842#endif // BUILDFLAG(IS_CHROMEOS_ASH)
Oksana Zhuravlova58c85282022-06-14 20:24:28843
844 // Deprecated 06/2022.
845 registry->RegisterInt64Pref(kBackgroundTracingLastUpload, 0);
Caitlin Fischera3cec3e02022-06-23 04:29:10846 registry->RegisterIntegerPref(kStabilityGpuCrashCount, 0);
Caitlin Fischerc1d6f3172022-06-28 23:10:02847 registry->RegisterIntegerPref(kStabilityRendererCrashCount, 0);
848 registry->RegisterIntegerPref(kStabilityExtensionRendererCrashCount, 0);
Caitlin Fischer07366b12022-06-23 17:18:24849#if !BUILDFLAG(IS_ANDROID)
850 registry->RegisterIntegerPref(kStabilityPageLoadCount, 0);
851#endif
Caitlin Fischer69c1ca892022-07-06 18:32:45852
853 // Deprecated 07/2022.
854 registry->RegisterIntegerPref(kStabilityCrashCount, 0);
Roman Sorokinc138f2982022-09-05 16:42:30855
856#if BUILDFLAG(IS_CHROMEOS_ASH)
857 // Deprecated 09/2022
858 registry->RegisterDictionaryPref(kUsersLastInputMethod);
859#endif // BUILDFLAG(IS_CHROMEOS_ASH)
Avi Drissmanfee70e5f2022-11-02 20:50:11860
861// Deprecated 11/2022.
862#if BUILDFLAG(ENABLE_BACKGROUND_MODE) && BUILDFLAG(IS_MAC)
863 registry->RegisterBooleanPref(kUserRemovedLoginItem, false);
864 registry->RegisterBooleanPref(kChromeCreatedLoginItem, false);
865 registry->RegisterBooleanPref(kMigratedLoginItemPref, false);
866#endif // BUILDFLAG(IS_CHROMEOS_ASH)
Nicolas Dossou-Gbete2804a372022-11-09 17:25:35867
868#if BUILDFLAG(IS_CHROMEOS_LACROS)
869 registry->RegisterBooleanPref(kPrimaryProfileFirstRunFinished, false);
870#endif
Victor Hugo Vianna Silva29ab0a32022-11-10 03:48:38871
872 // Deprecated 11/2022.
873 registry->RegisterDictionaryPref(kLocalConsentsDictionary);
Lei Zhangb76b80e32020-04-08 16:58:16874}
875
James Cook0ba192bf2017-12-01 20:53:11876// Register prefs used only for migration (clearing or moving to a new key).
877void RegisterProfilePrefsForMigration(
878 user_prefs::PrefRegistrySyncable* registry) {
Yuta Hijikata31a359c2020-11-27 07:50:26879#if BUILDFLAG(IS_CHROMEOS_ASH)
Ahmed Fakhry485763c2022-07-26 18:52:16880 registry->RegisterBooleanPref(kCanShowFolderSelectionNudge,
881 /*default_value=*/true);
David Padlipsky6bc14aa2022-06-23 21:08:34882
883 registry->RegisterIntegerPref(kImprovedShortcutsNotificationShownCount, 0);
Yuta Hijikata31a359c2020-11-27 07:50:26884#endif // BUILDFLAG(IS_CHROMEOS_ASH)
Jan Wilken Dörriee4df0f92019-12-03 11:53:04885
Ben Schwartz135746c2020-05-14 04:37:03886 chrome_browser_net::secure_dns::RegisterProbesSettingBackupPref(registry);
wutao2e24aff2020-04-03 17:01:02887
Xiaohan Wangae7f9182022-01-16 00:37:52888#if !BUILDFLAG(IS_ANDROID)
Muyao Xubb2cb51ce2022-02-14 19:01:18889 registry->RegisterBooleanPref(kMediaRouterCloudServicesPrefSet, false);
890 registry->RegisterBooleanPref(kMediaRouterEnableCloudServices, false);
Julian Pastarmovfd2f83d2021-03-23 19:34:17891#endif
Daniel Cheng957b3242021-04-07 02:38:19892
Xiaohan Wangae7f9182022-01-16 00:37:52893#if !BUILDFLAG(IS_ANDROID)
Daniel Cheng957b3242021-04-07 02:38:19894 // Removed in M91.
895 registry->RegisterBooleanPref(prefs::kMediaFeedsBackgroundFetching, false);
896 registry->RegisterBooleanPref(prefs::kMediaFeedsSafeSearchEnabled, false);
897 registry->RegisterBooleanPref(prefs::kMediaFeedsAutoSelectEnabled, false);
George Benz7656f5e2022-05-09 20:09:03898
Daniel Cheng957b3242021-04-07 02:38:19899#endif
Sophie Changbb532c32021-04-07 17:40:04900
Xiaohan Wangae7f9182022-01-16 00:37:52901#if !BUILDFLAG(IS_ANDROID)
Reilly Grantbfc2ab72021-06-02 23:57:30902 registry->RegisterListPref(
903 prefs::kManagedProfileSerialAllowAllPortsForUrlsDeprecated);
904 registry->RegisterListPref(
905 prefs::kManagedProfileSerialAllowUsbDevicesForUrlsDeprecated);
906#endif
Tarun Bansal717824d2021-06-11 20:11:09907
Kevin Radtke766244c2021-11-23 02:20:45908 registry->RegisterBooleanPref(kWasPreviouslySetUpPrefName, false);
Simon Pelchat83b8a452021-12-07 15:49:39909
910 registry->RegisterDictionaryPref(kAvailabilityProberOriginCheck);
911 registry->RegisterDictionaryPref(kAvailabilityProberTLSCanaryCheck);
912 registry->RegisterDictionaryPref(kAvailabilityProberDNSCanaryCheck);
Aga Wronska5c15cec2021-12-10 16:21:32913
914#if BUILDFLAG(IS_CHROMEOS_ASH)
915 registry->RegisterStringPref(
916 kEduCoexistenceSecondaryAccountsInvalidationVersion, std::string());
Boris Sazonov4f61fe382021-12-13 19:05:30917
918 registry->RegisterBooleanPref(kSyncFirstRunCompleted, false);
Rachel Wongae7ad5d2021-12-14 01:57:27919
920 registry->RegisterDictionaryPref(kArcAppReinstallState);
Boris Sazonov6bc149b2021-12-29 11:02:58921
922 registry->RegisterBooleanPref(kOsSyncFeatureEnabled, false);
Aga Wronska5c15cec2021-12-10 16:21:32923#endif // BUILDFLAG(IS_CHROMEOS_ASH)
Andy Paicu5b05dd6d2021-12-28 17:40:07924
Xiaohan Wangae7f9182022-01-16 00:37:52925#if BUILDFLAG(IS_ANDROID)
Andy Paicu5b05dd6d2021-12-28 17:40:07926 registry->RegisterBooleanPref(kSearchGeolocationDisclosureDismissed, false);
927 registry->RegisterIntegerPref(kSearchGeolocationDisclosureShownCount, 0);
928 registry->RegisterInt64Pref(kSearchGeolocationDisclosureLastShowDate, 0);
929 registry->RegisterBooleanPref(kSearchGeolocationPreDisclosureMetricsRecorded,
930 false);
931 registry->RegisterBooleanPref(kSearchGeolocationPostDisclosureMetricsRecorded,
932 false);
933#endif
Tarun Bansal9a1dfe82022-01-11 21:02:20934
935 registry->RegisterBooleanPref(kHasSeenLiteModeInfoBar, false);
Tarun Bansal19172682022-01-27 01:26:24936 registry->RegisterInt64Pref(kDailyHttpContentLengthLastUpdateDate, 0L);
937 registry->RegisterListPref(kDailyHttpOriginalContentLength);
938 registry->RegisterListPref(kDailyHttpReceivedContentLength);
939 registry->RegisterBooleanPref(kDataUsageReportingEnabled, false);
940 registry->RegisterInt64Pref(kHttpReceivedContentLength, 0);
941 registry->RegisterInt64Pref(kHttpOriginalContentLength, 0);
942 registry->RegisterIntegerPref(kThisWeekNumber, 0);
943 registry->RegisterDictionaryPref(kThisWeekServicesDownstreamBackgroundKB,
944 PrefRegistry::LOSSY_PREF);
945 registry->RegisterDictionaryPref(kThisWeekServicesDownstreamForegroundKB,
946 PrefRegistry::LOSSY_PREF);
947 registry->RegisterDictionaryPref(kLastWeekServicesDownstreamBackgroundKB,
948 PrefRegistry::LOSSY_PREF);
949 registry->RegisterDictionaryPref(kLastWeekServicesDownstreamForegroundKB,
950 PrefRegistry::LOSSY_PREF);
951 registry->RegisterDictionaryPref(kThisWeekUserTrafficContentTypeDownstreamKB,
952 PrefRegistry::LOSSY_PREF);
953 registry->RegisterDictionaryPref(kLastWeekUserTrafficContentTypeDownstreamKB,
954 PrefRegistry::LOSSY_PREF);
Tarun Bansal556a5692022-02-01 18:56:24955 registry->RegisterBooleanPref(kDataSaverEnabled, false);
956 registry->RegisterBooleanPref(kDataReductionProxyWasEnabledBefore, false);
957 registry->RegisterInt64Pref(kDataReductionProxyLastEnabledTime, 0L);
Yao Xiao9255aec2022-02-05 00:02:19958
959 registry->RegisterUint64Pref(kFlocIdValuePrefKey, 0);
960 registry->RegisterIntegerPref(kFlocIdStatusPrefKey, 0);
961 registry->RegisterTimePref(kFlocIdHistoryBeginTimePrefKey, base::Time());
962 registry->RegisterTimePref(kFlocIdHistoryEndTimePrefKey, base::Time());
963 registry->RegisterUint64Pref(kFlocIdFinchConfigVersionPrefKey, 0);
964 registry->RegisterUint64Pref(kFlocIdSortingLshVersionPrefKey, 0);
965 registry->RegisterTimePref(kFlocIdComputeTimePrefKey, base::Time());
Matt Walliserc83a0ef42022-02-17 21:12:05966
967#if BUILDFLAG(IS_CHROMEOS_ASH)
968 registry->RegisterIntegerPref(kPhoneHubCameraRollPendingStatePrefName, 0);
969#endif // BUILDFLAG(IS_CHROMEOS_ASH)
Caroline Rising663480d2022-04-01 16:07:26970
971 registry->RegisterBooleanPref(kShowReadingListInBookmarkBar, true);
Anastasiia N7e9dd802022-04-21 20:52:20972
973#if BUILDFLAG(IS_CHROMEOS_ASH)
974 registry->RegisterIntegerPref(kAccountManagerNumTimesWelcomeScreenShown, 0);
975#endif // BUILDFLAG(IS_CHROMEOS_ASH)
Geng Li8e6265f2022-04-28 21:34:27976
977#if BUILDFLAG(IS_CHROMEOS_ASH)
978 registry->RegisterIntegerPref(kTimeOnOobe, 0);
979#endif // BUILDFLAG(IS_CHROMEOS_ASH)
Sophie Changd5246ca2022-04-29 20:13:54980
981 registry->RegisterBooleanPref(kOptimizationGuideRemoteFetchingEnabled, true);
George Benza2c5d6232022-05-06 23:35:44982
983#if !BUILDFLAG(IS_ANDROID)
984 registry->RegisterDictionaryPref(kAccessCodeCastDiscoveredNetworks);
985#endif // !BUILDFLAG(IS_ANDROID)
Mihai Sardarescub5b2c4a2022-05-23 14:55:40986
987#if !BUILDFLAG(IS_CHROMEOS_ASH)
988 registry->RegisterIntegerPref(kAccountIdMigrationState, 0);
989#endif // !BUILDFLAG(IS_CHROMEOS_ASH)
minch417d2ac2022-05-24 16:41:09990
991#if BUILDFLAG(IS_CHROMEOS_ASH)
992 registry->RegisterBooleanPref(kColorModeThemed, true);
993#endif // BUILDFLAG(IS_CHROMEOS_ASH)
Mihai Sardarescu3a27a8b2022-05-30 14:01:49994
995#if BUILDFLAG(ENABLE_DICE_SUPPORT)
996 registry->RegisterBooleanPref(kTokenServiceDiceCompatible, false);
997#endif // BUILDFLAG(ENABLE_DICE_SUPPORT)
Theodore Olsauskas-Warren0b852302022-06-28 12:05:07998
999 registry->RegisterBooleanPref(kPrivacySandboxPreferencesReconciled, false);
Min Qin2435d852022-06-29 22:38:311000
1001#if BUILDFLAG(IS_ANDROID)
1002 registry->RegisterIntegerPref(kDownloadLaterPromptStatus, 0);
1003#endif // BUILDFLAG(IS_ANDROID)
Mariam Ali784166e2022-07-05 16:03:181004
Martin Kreichgauerc86cc652022-10-28 16:52:041005 // Deprecated 06/2022
1006#if BUILDFLAG(ENABLE_EXTENSIONS)
1007 registry->RegisterBooleanPref(kU2fSecurityKeyApiEnabled, false);
1008#endif
1009
Mariam Ali784166e2022-07-05 16:03:181010 // Deprecated 07/2022
1011 registry->RegisterBooleanPref(kPrivacySandboxFlocEnabled, true);
1012 registry->RegisterBooleanPref(kPrivacySandboxFlocDataAccessibleSince, false);
sauskiad03aa42022-07-12 10:38:181013 registry->RegisterBooleanPref(kPrivacySandboxApisEnabledV2Init, false);
JunHo Seo1f0506f22022-07-26 02:52:251014
1015#if BUILDFLAG(ENABLE_EXTENSIONS)
1016 // Deprecated 07/2022
1017 registry->RegisterListPref(kExtensionToolbar);
1018#endif
dpapad8ad510132022-07-29 18:21:071019
1020#if BUILDFLAG(IS_CHROMEOS_ASH)
1021 registry->RegisterBooleanPref(kSettingsShowOSBanner, false);
1022#endif // BUILDFLAG(IS_CHROMEOS_ASH)
Maksim Ivanov5705be32022-08-09 22:07:481023
1024#if BUILDFLAG(IS_CHROMEOS_ASH)
1025 // Deprecated 08/2022
1026 registry->RegisterBooleanPref(kSecurityTokenSessionNotificationDisplayed,
1027 false);
1028#endif // BUILDFLAG(IS_CHROMEOS_ASH)
Ryan Sultanemb3b422e2022-08-12 12:13:021029
1030#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH)
1031 // Deprecated 08/2022.
1032 registry->RegisterIntegerPref(kProfileAvatarTutorialShown, 0);
1033#endif
Tom Andersoncb3408482022-09-02 19:06:411034
1035#if BUILDFLAG(IS_LINUX)
1036 // Deprecated 08/2022.
1037 registry->RegisterBooleanPref(prefs::kUsesSystemThemeDeprecated, false);
1038#endif
Theodore Olsauskas-Warren221e3ecd2022-09-08 08:21:241039
1040 // Deprecated 09/2022
1041 registry->RegisterBooleanPref(kPrivacySandboxFirstPartySetsDataAccessAllowed,
1042 true);
Colin Kincaidf11f8562022-09-14 15:41:061043
1044#if BUILDFLAG(IS_CHROMEOS_ASH)
1045 registry->RegisterIntegerPref(kClipboardHistoryNewFeatureBadgeCount, 0);
1046#endif // BUILDFLAG(IS_CHROMEOS_ASH)
Kirubel Aklilud8f571c92022-09-22 16:37:441047
1048 // Deprecated 09/2022.
1049 registry->RegisterBooleanPref(kFirstPartySetsEnabled, true);
Martin Kreichgauerc86cc652022-10-28 16:52:041050
1051#if BUILDFLAG(ENABLE_EXTENSIONS)
1052 // Deprecated 10/2022.
1053 registry->RegisterBooleanPref(kLoadCryptoTokenExtension, false);
1054#endif
Yulun Wu066dab712022-11-01 17:20:241055
1056// Deprecated 10/2022.
1057#if BUILDFLAG(IS_CHROMEOS_ASH)
1058 registry->RegisterIntegerPref(kSuggestedContentInfoShownInLauncher, 0);
1059 registry->RegisterBooleanPref(kSuggestedContentInfoDismissedInLauncher,
1060 false);
1061#endif // BUILDFLAG(IS_CHROMEOS_ASH)
Jan Keitel4707c1f2022-11-30 11:08:591062
1063 // Deprecated 11/2022.
1064 registry->RegisterBooleanPref(kAutofillAssistantEnabled, true);
1065 registry->RegisterBooleanPref(kAutofillAssistantConsent, false);
1066 registry->RegisterBooleanPref(kAutofillAssistantTriggerScriptsEnabled, true);
1067 registry->RegisterBooleanPref(kAutofillAssistantTriggerScriptsIsFirstTimeUser,
1068 true);
James Cook0ba192bf2017-12-01 20:53:111069}
1070
[email protected]572f40c9b2012-07-06 20:35:331071} // namespace
1072
[email protected]4082306d92013-02-21 14:51:011073void RegisterLocalState(PrefRegistrySimple* registry) {
Chris Hamilton65c41312020-06-10 13:14:401074 // Call outs to individual subsystems that register Local State (browser-wide)
1075 // prefs en masse. See RegisterProfilePrefs for per-profile prefs. Please
1076 // keep this list alphabetized.
[email protected]b1de2c72013-02-06 02:45:471077 browser_shutdown::RegisterPrefs(registry);
[email protected]b1de2c72013-02-06 02:45:471078 BrowserProcessImpl::RegisterPrefs(registry);
Chris Palmerac7d75642017-11-22 20:12:541079 ChromeContentBrowserClient::RegisterLocalStatePrefs(registry);
Elaine Chienf8d13692021-07-26 23:05:561080#if !BUILDFLAG(IS_CHROMEOS_ASH)
1081 chrome_labs_prefs::RegisterLocalStatePrefs(registry);
1082#endif
[email protected]4a55a712014-06-08 16:50:341083 ChromeMetricsServiceClient::RegisterPrefs(registry);
Dominique Fauteux-Chapleau0e897db02021-04-19 18:42:221084 chrome::enterprise_util::RegisterLocalStatePrefs(registry);
sorinebcfc8dd2016-08-12 21:57:181085 component_updater::RegisterPrefs(registry);
Mugdha Lakhanida851fd2021-03-16 18:21:021086 embedder_support::OriginTrialPrefs::RegisterPrefs(registry);
Og Astorga3089fd82021-09-21 00:02:371087 enterprise_reporting::RegisterLocalStatePrefs(registry);
[email protected]b1de2c72013-02-06 02:45:471088 ExternalProtocolHandler::RegisterPrefs(registry);
sdefresne8593e6432015-12-01 12:38:081089 flags_ui::PrefServiceFlagsStorage::RegisterPrefs(registry);
[email protected]e6933d2a2013-03-12 22:32:211090 GpuModeManager::RegisterPrefs(registry);
Miyoung Shin23737f62019-07-23 15:43:311091 signin::IdentityManager::RegisterLocalStatePrefs(registry);
Anthony Vallee-Dubois43fded9702020-06-19 16:30:381092 invalidation::FCMInvalidationService::RegisterPrefs(registry);
Maksim Moskvitinf5f5f736c2021-01-12 12:13:281093 invalidation::InvalidatorRegistrarWithMemory::RegisterPrefs(registry);
1094 invalidation::PerUserTopicSubscriptionManager::RegisterPrefs(registry);
Anthony Vallee-Dubois6f993122018-09-17 16:13:281095 language::GeoLanguageProvider::RegisterLocalStatePrefs(registry);
Alexandre Frechette38f4ef92019-02-25 16:31:571096 language::UlpLanguageCodeLocator::RegisterLocalStatePrefs(registry);
Sebastien Marchand5a63997a2019-09-27 19:15:341097 memory::EnterpriseMemoryLimitPrefObserver::RegisterPrefs(registry);
Roger McFarlane1c1147ae2022-11-07 17:25:171098 metrics::RegisterDemographicsLocalStatePrefs(registry);
[email protected]d0ab865b2014-06-04 19:41:341099 network_time::NetworkTimeTracker::RegisterPrefs(registry);
rajendrant5fb61c52022-11-21 19:42:551100 optimization_guide::prefs::RegisterLocalStatePrefs(registry);
Tonko Sabolčec6f271d32018-08-17 14:35:471101 password_manager::PasswordManager::RegisterLocalPrefs(registry);
Lei Zhang92c15542020-01-10 17:05:101102 policy::BrowserPolicyConnector::RegisterPrefs(registry);
Yann Dago9c1e19512022-02-28 22:27:311103 policy::ManagementService::RegisterLocalStatePrefs(registry);
Lei Zhang92c15542020-01-10 17:05:101104 policy::PolicyStatisticsCollector::RegisterPrefs(registry);
[email protected]b1de2c72013-02-06 02:45:471105 PrefProxyConfigTrackerImpl::RegisterPrefs(registry);
Thomas Tanglc67ace42019-06-07 19:31:501106 ProfileAttributesEntry::RegisterLocalStatePrefs(registry);
Alex Ilinbb08a0d2021-07-08 09:37:241107 ProfileAttributesStorage::RegisterPrefs(registry);
Nick Harper030046f2019-09-05 23:36:091108 ProfileNetworkContextService::RegisterLocalStatePrefs(registry);
[email protected]de71ae992013-07-18 03:30:381109 profiles::RegisterPrefs(registry);
Illia Klimov4b72378ed2022-07-18 13:46:571110#if BUILDFLAG(IS_ANDROID)
1111 PushMessagingServiceImpl::RegisterPrefs(registry);
1112#endif
[email protected]ceafc462013-11-04 12:26:031113 RegisterScreenshotPrefs(registry);
Luke Zielinski63784cd2018-05-22 14:08:161114 safe_browsing::RegisterLocalStatePrefs(registry);
Ayu Ishiifbb1fad2020-06-22 20:15:071115 secure_origin_allowlist::RegisterPrefs(registry);
Min Qinc4012282022-04-15 16:53:581116 segmentation_platform::SegmentationPlatformService::RegisterLocalStatePrefs(
1117 registry);
Xiaohan Wangae7f9182022-01-16 00:37:521118#if !BUILDFLAG(IS_ANDROID)
Reilly Grantbfc2ab72021-06-02 23:57:301119 SerialPolicyAllowedPorts::RegisterPrefs(registry);
Matt Reynolds1914ff6b2022-02-04 08:48:261120 HidPolicyAllowedDevices::RegisterLocalStatePrefs(registry);
Reilly Grantbfc2ab72021-06-02 23:57:301121#endif
Mikel Astizf61f4ba02018-06-01 10:50:191122 sessions::SessionIdGenerator::RegisterPrefs(registry);
Ryan Sleevi4689ad32018-04-16 19:09:051123 SSLConfigServiceManager::RegisterPrefs(registry);
Michael Giuffridab41fa5c42017-11-13 23:30:571124 subresource_filter::IndexedRulesetVersion::RegisterPrefs(registry);
Matt Menke4dfb375c2018-06-13 18:06:311125 SystemNetworkContextManager::RegisterPrefs(registry);
Oksana Zhuravlova58c85282022-06-14 20:24:281126 tracing::RegisterPrefs(registry);
wafflesd2d9a332016-04-09 01:59:571127 update_client::RegisterPrefs(registry);
Michael Giuffridab41fa5c42017-11-13 23:30:571128 variations::VariationsService::RegisterPrefs(registry);
[email protected]cc36c2c2012-03-01 00:57:341129
Chris Hamilton65c41312020-06-10 13:14:401130 // Individual preferences. If you have multiple preferences that should
1131 // clearly be grouped together, please group them together into a helper
1132 // function called above. Please keep this list alphabetized.
1133 registry->RegisterBooleanPref(
1134 policy::policy_prefs::kIntensiveWakeUpThrottlingEnabled, false);
Aaron Tagliaboschi8f3a28302020-06-24 03:08:261135 registry->RegisterBooleanPref(
Matt Reichhoff2f190122021-11-02 19:28:191136 policy::policy_prefs::kUserAgentClientHintsGREASEUpdateEnabled, true);
Xiaohan Wangae7f9182022-01-16 00:37:521137#if BUILDFLAG(IS_ANDROID)
Rakina Zata Amnic123bd22020-07-31 19:08:391138 registry->RegisterBooleanPref(policy::policy_prefs::kBackForwardCacheEnabled,
1139 true);
Xiaohan Wangae7f9182022-01-16 00:37:521140#endif // BUILDFLAG(IS_ANDROID)
Chris Hamilton65c41312020-06-10 13:14:401141
1142 // Below this point is for platform-specific and compile-time conditional
1143 // calls. Please follow the helper-function-first-then-direct-calls pattern
1144 // established above, and keep things alphabetized.
1145
Denis Kuznetsov32099f32017-12-15 14:04:571146#if BUILDFLAG(ENABLE_BACKGROUND_MODE)
Michael Giuffridab41fa5c42017-11-13 23:30:571147 BackgroundModeManager::RegisterPrefs(registry);
1148#endif
1149
Xiaohan Wangae7f9182022-01-16 00:37:521150#if BUILDFLAG(IS_ANDROID)
Mark Pearsonee17df912017-04-27 21:51:041151 ::android::RegisterPrefs(registry);
Sky Maliced8eb4302020-08-03 05:46:441152
Sky Malicef7dd9422020-10-26 22:12:401153 registry->RegisterIntegerPref(first_run::kTosDialogBehavior, 0);
Yu Su4d459862021-04-15 04:19:541154 registry->RegisterBooleanPref(lens::kLensCameraAssistedSearchEnabled, true);
Xiaohan Wangae7f9182022-01-16 00:37:521155#else // BUILDFLAG(IS_ANDROID)
johnme627dc8c72016-08-19 21:49:391156 gcm::RegisterPrefs(registry);
Tommy Lid5b7c22b2020-10-28 01:26:511157 IntranetRedirectDetector::RegisterPrefs(registry);
Lei Zhang92c15542020-01-10 17:05:101158 media_router::RegisterLocalStatePrefs(registry);
Michael Giuffridab41fa5c42017-11-13 23:30:571159 metrics::TabStatsTracker::RegisterPrefs(registry);
Anthony Vallee-Dubois2b822262022-04-25 19:31:441160 performance_manager::user_tuning::prefs::RegisterLocalStatePrefs(registry);
Michael Giuffridab41fa5c42017-11-13 23:30:571161 RegisterBrowserPrefs(registry);
Amanda Deacon9535c972021-04-29 04:26:511162 speech::SodaInstaller::RegisterLocalStatePrefs(registry);
Michael Giuffridab41fa5c42017-11-13 23:30:571163 StartupBrowserCreator::RegisterLocalStatePrefs(registry);
1164 task_manager::TaskManagerInterface::RegisterPrefs(registry);
thestigd75ce5532015-10-05 22:08:341165 UpgradeDetector::RegisterPrefs(registry);
rbpotter73c13252021-07-16 21:29:341166 WhatsNewUI::RegisterLocalStatePrefs(registry);
Xiaohan Wangae7f9182022-01-16 00:37:521167#endif // BUILDFLAG(IS_ANDROID)
[email protected]3954f332012-02-25 02:51:541168
Nicolas Dossou-Gbete7ccc8802022-11-10 15:12:461169#if BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(ENABLE_DICE_SUPPORT)
1170 FirstRunService::RegisterLocalStatePrefs(registry);
Nicolas Dossou-Gbete2804a372022-11-09 17:25:351171#endif
1172
Yuta Hijikata31a359c2020-11-27 07:50:261173#if BUILDFLAG(IS_CHROMEOS_ASH)
Shao-Chuan Lee85a46992019-03-05 04:46:151174 arc::prefs::RegisterLocalStatePrefs(registry);
[email protected]8304f61a2014-05-24 12:17:331175 ChromeOSMetricsProvider::RegisterPrefs(registry);
Henrique Ferreiro7a4401aa2022-11-11 21:37:331176 ash::ArcKioskAppManager::RegisterPrefs(registry);
Henrique Ferreiro3d9d93d2021-02-19 22:17:391177 ash::AudioDevicesPrefHandlerImpl::RegisterPrefs(registry);
Yeunjoo Choicd4cc5382021-03-25 08:50:491178 ash::cert_provisioning::RegisterLocalStatePrefs(registry);
Yeunjoo Choi6c99c4d2022-08-08 03:11:111179 ash::CellularESimProfileHandlerImpl::RegisterLocalStatePrefs(registry);
1180 ash::ManagedCellularPrefHandler::RegisterLocalStatePrefs(registry);
Henrique Ferreirocddc8012021-03-26 00:47:151181 ash::ChromeUserManagerImpl::RegisterPrefs(registry);
Yuta Hijikata82c304ff2021-04-30 19:24:571182 crosapi::browser_util::RegisterLocalStatePrefs(registry);
Yeunjoo Choi47a6a142022-02-11 02:35:231183 ash::CupsPrintersManager::RegisterLocalStatePrefs(registry);
Yuta Hijikata368cc4b92021-12-23 07:39:101184 ash::BrowserDataMigratorImpl::RegisterLocalStatePrefs(registry);
Henrique Ferreirobbaee882022-09-08 07:15:551185 ash::bluetooth_config::BluetoothPowerControllerImpl::RegisterLocalStatePrefs(
1186 registry);
1187 ash::bluetooth_config::DeviceNameManagerImpl::RegisterLocalStatePrefs(
Gordon Setob2b7c7bc2021-10-12 17:42:551188 registry);
Henrique Ferreirod71de902021-05-10 18:57:111189 ash::DemoModeResourcesRemover::RegisterLocalStatePrefs(registry);
1190 ash::DemoSession::RegisterLocalStatePrefs(registry);
1191 ash::DemoSetupController::RegisterLocalStatePrefs(registry);
Henrique Ferreiro7967dce2021-09-23 11:37:471192 ash::DeviceNameStore::RegisterLocalStatePrefs(registry);
Anthony Vallee-Dubois85edf222020-03-24 20:30:021193 chromeos::DeviceOAuth2TokenStoreChromeOS::RegisterPrefs(registry);
Yeunjoo Choid461f872021-03-11 06:52:191194 ash::device_settings_cache::RegisterPrefs(registry);
Henrique Ferreirobeea3d32021-05-11 15:58:541195 ash::EasyUnlockService::RegisterPrefs(registry);
Henrique Ferreirod1c3fe72021-05-14 13:26:151196 ash::EnableAdbSideloadingScreen::RegisterPrefs(registry);
Hirthanan Subenderan7f6ce5f2021-09-22 23:32:051197 ash::device_activity::DeviceActivityController::RegisterPrefs(registry);
Yeunjoo Choif3fe34c2022-11-04 02:02:301198 ash::EnableDebuggingScreenHandler::RegisterPrefs(registry);
Yeunjoo Choid0b242f2022-07-28 02:23:021199 ash::FastTransitionObserver::RegisterPrefs(registry);
Danila Kuzmin90a42f02021-12-08 14:00:161200 ash::HWDataUsageController::RegisterLocalStatePrefs(registry);
Yeunjoo Choi4530b1792021-05-10 02:32:271201 ash::KerberosCredentialsManager::RegisterLocalStatePrefs(registry);
Irina Fedorova13745422022-07-15 12:59:001202 ash::KioskAppManager::RegisterLocalStatePrefs(registry);
Henrique Ferreiro26ed25a2021-02-01 21:59:291203 ash::KioskCryptohomeRemover::RegisterPrefs(registry);
Henrique Ferreirodef18c22021-11-04 19:36:001204 ash::language_prefs::RegisterPrefs(registry);
Henrique Ferreiro234c7dff2022-09-08 02:44:541205 ash::local_search_service::SearchMetricsReporter::RegisterLocalStatePrefs(
1206 registry);
Henrique Ferreirob403be32021-09-22 07:15:361207 ash::login::SecurityTokenSessionController::RegisterLocalStatePrefs(registry);
Ahmed Nasrbe0670b72022-03-09 23:28:171208 ash::reporting::LoginLogoutReporter::RegisterPrefs(registry);
Henrique Ferreirocddc8012021-03-26 00:47:151209 ash::MultiProfileUserController::RegisterPrefs(registry);
Yeunjoo Choi6c99c4d2022-08-08 03:11:111210 ash::NetworkMetadataStore::RegisterPrefs(registry);
Henrique Ferreiroe2cbaaf2022-01-10 15:02:231211 ash::NetworkThrottlingObserver::RegisterPrefs(registry);
Yeunjoo Choic2000932021-06-10 01:54:081212 ash::PowerMetricsReporter::RegisterLocalStatePrefs(registry);
Henrique Ferreiroa8763b62021-10-13 18:37:531213 ash::platform_keys::KeyPermissionsManagerImpl::RegisterLocalStatePrefs(
Omar Morsi4febb4d2020-10-30 07:55:211214 registry);
Yeunjoo Choif3c7e402021-06-04 04:28:561215 ash::power::auto_screen_brightness::MetricsReporter::RegisterLocalStatePrefs(
1216 registry);
Henrique Ferreiro4b21d142021-11-10 11:47:371217 ash::Preferences::RegisterPrefs(registry);
Henrique Ferreirod1c3fe72021-05-14 13:26:151218 ash::ResetScreen::RegisterPrefs(registry);
Henrique Ferreiro4b21d142021-11-10 11:47:371219 ash::SchedulerConfigurationManager::RegisterLocalStatePrefs(registry);
Yeunjoo Choicf61fba2021-04-23 02:43:091220 ash::ServicesCustomizationDocument::RegisterPrefs(registry);
Henrique Ferreirob403be32021-09-22 07:15:361221 ash::StartupUtils::RegisterPrefs(registry);
Yeunjoo Choid461f872021-03-11 06:52:191222 ash::StatsReportingController::RegisterLocalStatePrefs(registry);
Yeunjoo Choi03b09c62021-02-18 21:40:051223 ash::system::AutomaticRebootManager::RegisterPrefs(registry);
Yeunjoo Choi953a4c32021-10-15 05:20:441224 ash::TimeZoneResolver::RegisterPrefs(registry);
Henrique Ferreirocddc8012021-03-26 00:47:151225 ash::UserImageManager::RegisterPrefs(registry);
Henrique Ferreirod70b5c22021-04-30 10:55:271226 ash::UserSessionManager::RegisterPrefs(registry);
Henrique Ferreiro26ed25a2021-02-01 21:59:291227 ash::WebKioskAppManager::RegisterPrefs(registry);
Xiaochu Liu48ab5932018-05-11 03:44:041228 component_updater::MetadataTable::RegisterPrefs(registry);
Henrique Ferreirob902d6c2021-10-14 19:55:441229 ash::CryptAuthDeviceIdProviderImpl::RegisterLocalPrefs(registry);
[email protected]5a145e82014-05-29 22:19:071230 extensions::ExtensionAssetsManagerChromeOS::RegisterPrefs(registry);
Aya ElAttarb4f7a5f2020-03-05 00:47:241231 extensions::ExtensionsPermissionsTracker::RegisterLocalStatePrefs(registry);
tbarzicd9a88fc92017-07-14 02:18:101232 extensions::lock_screen_data::LockScreenItemStorage::RegisterLocalState(
1233 registry);
Jit Yao Yap8e247322019-06-24 16:56:591234 extensions::login_api::RegisterLocalStatePrefs(registry);
stevenjbf22f82e2016-10-26 21:47:381235 ::onc::RegisterPrefs(registry);
Felipe Andrade8f81c5f2021-11-09 00:44:021236 policy::ActiveDirectoryDeviceStateUploader::RegisterLocalStatePrefs(registry);
Felipe Andrade5cb496c52022-01-18 19:13:281237 policy::ActiveDirectoryMigrationManager::RegisterLocalStatePrefs(registry);
Jana Grill784b1e52020-06-26 18:22:121238 policy::AdbSideloadingAllowanceModePolicyHandler::RegisterPrefs(registry);
Pavol Marko35bcf1a2018-05-23 15:33:071239 policy::AutoEnrollmentClientImpl::RegisterPrefs(registry);
Yeunjoo Choi7227dba2021-08-04 06:35:471240 policy::BrowserPolicyConnectorAsh::RegisterPrefs(registry);
Yeunjoo Choiead8b3c2021-07-27 08:08:191241 policy::DeviceCloudPolicyManagerAsh::RegisterPrefs(registry);
[email protected]b1de2c72013-02-06 02:45:471242 policy::DeviceStatusCollector::RegisterPrefs(registry);
Nikita Podguzov72c21f02019-06-17 14:48:411243 policy::DeviceWallpaperImageExternalDataHandler::RegisterPrefs(registry);
rsorokin3c13ece2017-01-16 15:58:411244 policy::DMTokenStorage::RegisterPrefs(registry);
Sergey Poromovd6575a0b2020-05-19 21:41:091245 policy::EnrollmentRequisitionManager::RegisterPrefs(registry);
Saurabh Nijhara839c17c2020-05-19 00:18:291246 policy::MinimumVersionPolicyHandler::RegisterPrefs(registry);
Anatoliy Potapchuka460bc12021-11-05 19:23:101247 policy::EuiccStatusUploader::RegisterLocalStatePrefs(registry);
Andreea Costinasc4b76ff2019-04-11 15:52:131248 policy::TPMAutoUpdateModePolicyHandler::RegisterPrefs(registry);
glevin5dd01a72016-03-23 23:08:121249 quirks::QuirksManager::RegisterPrefs(registry);
Roman Aleksandrovd32e34e72019-05-22 17:29:501250 UpgradeDetectorChromeos::RegisterPrefs(registry);
James Hawkins225001cf2020-09-18 16:04:341251 RegisterNearbySharingLocalPrefs(registry);
Yuta Hijikata31a359c2020-11-27 07:50:261252#endif // BUILDFLAG(IS_CHROMEOS_ASH)
[email protected]b6366ffa2012-02-29 17:12:261253
Xiaohan Wangae7f9182022-01-16 00:37:521254#if BUILDFLAG(IS_CHROMEOS)
Erik Chen643355d2022-04-22 05:44:491255 chromeos::echo_offer::RegisterPrefs(registry);
Kuo-Hsin Yang40227972022-05-16 18:39:091256 memory::OOMKillsMonitor::RegisterPrefs(registry);
Ben Franz73537362021-11-08 11:53:401257 policy::SystemFeaturesDisableListPolicyHandler::RegisterPrefs(registry);
Alvin Lee99f8d9a82021-11-18 18:45:551258 policy::DlpRulesManagerImpl::RegisterPrefs(registry);
Xiaohan Wangae7f9182022-01-16 00:37:521259#endif // BUILDFLAG(IS_CHROMEOS)
Ben Franz73537362021-11-08 11:53:401260
Xiaohan Wangae7f9182022-01-16 00:37:521261#if BUILDFLAG(IS_MAC)
[email protected]b1de2c72013-02-06 02:45:471262 confirm_quit::RegisterLocalState(registry);
[email protected]425f7a02014-04-29 01:51:441263 QuitWithAppsController::RegisterPrefs(registry);
Hamda19bb3c82022-07-15 18:27:381264 enterprise_connectors::RegisterLocalPrefs(registry);
Henrik Grunelle11045a2019-04-12 09:27:271265 system_media_permissions::RegisterSystemMediaPermissionStatesPrefs(registry);
Christopher Cameron81f442e2019-11-14 06:50:141266 AppShimRegistry::Get()->RegisterLocalPrefs(registry);
[email protected]b6366ffa2012-02-29 17:12:261267#endif
[email protected]bdb8a1e2013-10-03 08:14:001268
Erik Chen38ceca082020-12-16 01:31:351269#if BUILDFLAG(IS_CHROMEOS_LACROS)
Alex Ilin953f1092021-11-26 15:49:101270 AccountCache::RegisterLocalStatePrefs(registry);
Erik Chen38ceca082020-12-16 01:31:351271 lacros_prefs::RegisterLocalStatePrefs(registry);
Polina Bondarenko3f3dc4f2022-04-25 07:55:011272 KioskSessionServiceLacros::RegisterLocalStatePrefs(registry);
Erik Chen38ceca082020-12-16 01:31:351273#endif
1274
Xiaohan Wangae7f9182022-01-16 00:37:521275#if BUILDFLAG(IS_WIN)
Will Harris265b3942019-10-21 01:01:331276 OSCrypt::RegisterLocalPrefs(registry);
Will Harris956e0ca2019-08-23 20:47:391277 registry->RegisterBooleanPref(prefs::kRendererCodeIntegrityEnabled, true);
Will Harrisf09e40d2022-06-02 21:15:401278 registry->RegisterBooleanPref(prefs::kRendererAppContainerEnabled, true);
Stefan Smolenfd3965b2021-08-17 19:27:181279 registry->RegisterBooleanPref(prefs::kBlockBrowserLegacyExtensionPoints,
1280 true);
David Bienvenu554a259c2020-02-13 20:20:541281 registry->RegisterBooleanPref(
1282 policy::policy_prefs::kNativeWindowOcclusionEnabled, true);
[email protected]c5d4b1842014-06-20 21:19:501283 component_updater::RegisterPrefsForSwReporter(registry);
Rainhard Findling4d621ca2020-10-26 20:46:061284 safe_browsing::RegisterChromeCleanerScanCompletionTimePref(registry);
Xiaohan Wang259f34c7a2022-03-26 23:18:191285 MediaFoundationServiceMonitor::RegisterPrefs(registry);
Will Harriseb364b2c2022-06-23 00:49:011286 os_crypt::RegisterLocalStatePrefs(registry);
Nico Webereaa08412019-08-14 01:24:371287#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
Patrick Monettef8fd8b22018-05-10 20:58:041288 IncompatibleApplicationsUpdater::RegisterLocalStatePrefs(registry);
Patrick Monette6b7c475b2018-06-12 14:58:081289 ModuleDatabase::RegisterLocalStatePrefs(registry);
Patrick Monettee31f63e22018-06-06 00:10:341290 ThirdPartyConflictsManager::RegisterLocalStatePrefs(registry);
Nico Webereaa08412019-08-14 01:24:371291#endif // BUILDFLAG(GOOGLE_CHROME_BRANDING)
Xiaohan Wangae7f9182022-01-16 00:37:521292#endif // BUILDFLAG(IS_WIN)
[email protected]ceafc462013-11-04 12:26:031293
Zonghan Xuc528f6e82022-08-09 22:31:581294#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
Lu Huang3663f0a2021-03-04 18:47:081295 web_app::url_handler_prefs::RegisterLocalStatePrefs(registry);
Zonghan Xuc528f6e82022-08-09 22:31:581296#endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
Lu Huangcd11f21c2021-02-03 22:24:561297
Xiaohan Wangae7f9182022-01-16 00:37:521298#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH)
Lei Zhang92c15542020-01-10 17:05:101299 RegisterDefaultBrowserPromptPrefs(registry);
Yann Dago0d896f62020-02-04 19:59:151300 downgrade::RegisterPrefs(registry);
Anthony Vallee-Dubois85edf222020-03-24 20:30:021301 DeviceOAuth2TokenStoreDesktop::RegisterPrefs(registry);
Lei Zhang92c15542020-01-10 17:05:101302#endif
1303
Ramin Halavati52a9a292022-04-28 04:27:491304#if BUILDFLAG(ENABLE_SCREEN_AI_SERVICE)
Ramin Halavati69bf7752022-04-04 09:58:151305 screen_ai::RegisterLocalStatePrefs(registry);
Ramin Halavati52a9a292022-04-28 04:27:491306#endif // BUILDFLAG(ENABLE_SCREEN_AI_SERVICE)
Ramin Halavati69bf7752022-04-04 09:58:151307
Chris Hamilton65c41312020-06-10 13:14:401308 // This is intentionally last.
Lei Zhangb76b80e32020-04-08 16:58:161309 RegisterLocalStatePrefsForMigration(registry);
[email protected]9acc48602009-11-30 21:18:511310}
initial.commit09911bf2008-07-26 23:55:291311
[email protected]37ca3fe02013-07-05 15:32:441312// Register prefs applicable to all profiles.
Xi Han25a7f032019-04-18 21:44:211313void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
1314 const std::string& locale) {
rkaplow058da3132015-02-19 18:18:381315 TRACE_EVENT0("browser", "chrome::RegisterProfilePrefs");
[email protected]2a5f29632012-11-26 17:17:551316 // User prefs. Please keep this list alphabetized.
Dominic Mazzoni21fb0282019-02-13 18:32:471317 AccessibilityLabelsService::RegisterProfilePrefs(registry);
James Wallace-Lee25a1b05e2018-07-24 00:06:311318 AccessibilityUIMessageHandler::RegisterProfilePrefs(registry);
Xing Liu7252b8d2020-01-22 22:12:471319 AnnouncementNotificationService::RegisterProfilePrefs(registry);
Moe Ahmadi173b0a2b2018-08-03 17:35:511320 autofill::prefs::RegisterProfilePrefs(registry);
Bernhard Bauer19190732017-09-28 09:03:331321 browsing_data::prefs::RegisterBrowserUserPrefs(registry);
Doug Turner9e79cf0c2018-04-05 21:32:301322 certificate_transparency::prefs::RegisterPrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:441323 ChromeContentBrowserClient::RegisterProfilePrefs(registry);
Elaine Chien07f137d2021-01-14 02:57:211324 chrome_labs_prefs::RegisterProfilePrefs(registry);
Livvie Lin9141d0f132020-03-23 22:47:041325 ChromeLocationBarModelDelegate::RegisterProfilePrefs(registry);
Colin Blundell7657b402020-02-25 09:46:501326 StatefulSSLHostStateDelegate::RegisterProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:441327 ChromeVersionService::RegisterProfilePrefs(registry);
Eric Secklera5c24e12018-11-28 16:09:201328 chrome_browser_net::NetErrorTabHelper::RegisterProfilePrefs(registry);
[email protected]06690dc2014-03-07 08:44:001329 chrome_prefs::RegisterProfilePrefs(registry);
Matt Jones704e1a62022-09-20 16:28:241330 commerce::RegisterPrefs(registry);
Travis Skare27cee15c2018-07-19 14:34:131331 DocumentProvider::RegisterProfilePrefs(registry);
hmaree31cadf52022-11-09 22:32:551332 enterprise::RegisterIdentifiersProfilePrefs(registry);
Owen Min9867b162022-01-20 21:39:071333 enterprise_reporting::RegisterProfilePrefs(registry);
Katie D1ca4328b2020-02-19 18:08:471334 dom_distiller::DistilledPagePrefs::RegisterProfilePrefs(registry);
1335 dom_distiller::RegisterProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:441336 DownloadPrefs::RegisterProfilePrefs(registry);
Moe Ahmadi656dd532021-10-06 21:59:181337 history_clusters::prefs::RegisterProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:441338 HostContentSettingsMap::RegisterProfilePrefs(registry);
Brandon Wylie6961a2e2018-09-19 23:03:371339 image_fetcher::ImageCache::RegisterProfilePrefs(registry);
Evan Stade7a984802020-12-14 19:10:151340 site_engagement::ImportantSitesUtil::RegisterProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:441341 IncognitoModePrefs::RegisterProfilePrefs(registry);
Maksim Moskvitinf5f5f736c2021-01-12 12:13:281342 invalidation::PerUserTopicSubscriptionManager::RegisterProfilePrefs(registry);
1343 invalidation::InvalidatorRegistrarWithMemory::RegisterProfilePrefs(registry);
Alexandre Frechette37edd93a2019-03-19 15:57:201344 language::LanguagePrefs::RegisterProfilePrefs(registry);
rajendrantff2361da2020-12-16 09:18:271345 login_detection::prefs::RegisterProfilePrefs(registry);
Joe DeBlasio59db500b2020-08-21 00:37:351346 lookalikes::RegisterProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:441347 MediaCaptureDevicesDispatcher::RegisterProfilePrefs(registry);
[email protected]cd80cce2013-12-02 15:19:191348 MediaDeviceIDSalt::RegisterProfilePrefs(registry);
Becca Hughes6354b6b2017-08-31 22:01:551349 MediaEngagementService::RegisterProfilePrefs(registry);
John Rummelle5621c12017-09-05 23:52:101350 MediaStorageIdSalt::RegisterProfilePrefs(registry);
Mikel Astizf4226912020-10-19 19:10:371351 metrics::RegisterDemographicsProfilePrefs(registry);
Tom Anderson1ef51d032020-02-11 01:05:081352 NotificationDisplayServiceImpl::RegisterProfilePrefs(registry);
brettw1f92eed2016-12-07 01:12:581353 NotifierStateTracker::RegisterProfilePrefs(registry);
treibbb0c5af52016-12-09 17:34:151354 ntp_tiles::MostVisitedSites::RegisterProfilePrefs(registry);
Sophie Chang5ff4b942019-05-23 20:04:321355 optimization_guide::prefs::RegisterProfilePrefs(registry);
Peter Birk Pakkenberg73e07b62022-09-21 11:20:301356 origin_trials::PrefServicePersistenceProvider::RegisterProfilePrefs(registry);
[email protected]a8564212014-04-09 16:16:511357 password_manager::PasswordManager::RegisterProfilePrefs(registry);
anthonyvd6a43b932017-05-11 18:39:271358 payments::RegisterProfilePrefs(registry);
Anthony Vallee-Duboiscee55b12022-03-24 22:54:021359 performance_manager::user_tuning::prefs::RegisterProfilePrefs(registry);
Ravjit0dc264742021-10-15 11:09:351360 permissions::PermissionActionsHistory::RegisterProfilePrefs(registry);
Evan Stade32d635a2020-04-03 18:51:251361 PermissionBubbleMediaAccessHandler::RegisterProfilePrefs(registry);
Sharon Yangc6706902018-07-16 13:06:191362 PlatformNotificationServiceImpl::RegisterProfilePrefs(registry);
Aaron Colwellf94fd97a2020-07-21 19:37:081363 policy::URLBlocklistManager::RegisterProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:441364 PrefProxyConfigTrackerImpl::RegisterProfilePrefs(registry);
Simon Pelchate74bbb62021-12-03 23:57:551365 prefetch::RegisterPredictionOptionsProfilePrefs(registry);
Robert Ogden575d8a022020-11-13 17:54:541366 PrefetchProxyOriginDecider::RegisterPrefs(registry);
Xi Han25a7f032019-04-18 21:44:211367 PrefsTabHelper::RegisterProfilePrefs(registry, locale);
harrisonsean04618302020-11-27 16:00:531368 privacy_sandbox::RegisterProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:441369 Profile::RegisterProfilePrefs(registry);
1370 ProfileImpl::RegisterProfilePrefs(registry);
Matt Menkecfef87d2017-08-03 13:03:061371 ProfileNetworkContextService::RegisterProfilePrefs(registry);
Javier Fernández García-Boente7966a892021-12-09 12:28:231372 custom_handlers::ProtocolHandlerRegistry::RegisterProfilePrefs(registry);
johnmecf2da0c2015-10-28 19:42:121373 PushMessagingAppIdentifier::RegisterProfilePrefs(registry);
Balazs Engedy715b0ec2019-12-04 15:11:451374 QuietNotificationPermissionUiState::RegisterProfilePrefs(registry);
[email protected]c753f142013-02-10 13:14:041375 RegisterBrowserUserPrefs(registry);
Amanda Velasco Gallardo25f07362022-01-28 02:08:471376 safe_browsing::file_type::RegisterProfilePrefs(registry);
Luke Zielinski12ef88552017-06-23 15:36:271377 safe_browsing::RegisterProfilePrefs(registry);
Ryan Sturm010e2f52021-01-08 00:13:561378 SearchPrefetchService::RegisterProfilePrefs(registry);
Clark DuVall8236b6a82020-05-28 22:54:321379 blocked_content::SafeBrowsingTriggeredPopupBlocker::RegisterProfilePrefs(
1380 registry);
Carlos IL06e6c8c2020-07-28 00:25:191381 security_interstitials::InsecureFormBlockingPage::RegisterProfilePrefs(
1382 registry);
Shakti Sahu93bfba22021-06-17 18:05:211383 segmentation_platform::SegmentationPlatformService::RegisterProfilePrefs(
1384 registry);
[email protected]37ca3fe02013-07-05 15:32:441385 SessionStartupPref::RegisterProfilePrefs(registry);
Himanshu Jajubcf3b9292019-06-07 12:54:071386 SharingSyncPreference::RegisterProfilePrefs(registry);
Evan Stade89158192021-01-27 18:45:231387 site_engagement::SiteEngagementService::RegisterProfilePrefs(registry);
Ayu Ishii73a353d2022-07-07 21:56:421388 storage::RegisterProfilePrefs(registry);
Mikel Astiz0889b2be2018-09-25 16:20:411389 sync_sessions::SessionSyncPrefs::RegisterProfilePrefs(registry);
Jeffrey Cohen053be24d2019-07-23 23:44:051390 syncer::DeviceInfoPrefs::RegisterProfilePrefs(registry);
Bernhard Bauer19190732017-09-28 09:03:331391 syncer::SyncPrefs::RegisterProfilePrefs(registry);
Mikel Astiz89473c442021-07-13 09:46:121392 syncer::SyncTransportDataPrefs::RegisterProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:441393 TemplateURLPrepopulateData::RegisterProfilePrefs(registry);
[email protected]e5e72cc2014-07-22 19:06:491394 translate::TranslatePrefs::RegisterProfilePrefs(registry);
Moe Ahmadi1266de82020-04-10 17:19:531395 omnibox::RegisterProfilePrefs(registry);
[email protected]855ebff2014-05-09 07:14:381396 ZeroSuggestProvider::RegisterProfilePrefs(registry);
[email protected]cc36c2c2012-03-01 00:57:341397
Scott Violet53fb03c2021-01-15 23:48:161398#if BUILDFLAG(ENABLE_SESSION_SERVICE)
1399 RegisterSessionServiceLogProfilePrefs(registry);
Christian Dullweber0747d7c92021-05-10 10:05:131400 SessionDataService::RegisterProfilePrefs(registry);
Scott Violet53fb03c2021-01-15 23:48:161401#endif
1402
brettw00899e62016-11-12 02:10:171403#if BUILDFLAG(ENABLE_EXTENSIONS)
[email protected]17510602014-06-05 11:02:281404 ExtensionWebUI::RegisterProfilePrefs(registry);
je_julie.kim7fbb5a1a2015-02-09 17:26:051405 RegisterAnimationPolicyPrefs(registry);
mfoltz96f329c2016-01-13 18:16:581406 extensions::ActivityLog::RegisterProfilePrefs(registry);
tbarzicfa3c7ef62017-04-17 23:12:021407 extensions::AudioAPI::RegisterUserPrefs(registry);
mfoltz96f329c2016-01-13 18:16:581408 extensions::ExtensionPrefs::RegisterProfilePrefs(registry);
Devlin Cronin71f0f532018-04-26 16:35:061409 extensions::ExtensionsUI::RegisterProfilePrefs(registry);
Joel Hockeya9ccf0e2022-05-27 22:11:191410#if BUILDFLAG(IS_CHROMEOS_ASH)
1411 extensions::shared_storage::RegisterProfilePrefs(registry);
1412#endif // BUILDFLAG(IS_CHROMEOS_ASH)
Emilia Paz363fa0062022-01-15 05:12:031413 extensions::PermissionsManager::RegisterProfilePrefs(registry);
afakhry2bd481832016-06-16 16:17:241414 extensions::RuntimeAPI::RegisterPrefs(registry);
Devlin Cronina997c8e2021-03-18 00:33:181415 // TODO(devlin): This would be more inline with the other calls here if it
1416 // were nested in either a class or separate namespace with a simple
1417 // Register[Profile]Prefs() name.
1418 extensions::RegisterSettingsOverriddenUiPrefs(registry);
Minh X. Nguyen3aa40692018-03-28 01:15:591419 update_client::RegisterProfilePrefs(registry);
brettw00899e62016-11-12 02:10:171420#endif // BUILDFLAG(ENABLE_EXTENSIONS)
[email protected]c2ac1dda2013-09-23 05:04:561421
Lei Zhang92c15542020-01-10 17:05:101422#if BUILDFLAG(ENABLE_OFFLINE_PAGES)
1423 offline_pages::OfflineMetricsCollectorImpl::RegisterPrefs(registry);
1424 offline_pages::prefetch_prefs::RegisterPrefs(registry);
1425#endif
1426
Andy Phan99ccfb42022-11-29 18:57:071427#if BUILDFLAG(ENABLE_PDF)
1428 registry->RegisterListPref(prefs::kPdfLocalFileAccessAllowedForDomains,
1429 base::Value::List());
1430#endif // BUILDFLAG(ENABLE_PDF)
1431
Bernhard Bauer19190732017-09-28 09:03:331432#if BUILDFLAG(ENABLE_PLUGINS)
Nicholas Verned391eae2017-11-13 02:41:381433 PluginInfoHostImpl::RegisterUserPrefs(registry);
Bernhard Bauer19190732017-09-28 09:03:331434#endif
1435
Brett Wilson65f951c2016-11-03 22:06:121436#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
Nicolas Ouellet-Payeur4dbdf1e52018-08-06 21:51:021437 printing::PolicySettings::RegisterProfilePrefs(registry);
Nikita Podguzov26222d12019-12-04 11:44:311438 printing::PrintPreviewStickySettings::RegisterProfilePrefs(registry);
bauerb4da36132014-12-26 19:53:131439#endif
1440
Lei Zhang92c15542020-01-10 17:05:101441#if BUILDFLAG(ENABLE_RLZ)
1442 ChromeRLZTrackerDelegate::RegisterProfilePrefs(registry);
1443#endif
1444
brettw9e85ef42016-11-01 21:01:241445#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
bauerb7f3b8542015-06-29 19:56:191446 ChildAccountService::RegisterProfilePrefs(registry);
1447 SupervisedUserService::RegisterProfilePrefs(registry);
bauerb4da36132014-12-26 19:53:131448#endif
1449
Jian Lic9a227c2022-02-28 22:55:441450#if BUILDFLAG(ENABLE_FEED_V2)
1451 feed::prefs::RegisterFeedSharedProfilePrefs(registry);
1452 feed::RegisterProfilePrefs(registry);
1453#endif
1454
Xiaohan Wangae7f9182022-01-16 00:37:521455#if BUILDFLAG(IS_ANDROID)
Lei Zhang92c15542020-01-10 17:05:101456 cdm::MediaDrmStorageImpl::RegisterProfilePrefs(registry);
Sebastien Lalancette374cf6a2021-06-22 17:23:521457 content_creation::prefs::RegisterProfilePrefs(registry);
Lei Zhang92c15542020-01-10 17:05:101458 explore_sites::HistoryStatisticsReporter::RegisterPrefs(registry);
Christopher Thompson2602fea2019-11-26 19:36:541459 KnownInterceptionDisclosureInfoBarDelegate::RegisterProfilePrefs(registry);
Lei Zhang92c15542020-01-10 17:05:101460 MediaDrmOriginIdManager::RegisterProfilePrefs(registry);
1461 NotificationChannelsProviderAndroid::RegisterProfilePrefs(registry);
Lei Zhang92c15542020-01-10 17:05:101462 ntp_tiles::PopularSitesImpl::RegisterProfilePrefs(registry);
1463 OomInterventionDecider::RegisterProfilePrefs(registry);
[email protected]084f82b2013-11-01 00:09:591464 PartnerBookmarksShim::RegisterProfilePrefs(registry);
Wolfgang Billenstein546bd4d72022-09-20 11:34:261465 permissions::GeolocationPermissionContextAndroid::RegisterProfilePrefs(
1466 registry);
Xing Liu0327d832020-05-15 21:07:031467 query_tiles::RegisterPrefs(registry);
mvanouwerkerkc1751e02017-01-06 12:16:431468 RecentTabsPagePrefs::RegisterProfilePrefs(registry);
Patrick Noland87d9f842019-01-16 03:52:021469 usage_stats::UsageStatsBridge::RegisterProfilePrefs(registry);
Lei Zhang92c15542020-01-10 17:05:101470 variations::VariationsService::RegisterProfilePrefs(registry);
Shakti Sahu623d00c2020-09-22 00:32:421471 video_tutorials::RegisterPrefs(registry);
Jan Keitel98b2cc42022-09-20 05:38:391472#else // BUILDFLAG(IS_ANDROID)
johnme627dc8c72016-08-19 21:49:391473 browser_sync::ForeignSessionHandler::RegisterProfilePrefs(registry);
Dana Friedcf8c2142022-01-25 18:33:421474 BrowserFeaturePromoSnoozeService::RegisterProfilePrefs(registry);
Amanda Deaconbc21ec92021-05-20 00:06:011475 captions::LiveCaptionController::RegisterProfilePrefs(registry);
evliuc5b5a722022-10-28 00:05:491476 captions::LiveTranslateController::RegisterProfilePrefs(registry);
Nina Satragno8c832df2019-07-29 15:59:391477 ChromeAuthenticatorRequestDelegate::RegisterProfilePrefs(registry);
Anqing Zhao9595e482021-06-10 11:33:551478 DeviceServiceImpl::RegisterProfilePrefs(registry);
Lei Zhang92c15542020-01-10 17:05:101479 DevToolsWindow::RegisterProfilePrefs(registry);
Tibor Goldschwendt610d0372021-05-11 01:39:021480 DriveService::RegisterProfilePrefs(registry);
Dominique Fauteux-Chapleau130242bf2020-12-07 19:07:481481 enterprise_connectors::RegisterProfilePrefs(registry);
Lei Zhang92c15542020-01-10 17:05:101482 extensions::CommandService::RegisterProfilePrefs(registry);
1483 extensions::TabsCaptureVisibleTabFunction::RegisterProfilePrefs(registry);
gabdac09c03b2017-03-22 20:00:111484 first_run::RegisterProfilePrefs(registry);
johnme627dc8c72016-08-19 21:49:391485 gcm::RegisterProfilePrefs(registry);
Lei Zhang92c15542020-01-10 17:05:101486 HatsService::RegisterProfilePrefs(registry);
Tibor Goldschwendtf3a3ce92021-08-17 00:42:161487 NtpCustomBackgroundService::RegisterProfilePrefs(registry);
George Benz13da3df02022-01-14 00:03:521488 media_router::RegisterAccessCodeProfilePrefs(registry);
Derek Cheng23a01402018-07-24 13:38:141489 media_router::RegisterProfilePrefs(registry);
Tibor Goldschwendt53ca78b2020-10-07 19:56:181490 NewTabPageHandler::RegisterProfilePrefs(registry);
Tibor Goldschwendtbbdbe8f2021-05-20 19:27:391491 NewTabPageUI::RegisterProfilePrefs(registry);
Lei Zhang92c15542020-01-10 17:05:101492 NewTabUI::RegisterProfilePrefs(registry);
Rohit Bhatia22e544f2021-10-05 15:32:261493 ntp::SafeBrowsingHandler::RegisterProfilePrefs(registry);
kristiparkc0199772018-07-18 05:25:421494 ntp_tiles::CustomLinksManagerImpl::RegisterProfilePrefs(registry);
Jeremy Selier730b56d32021-09-17 02:59:391495 PhotosService::RegisterProfilePrefs(registry);
Lei Zhang92c15542020-01-10 17:05:101496 PinnedTabCodec::RegisterProfilePrefs(registry);
Yann Dago44d6cc322022-07-13 17:46:251497 policy::DeveloperToolsPolicyHandler::RegisterProfilePrefs(registry);
Lei Zhang92c15542020-01-10 17:05:101498 PromoService::RegisterProfilePrefs(registry);
Mark Schillaciba4a7322022-06-29 15:08:351499 RegisterReadAnythingProfilePrefs(registry);
Lei Zhang92c15542020-01-10 17:05:101500 settings::SettingsUI::RegisterProfilePrefs(registry);
Victor Hugo Vianna Silva3452787c2022-07-28 23:25:301501 send_tab_to_self::RegisterProfilePrefs(registry);
Lei Zhang92c15542020-01-10 17:05:101502 signin::RegisterProfilePrefs(registry);
tmartino6254f472016-11-21 01:22:561503 StartupBrowserCreator::RegisterProfilePrefs(registry);
Roman Aroracd8462c2021-08-03 01:20:331504 tab_search_prefs::RegisterProfilePrefs(registry);
Riley Tatumc48258f12022-08-18 22:13:131505 RecipesService::RegisterProfilePrefs(registry);
Lei Zhang92c15542020-01-10 17:05:101506 UnifiedAutoplayConfig::RegisterProfilePrefs(registry);
Yue Zhang87902392020-12-23 23:12:051507 CartService::RegisterProfilePrefs(registry);
Mei Liang96bbcc22022-09-20 20:31:221508 commerce::ShoppingListUiTabHelper::RegisterProfilePrefs(registry);
Xiaohan Wangae7f9182022-01-16 00:37:521509#endif // BUILDFLAG(IS_ANDROID)
mvanouwerkerk9f0f38a2016-06-08 14:11:441510
Xiaohan Wangae7f9182022-01-16 00:37:521511#if BUILDFLAG(IS_CHROMEOS)
Tim Sergeant2b6bc66e2022-04-14 20:15:211512 apps::SupportedLinksInfoBarPrefsService::RegisterProfilePrefs(registry);
Maria Petrisorbb5226b2022-06-02 09:10:511513 extensions::login_api::RegisterProfilePrefs(registry);
Olya Kalitova39e913d52021-03-16 22:26:221514 extensions::platform_keys::RegisterProfilePrefs(registry);
Michael Ershovd9a627e2021-11-03 13:55:271515 certificate_manager::CertificatesHandler::RegisterProfilePrefs(registry);
Michael Ershov5b2a7062022-01-17 14:28:451516 policy::PolicyCertService::RegisterProfilePrefs(registry);
Yanzhu Du76169d12022-09-21 02:53:311517 registry->RegisterBooleanPref(prefs::kDeskAPIThirdPartyAccessEnabled, false);
Yanzhu Du428de9052022-10-05 22:46:581518 registry->RegisterListPref(prefs::kDeskAPIThirdPartyAllowlist);
Vignesh Shenvif47279d2022-04-07 10:55:361519 registry->RegisterBooleanPref(prefs::kInsightsExtensionEnabled, false);
Nicolas Dossou-Gbete8bf46c12022-05-16 14:20:171520 // By default showing Sync Consent is set to true. It can changed by policy.
1521 registry->RegisterBooleanPref(prefs::kEnableSyncConsent, true);
anina koehlerf1e29df62022-08-10 07:22:321522 registry->RegisterListPref(
1523 chromeos::prefs::kKeepFullscreenWithoutNotificationUrlAllowList,
1524 PrefRegistry::PUBLIC);
Pranav Batrae71407672021-08-16 23:53:001525#if defined(USE_CUPS)
1526 extensions::PrintingAPIHandler::RegisterProfilePrefs(registry);
1527#endif // defined(USE_CUPS)
Xiaohan Wangae7f9182022-01-16 00:37:521528#endif // BUILDFLAG(IS_CHROMEOS)
Olya Kalitova39e913d52021-03-16 22:26:221529
Yuta Hijikata31a359c2020-11-27 07:50:261530#if BUILDFLAG(IS_CHROMEOS_ASH)
James Cookc542d992019-11-08 23:34:241531 app_list::AppListSyncableService::RegisterProfilePrefs(registry);
Nancy Wanga78b7a32021-04-28 05:10:291532 apps::AppPlatformMetricsService::RegisterProfilePrefs(registry);
Jeevan Shikarama73dec1a2022-09-08 05:51:521533 apps::AppPreloadService::RegisterProfilePrefs(registry);
Tim Sergeant1231dcc2021-05-10 14:00:571534 apps::webapk_prefs::RegisterProfilePrefs(registry);
Hidehiko Abe33e9adf2017-09-13 06:12:231535 arc::prefs::RegisterProfilePrefs(registry);
James Cookc542d992019-11-08 23:34:241536 ArcAppListPrefs::RegisterProfilePrefs(registry);
Anastasiia N0582a902021-12-08 17:44:591537 ash::AccountAppsAvailability::RegisterPrefs(registry);
Kushagra Sinhab37e24db2021-07-02 15:14:241538 account_manager::AccountManager::RegisterPrefs(registry);
Yeunjoo Choi19772c942021-03-08 14:51:111539 ash::ApkWebAppService::RegisterProfilePrefs(registry);
Yeunjoo Choi40d02412021-04-21 01:38:561540 ash::app_time::AppActivityRegistry::RegisterProfilePrefs(registry);
1541 ash::app_time::AppTimeController::RegisterProfilePrefs(registry);
Yeunjoo Choi65c73cc2022-08-02 05:30:161542 ash::assistant::prefs::RegisterProfilePrefs(registry);
Anastasiia N1ad94e1e2022-09-15 08:47:281543 ash::auth::AuthFactorConfig::RegisterPrefs(registry);
Yeunjoo Choi0e66c9aa2021-04-02 02:05:561544 ash::bluetooth::DebugLogsManager::RegisterPrefs(registry);
Henrique Ferreirobbaee882022-09-08 07:15:551545 ash::bluetooth_config::BluetoothPowerControllerImpl::RegisterProfilePrefs(
1546 registry);
Henrique Ferreiro2029590e2021-09-23 08:01:521547 ash::ClientAppMetadataProviderService::RegisterProfilePrefs(registry);
Yeunjoo Choi47a6a142022-02-11 02:35:231548 ash::CupsPrintersManager::RegisterProfilePrefs(registry);
Yeunjoo Choi0dc579e42022-03-23 04:14:521549 ash::device_sync::RegisterProfilePrefs(registry);
Yeunjoo Choi651766c02021-04-26 11:45:431550 ash::FamilyUserChromeActivityMetrics::RegisterProfilePrefs(registry);
1551 ash::FamilyUserMetricsService::RegisterProfilePrefs(registry);
1552 ash::FamilyUserSessionMetrics::RegisterProfilePrefs(registry);
Andreea Costinas2a142bd2021-10-05 10:22:491553 crosapi::NetworkSettingsServiceAsh::RegisterProfilePrefs(registry);
Yeunjoo Choiebbdaa62022-10-20 01:05:311554 ash::InlineLoginHandlerImpl::RegisterProfilePrefs(registry);
Yeunjoo Choi395103872021-07-22 01:16:071555 ash::first_run::RegisterProfilePrefs(registry);
Yeunjoo Choic4e54fe2021-06-09 02:11:391556 ash::file_system_provider::RegisterProfilePrefs(registry);
Yeunjoo Choi0842edfa2021-07-29 00:53:171557 ash::full_restore::RegisterProfilePrefs(registry);
Yeunjoo Choi4530b1792021-05-10 02:32:271558 ash::KerberosCredentialsManager::RegisterProfilePrefs(registry);
Yeunjoo Choi044ea242022-03-14 12:06:291559 ash::multidevice_setup::MultiDeviceSetupService::RegisterProfilePrefs(
Jordy Greenblatt2265de702018-07-26 19:05:261560 registry);
Henrique Ferreirocddc8012021-03-26 00:47:151561 ash::MultiProfileUserController::RegisterProfilePrefs(registry);
Yeunjoo Choi6c99c4d2022-08-08 03:11:111562 ash::NetworkMetadataStore::RegisterPrefs(registry);
Yeunjoo Choic1593bf2021-04-23 03:49:251563 ash::ReleaseNotesStorage::RegisterProfilePrefs(registry);
Yeunjoo Choif5706262021-08-24 01:11:241564 ash::HelpAppNotificationController::RegisterProfilePrefs(registry);
Henrique Ferreirob3ff980b2021-07-19 09:41:271565 ash::quick_unlock::FingerprintStorage::RegisterProfilePrefs(registry);
1566 ash::quick_unlock::PinStoragePrefs::RegisterProfilePrefs(registry);
Henrique Ferreiro4b21d142021-11-10 11:47:371567 ash::Preferences::RegisterProfilePrefs(registry);
Yeunjoo Choida53f442021-09-17 01:07:361568 ash::EnterprisePrintersProvider::RegisterProfilePrefs(registry);
Yeunjoo Choi09213db2021-04-16 03:42:081569 ash::parent_access::ParentAccessService::RegisterProfilePrefs(registry);
Yue Lia3125692022-01-05 20:05:431570 quick_answers::prefs::RegisterProfilePrefs(registry);
Henrique Ferreirob3ff980b2021-07-19 09:41:271571 ash::quick_unlock::RegisterProfilePrefs(registry);
Henrique Ferreiroec8355d2021-07-20 08:20:081572 ash::RegisterSamlProfilePrefs(registry);
Yeunjoo Choi651766c02021-04-26 11:45:431573 ash::ScreenTimeController::RegisterProfilePrefs(registry);
Henrique Ferreirofad33bd2021-01-29 00:28:401574 ash::EduCoexistenceConsentInvalidationController::RegisterProfilePrefs(
yilkalc04a16dc2020-11-04 22:07:071575 registry);
Yeunjoo Choi38cea422022-10-18 06:19:171576 ash::EduCoexistenceLoginHandler::RegisterProfilePrefs(registry);
Henrique Ferreiroa264c8c02021-07-20 08:31:471577 ash::SigninErrorNotifier::RegisterPrefs(registry);
Yeunjoo Choicf61fba2021-04-23 02:43:091578 ash::ServicesCustomizationDocument::RegisterProfilePrefs(registry);
Yeunjoo Choiba3d9972022-10-11 12:50:121579 ash::settings::OSSettingsUI::RegisterProfilePrefs(registry);
Henrique Ferreirob403be32021-09-22 07:15:361580 ash::StartupUtils::RegisterOobeProfilePrefs(registry);
Henrique Ferreirocddc8012021-03-26 00:47:151581 ash::UserImageSyncObserver::RegisterProfilePrefs(registry);
Jong Ahn6f1c54a42022-01-18 00:20:561582 ChromeMetricsServiceClient::RegisterProfilePrefs(registry);
Renee Wrightc41d5432018-04-26 05:27:371583 crostini::prefs::RegisterProfilePrefs(registry);
Yeunjoo Choi3cbb06ba2021-03-22 08:01:491584 ash::attestation::TpmChallengeKey::RegisterProfilePrefs(registry);
sdefresne8593e6432015-12-01 12:38:081585 flags_ui::PrefServiceFlagsStorage::RegisterProfilePrefs(registry);
Joel Hockey7fb974342019-06-27 23:35:051586 guest_os::prefs::RegisterProfilePrefs(registry);
Toni Barzic14329d02017-07-17 21:59:121587 lock_screen_apps::StateController::RegisterProfilePrefs(registry);
Olya Kalitovac869f962018-12-04 12:01:231588 plugin_vm::prefs::RegisterProfilePrefs(registry);
GioVAX287418d2020-11-23 17:56:591589 policy::ArcAppInstallEventLogger::RegisterProfilePrefs(registry);
Bartosz Fabianowskid4d93a72018-05-17 18:49:481590 policy::AppInstallEventLogManagerWrapper::RegisterProfilePrefs(registry);
Marcelo Almeida9ef8c132019-05-13 20:19:121591 policy::StatusCollector::RegisterProfilePrefs(registry);
Henrique Ferreiroe2cbaaf2022-01-10 15:02:231592 ash::SystemProxyManager::RegisterProfilePrefs(registry);
Erik Chenc2927bbd2021-09-22 23:20:071593 ChromeShelfPrefs::RegisterProfilePrefs(registry);
stevenjbf22f82e2016-10-26 21:47:381594 ::onc::RegisterProfilePrefs(registry);
Yeunjoo Choicd4cc5382021-03-25 08:50:491595 ash::cert_provisioning::RegisterProfilePrefs(registry);
Nicholas Hollingumf4c11e32020-10-05 22:52:571596 borealis::prefs::RegisterProfilePrefs(registry);
Gavin Williamsf6781f3e2021-04-22 01:13:491597 ash::ChromeScanningAppDelegate::RegisterProfilePrefs(registry);
yilkal95d9f882021-10-18 21:59:001598 ProjectorAppClientImpl::RegisterProfilePrefs(registry);
Geng Li11526bb42022-02-15 23:59:141599 ash::floating_workspace_util::RegisterProfilePrefs(registry);
Sanja Perisic91217932022-04-13 13:45:021600 policy::RebootNotificationsScheduler::RegisterProfilePrefs(registry);
Irina Fedorova13745422022-07-15 12:59:001601 ash::KioskAppManager::RegisterProfilePrefs(registry);
Andrew Rayskiy47076d72022-09-27 18:46:141602 file_manager::file_tasks::RegisterProfilePrefs(registry);
Nigel Taoa1d4dce2022-10-18 00:01:201603 file_manager::prefs::RegisterProfilePrefs(registry);
Fergus Dall54a6a432022-11-18 17:35:291604 bruschetta::prefs::RegisterProfilePrefs(registry);
Yuta Hijikata31a359c2020-11-27 07:50:261605#endif // BUILDFLAG(IS_CHROMEOS_ASH)
gab3ca4a492017-03-02 00:19:411606
Darin Fisher127d5782021-01-20 20:32:341607#if BUILDFLAG(IS_CHROMEOS_LACROS)
1608 lacros_prefs::RegisterProfilePrefs(registry);
Andreea Costinas68cad91f2021-09-22 15:58:091609 chromeos::ProxyConfigServiceLacros::RegisterProfilePrefs(registry);
Ian Helmkec4a4e452022-05-09 22:17:581610 lacros_prefs::RegisterExtensionControlledAshPrefs(registry);
Irina Fedorova13745422022-07-15 12:59:001611 KioskSessionServiceLacros::RegisterProfilePrefs(registry);
Nancy Wangc84098e2022-10-24 10:30:361612 apps::WebsiteMetricsServiceLacros::RegisterProfilePrefs(registry);
Darin Fisher127d5782021-01-20 20:32:341613#endif
1614
Xiaohan Wangae7f9182022-01-16 00:37:521615#if BUILDFLAG(IS_WIN)
Alex St-Onge9e4b9b72021-06-08 15:35:541616 CdmPrefServiceHelper::RegisterProfilePrefs(registry);
mad2b3b6552014-09-25 00:44:491617 component_updater::RegisterProfilePrefsForSwReporter(registry);
Scott Violet3ff87d062021-12-21 06:10:101618 FontPrewarmerTabHelper::RegisterProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:441619 NetworkProfileBubble::RegisterProfilePrefs(registry);
alito856526d2017-03-03 09:16:171620 safe_browsing::SettingsResetPromptPrefsManager::RegisterProfilePrefs(
1621 registry);
ftirelo46b34222017-06-19 10:36:571622 safe_browsing::PostCleanupSettingsResetter::RegisterProfilePrefs(registry);
[email protected]a4422802012-05-03 09:19:151623#endif
[email protected]eeec6ca2013-02-21 15:10:431624
Zonghan Xuc528f6e82022-08-09 22:31:581625#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
1626 device_signals::RegisterProfilePrefs(registry);
1627#endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
1628
Nicolas Ouellet-Payeurc1b89932022-09-30 16:22:531629#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
Nicolas4b82a652019-01-04 17:42:381630 browser_switcher::BrowserSwitcherPrefs::RegisterProfilePrefs(registry);
Nicolas Ouellet-Payeur9a4a94d2018-09-17 15:26:111631#endif
1632
Xiaohan Wangae7f9182022-01-16 00:37:521633#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH)
Daniel Murphy3657906d2021-04-13 20:33:121634 preinstalled_apps::RegisterProfilePrefs(registry);
Becca Hughes7d2bbb82018-08-07 22:56:591635#endif
1636
Xiaohan Wangae7f9182022-01-16 00:37:521637#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS)
Kristi Parkd0f72412021-07-02 01:09:031638 sharing_hub::RegisterProfilePrefs(registry);
1639#endif
1640
Lei Zhang92c15542020-01-10 17:05:101641#if defined(TOOLKIT_VIEWS)
1642 accessibility_prefs::RegisterInvertBubbleUserPrefs(registry);
Yuheng Huang9ce54892022-05-06 19:29:391643 side_search_prefs::RegisterProfilePrefs(registry);
Lei Zhang92c15542020-01-10 17:05:101644 RegisterBrowserViewProfilePrefs(registry);
Owen Minef022e92019-10-15 21:25:211645#endif
1646
Xiaohan Wangae7f9182022-01-16 00:37:521647#if !BUILDFLAG(IS_ANDROID)
Juan Mojica4669f8d2021-08-05 20:01:451648 registry->RegisterBooleanPref(
1649 prefs::kLensRegionSearchEnabled, true,
1650 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
Martin Kreichgauerd7aa4f92022-02-22 20:46:211651 registry->RegisterBooleanPref(
1652 webauthn::pref_names::kRemoteProxiedRequestsAllowed, false);
Bryan Nguyen1adbcb52022-10-27 19:10:591653 registry->RegisterBooleanPref(prefs::kLensDesktopNTPSearchEnabled, true);
dljames0a96ef192022-07-07 23:31:431654
1655 // When in RTL mode, the side panel should default to the left of the screen.
1656 // Otherwise, the side panel should default to the right side of the screen.
1657 // TODO(dljames): Add enum values kAlternateSide / kDefaultSide that will
1658 // replace false and true respectively.
1659 registry->RegisterBooleanPref(prefs::kSidePanelHorizontalAlignment,
1660 base::i18n::IsRTL() ? false : true);
Juan Mojica4669f8d2021-08-05 20:01:451661#endif
1662
Nina Satragnod7b8fb42022-11-10 20:43:391663 registry->RegisterBooleanPref(webauthn::pref_names::kAllowWithBrokenCerts,
1664 false);
1665
Sean Harrisonf263b732021-12-07 11:17:521666 registry->RegisterBooleanPref(prefs::kPrivacyGuideViewed, false);
Sean Harrisonf263b732021-12-07 11:17:521667
Leonard Grey812af7a2022-05-02 15:46:031668#if BUILDFLAG(IS_MAC)
1669 registry->RegisterBooleanPref(policy::policy_prefs::kScreenTimeEnabled, true);
1670#endif
1671
James Cook0ba192bf2017-12-01 20:53:111672 RegisterProfilePrefsForMigration(registry);
Alison Gale6bf2cc52022-09-08 15:11:491673
1674#if !BUILDFLAG(IS_ANDROID)
1675 registry->RegisterIntegerPref(prefs::kHighEfficiencyChipExpandedCount, 0);
1676#endif
Anders Hartvoll Ruudeedebdc2022-10-12 15:38:011677
1678#if BUILDFLAG(IS_ANDROID)
1679 registry->RegisterBooleanPref(prefs::kVirtualKeyboardResizesLayoutByDefault,
1680 false);
1681#endif
Kirubel Aklilubb804082022-11-10 19:02:301682
1683 registry->RegisterTimePref(prefs::kDIPSTimerLastUpdate, base::Time());
initial.commit09911bf2008-07-26 23:55:291684}
license.botbf09a502008-08-24 00:55:551685
[email protected]37ca3fe02013-07-05 15:32:441686void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
Xi Han25a7f032019-04-18 21:44:211687 RegisterUserProfilePrefs(registry, g_browser_process->GetApplicationLocale());
1688}
1689
1690void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
1691 const std::string& locale) {
1692 RegisterProfilePrefs(registry, locale);
[email protected]2424cc52013-07-17 13:44:381693
Xiaohan Wangae7f9182022-01-16 00:37:521694#if BUILDFLAG(IS_ANDROID)
mlliuee3a405c2016-10-28 22:34:521695 ::android::RegisterUserProfilePrefs(registry);
1696#endif
Yuta Hijikata31a359c2020-11-27 07:50:261697#if BUILDFLAG(IS_CHROMEOS_ASH)
Xiyuan Xia5a8c4172019-05-13 16:23:481698 ash::RegisterUserProfilePrefs(registry);
1699#endif
[email protected]37ca3fe02013-07-05 15:32:441700}
1701
[email protected]8eefe842014-01-17 06:42:401702void RegisterScreenshotPrefs(PrefRegistrySimple* registry) {
1703 registry->RegisterBooleanPref(prefs::kDisableScreenshots, false);
1704}
1705
Yuta Hijikata31a359c2020-11-27 07:50:261706#if BUILDFLAG(IS_CHROMEOS_ASH)
Xiyuan Xia5a8c4172019-05-13 16:23:481707void RegisterSigninProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
Xi Han25a7f032019-04-18 21:44:211708 RegisterProfilePrefs(registry, g_browser_process->GetApplicationLocale());
Xiyuan Xia5a8c4172019-05-13 16:23:481709 ash::RegisterSigninProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:441710}
Eyor Alemayehu4b516fb2019-02-20 20:24:291711
[email protected]37ca3fe02013-07-05 15:32:441712#endif
1713
rkaplowf216caf2015-03-02 22:37:451714// This method should be periodically pruned of year+ old migrations.
Gabriel Charette1eecf132021-04-15 16:55:531715// See chrome/browser/prefs/README.md for details.
Lei Zhangb76b80e32020-04-08 16:58:161716void MigrateObsoleteLocalStatePrefs(PrefService* local_state) {
Scott Littlec463f3362022-02-15 18:44:241717 // IMPORTANT NOTE: This code is *not* run on iOS Chrome. If a pref is migrated
1718 // or cleared here, and that pref is also used in iOS Chrome, it may also need
1719 // to be migrated or cleared specifically for iOS as well. This could be by
1720 // doing the migration in feature code that's called by all platforms instead
1721 // of here, or by calling migration code in the appropriate place for iOS
1722 // specifically, e.g. ios/chrome/browser/prefs/browser_prefs.mm.
1723
Dominic Battre645d42342020-12-04 16:14:101724 // BEGIN_MIGRATE_OBSOLETE_LOCAL_STATE_PREFS
1725 // Please don't delete the preceding line. It is used by PRESUBMIT.py.
1726
Caitlin Fischer03ab6cb2021-12-07 19:54:061727 // Added 12/2021.
Caitlin Fischer0f812b02021-12-13 17:00:561728 local_state->ClearPref(kStabilityRendererHangCount);
Caitlin Fischer03ab6cb2021-12-07 19:54:061729 local_state->ClearPref(kStabilityIncompleteSessionEndCount);
1730 local_state->ClearPref(kStabilitySessionEndCompleted);
1731
Artem Sumaneev967577f2022-01-31 17:30:021732 // Added 01/2022.
1733 invalidation::InvalidatorRegistrarWithMemory::
1734 ClearTopicsWithObsoleteOwnerNames(local_state);
1735
Ari Chivukula3f8b6562022-02-18 23:33:431736 // Added 02/2022.
1737 local_state->ClearPref(kWebSQLInThirdPartyContextEnabled);
1738
Caitlin Fischer13cf5e782022-03-31 13:27:271739 // Added 03/2022.
Caitlin Fischerf52dbab2022-03-02 22:11:391740 local_state->ClearPref(kStabilityChildProcessCrashCount);
Caitlin Fischer13cf5e782022-03-31 13:27:271741 local_state->ClearPref(kStabilityRendererFailedLaunchCount);
1742 local_state->ClearPref(kStabilityExtensionRendererFailedLaunchCount);
Caitlin Fischerf52dbab2022-03-02 22:11:391743#if BUILDFLAG(ENABLE_PLUGINS)
1744 local_state->ClearPref(kStabilityPluginStats);
1745#endif
Caitlin Fischer92fb62d2022-03-28 15:43:281746#if !BUILDFLAG(IS_ANDROID)
1747 local_state->ClearPref(kStabilityLaunchCount);
1748#endif
Caitlin Fischer6134e2712022-03-30 22:54:231749 local_state->ClearPref(kStabilityExtensionRendererLaunchCount);
Caitlin Fischerf52dbab2022-03-02 22:11:391750
Robert Seseka1734d62022-04-20 19:09:311751 // Added 04/2022.
Caitlin Fischere321b452022-04-25 20:29:221752#if BUILDFLAG(ENABLE_PLUGINS)
Robert Seseka1734d62022-04-20 19:09:311753 local_state->ClearPref(kPluginsMetadata);
1754 local_state->ClearPref(kPluginsResourceCacheUpdate);
1755#endif
Caitlin Fischere321b452022-04-25 20:29:221756#if !BUILDFLAG(IS_ANDROID)
1757 local_state->ClearPref(kStabilityRendererLaunchCount);
1758#endif // !BUILDFLAG(IS_ANDROID)
Robert Seseka1734d62022-04-20 19:09:311759
Yann Dagob817b0f2022-05-24 16:34:281760 // Added 05/2022.
1761#if !BUILDFLAG(IS_ANDROID)
1762 local_state->ClearPref(prefs::kTabFreezingEnabled);
1763#endif
1764
Josh Horwich73bda3e2022-05-26 22:13:271765#if BUILDFLAG(IS_CHROMEOS_ASH)
1766 // Added 05/2022.
1767 local_state->ClearPref(kNativeBridge64BitSupportExperimentEnabled);
1768#endif // BUILDFLAG(IS_CHROMEOS_ASH)
1769
Oksana Zhuravlova58c85282022-06-14 20:24:281770 // Added 06/2022.
1771 local_state->ClearPref(kBackgroundTracingLastUpload);
Caitlin Fischera3cec3e02022-06-23 04:29:101772 local_state->ClearPref(kStabilityGpuCrashCount);
Caitlin Fischerc1d6f3172022-06-28 23:10:021773 local_state->ClearPref(kStabilityRendererCrashCount);
1774 local_state->ClearPref(kStabilityExtensionRendererCrashCount);
Caitlin Fischer07366b12022-06-23 17:18:241775#if !BUILDFLAG(IS_ANDROID)
1776 local_state->ClearPref(kStabilityPageLoadCount);
1777#endif
Oksana Zhuravlova58c85282022-06-14 20:24:281778
Caitlin Fischer69c1ca892022-07-06 18:32:451779 // Added 07/2002.
1780 local_state->ClearPref(kStabilityCrashCount);
1781
Roman Sorokinc138f2982022-09-05 16:42:301782#if BUILDFLAG(IS_CHROMEOS_ASH)
1783 // Added 09/2022
1784 local_state->ClearPref(kUsersLastInputMethod);
1785#endif // BUILDFLAG(IS_CHROMEOS_ASH)
1786
Avi Drissmanfee70e5f2022-11-02 20:50:111787#if BUILDFLAG(ENABLE_BACKGROUND_MODE) && BUILDFLAG(IS_MAC)
1788 // Added 11/2022.
1789 local_state->ClearPref(kUserRemovedLoginItem);
1790 local_state->ClearPref(kChromeCreatedLoginItem);
1791 local_state->ClearPref(kMigratedLoginItemPref);
1792#endif
Nicolas Dossou-Gbete2804a372022-11-09 17:25:351793#if BUILDFLAG(IS_CHROMEOS_LACROS)
1794 if (local_state->HasPrefPath(kPrimaryProfileFirstRunFinished)) {
1795 bool old_value = local_state->GetBoolean(kPrimaryProfileFirstRunFinished);
1796 local_state->ClearPref(kPrimaryProfileFirstRunFinished);
1797 local_state->SetBoolean(prefs::kFirstRunFinished, old_value);
1798 }
1799#endif
Avi Drissmanfee70e5f2022-11-02 20:50:111800
Victor Hugo Vianna Silva29ab0a32022-11-10 03:48:381801 // Added 11/2022.
1802 local_state->ClearPref(kLocalConsentsDictionary);
1803
Dominic Battre645d42342020-12-04 16:14:101804 // Please don't delete the following line. It is used by PRESUBMIT.py.
1805 // END_MIGRATE_OBSOLETE_LOCAL_STATE_PREFS
Scott Littlec463f3362022-02-15 18:44:241806
1807 // IMPORTANT NOTE: This code is *not* run on iOS Chrome. If a pref is migrated
1808 // or cleared here, and that pref is also used in iOS Chrome, it may also need
1809 // to be migrated or cleared specifically for iOS as well. This could be by
1810 // doing the migration in feature code that's called by all platforms instead
1811 // of here, or by calling migration code in the appropriate place for iOS
1812 // specifically, e.g. ios/chrome/browser/prefs/browser_prefs.mm.
rkaplowf216caf2015-03-02 22:37:451813}
1814
1815// This method should be periodically pruned of year+ old migrations.
Gabriel Charette1eecf132021-04-15 16:55:531816// See chrome/browser/prefs/README.md for details.
rkaplowf216caf2015-03-02 22:37:451817void MigrateObsoleteProfilePrefs(Profile* profile) {
Scott Littlec463f3362022-02-15 18:44:241818 // IMPORTANT NOTE: This code is *not* run on iOS Chrome. If a pref is migrated
1819 // or cleared here, and that pref is also used in iOS Chrome, it may also need
1820 // to be migrated or cleared specifically for iOS as well. This could be by
1821 // doing the migration in feature code that's called by all platforms instead
1822 // of here, or by calling migration code in the appropriate place for iOS
1823 // specifically, e.g. ios/chrome/browser/prefs/browser_prefs.mm.
1824
Dominic Battre645d42342020-12-04 16:14:101825 // BEGIN_MIGRATE_OBSOLETE_PROFILE_PREFS
1826 // Please don't delete the preceding line. It is used by PRESUBMIT.py.
1827
rkaplowf216caf2015-03-02 22:37:451828 PrefService* profile_prefs = profile->GetPrefs();
1829
wutaobc9027e2020-04-08 02:01:441830 // Check MigrateDeprecatedAutofillPrefs() to see if this is safe to remove.
Moe Ahmadic3061bd2018-08-30 16:25:321831 autofill::prefs::MigrateDeprecatedAutofillPrefs(profile_prefs);
Alexandr Ilin273e20b2018-09-05 19:47:571832
Tarun Bansal99e447d2020-03-17 10:07:561833 // Added 3/2020.
Julian Pastarmov7da3bc22021-03-30 14:30:181834 // TODO(crbug.com/1062698): Remove this once the privacy settings redesign
1835 // is fully launched.
Ben Schwartz135746c2020-05-14 04:37:031836 chrome_browser_net::secure_dns::MigrateProbesSettingToOrFromBackup(
1837 profile_prefs);
wutao2e24aff2020-04-03 17:01:021838
Maksim Moskvitinf62545e2021-11-04 19:55:241839 // Added 11/2021.
1840 syncer::ClearObsoleteKeystoreBootstrapTokenPref(profile_prefs);
Kevin Radtke766244c2021-11-23 02:20:451841 profile_prefs->ClearPref(kWasPreviouslySetUpPrefName);
Maksim Moskvitinf62545e2021-11-04 19:55:241842
Simon Pelchat83b8a452021-12-07 15:49:391843 // Added 12/2021.
1844 profile_prefs->ClearPref(kAvailabilityProberOriginCheck);
1845 profile_prefs->ClearPref(kAvailabilityProberTLSCanaryCheck);
1846 profile_prefs->ClearPref(kAvailabilityProberDNSCanaryCheck);
1847
Aga Wronska5c15cec2021-12-10 16:21:321848#if BUILDFLAG(IS_CHROMEOS_ASH)
1849 // Added 12/2021.
1850 profile_prefs->ClearPref(kEduCoexistenceSecondaryAccountsInvalidationVersion);
Boris Sazonov4f61fe382021-12-13 19:05:301851
1852 // Added 12/2021
1853 profile_prefs->ClearPref(kSyncFirstRunCompleted);
Rachel Wongae7ad5d2021-12-14 01:57:271854
1855 // Added 12/2021.
1856 profile_prefs->ClearPref(kArcAppReinstallState);
Boris Sazonov6bc149b2021-12-29 11:02:581857
1858 profile_prefs->ClearPref(kOsSyncFeatureEnabled);
Aga Wronska5c15cec2021-12-10 16:21:321859#endif // BUILDFLAG(IS_CHROMEOS_ASH)
1860
Andy Paicu5b05dd6d2021-12-28 17:40:071861// Added 12/2021.
Xiaohan Wangae7f9182022-01-16 00:37:521862#if BUILDFLAG(IS_ANDROID)
Andy Paicu5b05dd6d2021-12-28 17:40:071863 profile_prefs->ClearPref(kSearchGeolocationDisclosureDismissed);
1864 profile_prefs->ClearPref(kSearchGeolocationDisclosureShownCount);
1865 profile_prefs->ClearPref(kSearchGeolocationDisclosureLastShowDate);
1866 profile_prefs->ClearPref(kSearchGeolocationPreDisclosureMetricsRecorded);
1867 profile_prefs->ClearPref(kSearchGeolocationPostDisclosureMetricsRecorded);
Xiaohan Wangae7f9182022-01-16 00:37:521868#endif // BUILDFLAG(IS_ANDROID)
Andy Paicu5b05dd6d2021-12-28 17:40:071869
Tarun Bansal9a1dfe82022-01-11 21:02:201870 // Added 01/2022.
1871 profile_prefs->ClearPref(kHasSeenLiteModeInfoBar);
Marc Treib01cb8462022-01-13 14:57:511872 syncer::SyncTransportDataPrefs::MigrateInvalidationVersions(profile_prefs);
Tarun Bansal19172682022-01-27 01:26:241873 profile_prefs->ClearPref(kDailyHttpContentLengthLastUpdateDate);
1874 profile_prefs->ClearPref(kDailyHttpOriginalContentLength);
1875 profile_prefs->ClearPref(kDailyHttpReceivedContentLength);
1876 profile_prefs->ClearPref(kDataUsageReportingEnabled);
1877 profile_prefs->ClearPref(kHttpReceivedContentLength);
1878 profile_prefs->ClearPref(kHttpOriginalContentLength);
1879 profile_prefs->ClearPref(kThisWeekNumber);
1880 profile_prefs->ClearPref(kThisWeekServicesDownstreamBackgroundKB);
1881 profile_prefs->ClearPref(kThisWeekServicesDownstreamForegroundKB);
1882 profile_prefs->ClearPref(kLastWeekServicesDownstreamBackgroundKB);
1883 profile_prefs->ClearPref(kLastWeekServicesDownstreamForegroundKB);
1884 profile_prefs->ClearPref(kThisWeekUserTrafficContentTypeDownstreamKB);
1885 profile_prefs->ClearPref(kLastWeekUserTrafficContentTypeDownstreamKB);
Tarun Bansal556a5692022-02-01 18:56:241886 profile_prefs->ClearPref(kDataSaverEnabled);
1887 profile_prefs->ClearPref(kDataReductionProxyWasEnabledBefore);
1888 profile_prefs->ClearPref(kDataReductionProxyLastEnabledTime);
Marc Treib01cb8462022-01-13 14:57:511889
Artem Sumaneev967577f2022-01-31 17:30:021890 // Added 01/2022.
1891 invalidation::InvalidatorRegistrarWithMemory::
1892 ClearTopicsWithObsoleteOwnerNames(profile_prefs);
1893
Evan Stade19ccb912022-02-07 19:45:541894#if BUILDFLAG(IS_ANDROID)
1895 // Added 01/2022.
1896 syncer::ClearObsoleteSyncDecoupledFromAndroidMasterSync(profile_prefs);
1897#endif // BUILDFLAG(IS_ANDROID)
1898
Yao Xiao9255aec2022-02-05 00:02:191899 // Added 02/2022
1900 profile_prefs->ClearPref(kFlocIdValuePrefKey);
1901 profile_prefs->ClearPref(kFlocIdStatusPrefKey);
1902 profile_prefs->ClearPref(kFlocIdHistoryBeginTimePrefKey);
1903 profile_prefs->ClearPref(kFlocIdHistoryEndTimePrefKey);
1904 profile_prefs->ClearPref(kFlocIdFinchConfigVersionPrefKey);
1905 profile_prefs->ClearPref(kFlocIdSortingLshVersionPrefKey);
1906 profile_prefs->ClearPref(kFlocIdComputeTimePrefKey);
1907
Muyao Xubb2cb51ce2022-02-14 19:01:181908#if !BUILDFLAG(IS_ANDROID)
1909 // Added 02/2022
1910 profile_prefs->ClearPref(kMediaRouterCloudServicesPrefSet);
1911 profile_prefs->ClearPref(kMediaRouterEnableCloudServices);
1912#endif
1913
Matt Walliserc83a0ef42022-02-17 21:12:051914#if BUILDFLAG(IS_CHROMEOS_ASH)
1915 // Added 02/2022
1916 profile_prefs->ClearPref(kPhoneHubCameraRollPendingStatePrefName);
1917#endif // BUILDFLAG(IS_CHROMEOS_ASH)
1918
Sophia Linf06a9ae2022-02-21 04:26:561919#if BUILDFLAG(IS_CHROMEOS_ASH)
1920 // Added 02/2022.
1921 // TODO(crbug.com/1298250): Remove after M107.
Joel Hockeyfcc56a292022-06-17 02:28:001922 guest_os::RemoveDuplicateContainerEntries(profile_prefs);
Sophia Linf06a9ae2022-02-21 04:26:561923#endif
1924
Caroline Rising663480d2022-04-01 16:07:261925 // Added 03/2022
1926 profile_prefs->ClearPref(kShowReadingListInBookmarkBar);
1927
Anastasiia N7e9dd802022-04-21 20:52:201928#if BUILDFLAG(IS_CHROMEOS_ASH)
1929 // Added 04/2022
1930 profile_prefs->ClearPref(kAccountManagerNumTimesWelcomeScreenShown);
1931#endif // BUILDFLAG(IS_CHROMEOS_ASH)
1932
Geng Li8e6265f2022-04-28 21:34:271933#if BUILDFLAG(IS_CHROMEOS_ASH)
1934 // Added 04/2022
1935 profile_prefs->ClearPref(kTimeOnOobe);
1936#endif // BUILDFLAG(IS_CHROMEOS_ASH)
1937
Sophie Changd5246ca2022-04-29 20:13:541938 // Added 04/2022
1939 profile_prefs->ClearPref(kOptimizationGuideRemoteFetchingEnabled);
1940
George Benza2c5d6232022-05-06 23:35:441941#if !BUILDFLAG(IS_ANDROID)
1942 // Added 05/2022
1943 profile_prefs->ClearPref(kAccessCodeCastDiscoveredNetworks);
1944#endif // !BUILDFLAG(IS_ANDROID)
1945
Joel Hockeyde8847e42022-05-19 07:19:111946#if BUILDFLAG(IS_CHROMEOS_ASH)
1947 // Added 05/2022.
1948 // TODO(crbug.com/1028898): Remove after M110.
David Munro86435df2022-07-25 01:27:451949 guest_os::RemoveTerminalFromRegistry(profile_prefs);
Joel Hockeyde8847e42022-05-19 07:19:111950#endif
1951
Mihai Sardarescub5b2c4a2022-05-23 14:55:401952#if !BUILDFLAG(IS_CHROMEOS_ASH)
1953 // Added 05/2022
1954 profile_prefs->ClearPref(kAccountIdMigrationState);
1955#endif
1956
minch417d2ac2022-05-24 16:41:091957#if BUILDFLAG(IS_CHROMEOS_ASH)
1958 // Added 05/2022.
1959 profile_prefs->ClearPref(kColorModeThemed);
1960#endif // BUILDFLAG(IS_CHROMEOS_ASH)
1961
Mihai Sardarescu3a27a8b2022-05-30 14:01:491962#if BUILDFLAG(ENABLE_DICE_SUPPORT)
1963 // Added 06/2022.
1964 profile_prefs->ClearPref(kTokenServiceDiceCompatible);
1965#endif // BUILDFLAG(ENABLE_DICE_SUPPORT)
1966
Marc Treib1c0019a2022-06-02 09:25:011967#if BUILDFLAG(IS_ANDROID)
1968 // Added 06/2022.
1969 syncer::MigrateSyncRequestedPrefPostMice(profile_prefs);
Min Qin2435d852022-06-29 22:38:311970 profile_prefs->ClearPref(kDownloadLaterPromptStatus);
Marc Treib1c0019a2022-06-02 09:25:011971#endif // BUILDFLAG(IS_ANDROID)
1972
David Padlipsky6bc14aa2022-06-23 21:08:341973#if BUILDFLAG(IS_CHROMEOS_ASH)
1974 // Added 06/2022.
1975 profile_prefs->ClearPref(kImprovedShortcutsNotificationShownCount);
1976#endif // BUILDFLAG(IS_CHROMEOS_ASH)
1977
Yann Dago2cbd7cb2022-06-27 18:18:291978 // Added 06/2022.
1979#if BUILDFLAG(ENABLE_EXTENSIONS)
Martin Kreichgauerc86cc652022-10-28 16:52:041980 profile_prefs->ClearPref(kU2fSecurityKeyApiEnabled);
Yann Dago2cbd7cb2022-06-27 18:18:291981#endif
1982 profile_prefs->ClearPref(prefs::kCloudPrintSubmitEnabled);
1983
Theodore Olsauskas-Warren0b852302022-06-28 12:05:071984 // Added 06/2022.
1985 profile_prefs->ClearPref(kPrivacySandboxPreferencesReconciled);
1986
Mariam Ali784166e2022-07-05 16:03:181987 // Added 07/2022
1988 profile_prefs->ClearPref(kPrivacySandboxFlocEnabled);
1989 profile_prefs->ClearPref(kPrivacySandboxFlocDataAccessibleSince);
sauskiad03aa42022-07-12 10:38:181990 profile_prefs->ClearPref(kPrivacySandboxApisEnabledV2Init);
Mariam Ali784166e2022-07-05 16:03:181991
JunHo Seo1f0506f22022-07-26 02:52:251992#if BUILDFLAG(ENABLE_EXTENSIONS)
1993 // Added 07/2022.
1994 profile_prefs->ClearPref(kExtensionToolbar);
1995#endif
1996
dpapad8ad510132022-07-29 18:21:071997#if BUILDFLAG(IS_CHROMEOS_ASH)
1998 // Added 07/2022.
Colin Kincaidf11f8562022-09-14 15:41:061999 profile_prefs->ClearPref(kCanShowFolderSelectionNudge);
dpapad8ad510132022-07-29 18:21:072000 profile_prefs->ClearPref(kSettingsShowOSBanner);
2001#endif
2002
Maksim Ivanov5705be32022-08-09 22:07:482003#if BUILDFLAG(IS_CHROMEOS_ASH)
2004 // Added 08/2022.
2005 profile_prefs->ClearPref(kSecurityTokenSessionNotificationDisplayed);
2006#endif
2007
Ryan Sultanemb3b422e2022-08-12 12:13:022008#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH)
2009 // Added 08/2022.
2010 profile_prefs->ClearPref(kProfileAvatarTutorialShown);
2011#endif
2012
Tom Andersoncb3408482022-09-02 19:06:412013#if BUILDFLAG(IS_LINUX)
2014 // Added 08/2022.
2015 if (profile_prefs->HasPrefPath(prefs::kUsesSystemThemeDeprecated)) {
2016 auto migrated_theme =
2017 profile_prefs->GetBoolean(prefs::kUsesSystemThemeDeprecated)
2018 ? ui::SystemTheme::kGtk
2019 : ui::SystemTheme::kDefault;
2020 profile_prefs->SetInteger(prefs::kSystemTheme,
2021 static_cast<int>(migrated_theme));
2022 }
2023 profile_prefs->ClearPref(prefs::kUsesSystemThemeDeprecated);
2024#endif
2025
Theodore Olsauskas-Warren221e3ecd2022-09-08 08:21:242026 // Added 09/2022.
2027 profile_prefs->ClearPref(kPrivacySandboxFirstPartySetsDataAccessAllowed);
2028
Colin Kincaidf11f8562022-09-14 15:41:062029#if BUILDFLAG(IS_CHROMEOS_ASH)
2030 // Added 09/2022.
2031 profile_prefs->ClearPref(kClipboardHistoryNewFeatureBadgeCount);
2032#endif // BUILDFLAG(IS_CHROMEOS_ASH)
2033
Jan Keitel4707c1f2022-11-30 11:08:592034// Added 09/2022.
Jan Keitel98b2cc42022-09-20 05:38:392035#if BUILDFLAG(IS_ANDROID)
Jan Keitelbb6f6472022-09-26 13:36:382036 auto migrate_shared_pref = [profile_prefs](const std::string& source,
2037 const std::string& target) {
2038 if (absl::optional<bool> shared_pref =
2039 android::shared_preferences::GetAndClearBoolean(source);
2040 shared_pref) {
2041 profile_prefs->SetBoolean(target, shared_pref.value());
2042 }
2043 };
2044
Clemens Arbesser46cb4f72022-12-07 15:08:172045 // These settings will also need to be deleted from ChromePreferenceKeys.java.
Jan Keitel4707c1f2022-11-30 11:08:592046 migrate_shared_pref(kDeprecatedAutofillAssistantConsent,
2047 kAutofillAssistantConsent);
2048 migrate_shared_pref(kDeprecatedAutofillAssistantEnabled,
2049 kAutofillAssistantEnabled);
2050 migrate_shared_pref(kDeprecatedAutofillAssistantTriggerScriptsEnabled,
2051 kAutofillAssistantTriggerScriptsEnabled);
2052 migrate_shared_pref(kDeprecatedAutofillAssistantTriggerScriptsIsFirstTimeUser,
2053 kAutofillAssistantTriggerScriptsIsFirstTimeUser);
Jan Keitel98b2cc42022-09-20 05:38:392054#endif
2055
Kirubel Aklilud8f571c92022-09-22 16:37:442056 // Added 09/2022.
2057 profile_prefs->ClearPref(kFirstPartySetsEnabled);
2058
Jonathan Freedff18fb6a2022-10-17 20:46:292059 // Added 10/2022
David Roger877bdc72022-10-19 09:38:512060#if BUILDFLAG(IS_ANDROID)
Jonathan Freedff18fb6a2022-10-17 20:46:292061 feed::MigrateObsoleteProfilePrefsOct_2022(profile_prefs);
2062#endif // BUILDFLAG(IS_ANDROID)
Peter Birk Pakkenbergd74c6f82022-11-08 17:44:382063 profile_prefs->ClearPref(origin_trials::kOriginTrialPrefKey);
Jonathan Freedff18fb6a2022-10-17 20:46:292064
David Roger877bdc72022-10-19 09:38:512065 // Once this migration is complete, the tracked preference
2066 // `kGoogleServicesLastAccountIdDeprecated` can be removed.
2067 if (profile_prefs->HasPrefPath(
2068 prefs::kGoogleServicesLastAccountIdDeprecated)) {
2069 std::string account_id =
2070 profile_prefs->GetString(prefs::kGoogleServicesLastAccountIdDeprecated);
2071 profile_prefs->ClearPref(prefs::kGoogleServicesLastAccountIdDeprecated);
2072 bool is_email = account_id.find('@') != std::string::npos;
2073 if (!is_email && !account_id.empty())
2074 profile_prefs->SetString(prefs::kGoogleServicesLastGaiaId, account_id);
2075 }
2076
Martin Kreichgauerc86cc652022-10-28 16:52:042077 // Added 10/2022.
2078#if BUILDFLAG(ENABLE_EXTENSIONS)
2079 profile_prefs->ClearPref(kLoadCryptoTokenExtension);
2080#endif
2081
Yulun Wu066dab712022-11-01 17:20:242082#if BUILDFLAG(IS_CHROMEOS_ASH)
2083 // Added 10/2022.
2084 profile_prefs->ClearPref(kSuggestedContentInfoShownInLauncher);
2085 profile_prefs->ClearPref(kSuggestedContentInfoDismissedInLauncher);
2086#endif // BUILDFLAG(IS_CHROMEOS_ASH)
2087
Jan Keitel4707c1f2022-11-30 11:08:592088 // Added 11/2022.
2089 profile_prefs->ClearPref(kAutofillAssistantEnabled);
2090 profile_prefs->ClearPref(kAutofillAssistantConsent);
2091 profile_prefs->ClearPref(kAutofillAssistantTriggerScriptsEnabled);
2092 profile_prefs->ClearPref(kAutofillAssistantTriggerScriptsIsFirstTimeUser);
2093
Mikel Astiz823b71012022-12-07 09:57:022094 // Added 12/2022.
2095 profile_prefs->ClearPref(
2096 reading_list::prefs::kDeprecatedReadingListHasUnseenEntries);
2097
Dominic Battre645d42342020-12-04 16:14:102098 // Please don't delete the following line. It is used by PRESUBMIT.py.
2099 // END_MIGRATE_OBSOLETE_PROFILE_PREFS
Scott Littlec463f3362022-02-15 18:44:242100
2101 // IMPORTANT NOTE: This code is *not* run on iOS Chrome. If a pref is migrated
2102 // or cleared here, and that pref is also used in iOS Chrome, it may also need
2103 // to be migrated or cleared specifically for iOS as well. This could be by
2104 // doing the migration in feature code that's called by all platforms instead
2105 // of here, or by calling migration code in the appropriate place for iOS
2106 // specifically, e.g. ios/chrome/browser/prefs/browser_prefs.mm.
[email protected]102253f2012-12-14 17:00:582107}