blob: e3195014acac1ef4eb41c920d4fa85cc4550b925 [file] [log] [blame]
[email protected]e41982a72012-11-20 07:16:511// Copyright 2012 The Chromium Authors. All rights reserved.
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"
[email protected]1a47d7e2010-10-15 00:37:2412#include "chrome/browser/about_flags.h"
Dominic Mazzoni21fb0282019-02-13 18:32:4713#include "chrome/browser/accessibility/accessibility_labels_service.h"
James Wallace-Lee25a1b05e2018-07-24 00:06:3114#include "chrome/browser/accessibility/accessibility_ui.h"
[email protected]7a25d872012-05-21 19:14:1315#include "chrome/browser/accessibility/invert_bubble_prefs.h"
Robert Ogden8e7116ea2019-07-25 18:54:0816#include "chrome/browser/availability/availability_prober.h"
[email protected]b1de2c72013-02-06 02:45:4717#include "chrome/browser/browser_process_impl.h"
[email protected]bca18382012-06-25 19:15:2318#include "chrome/browser/chrome_content_browser_client.h"
Jana Grill784b1e52020-06-26 18:22:1219#include "chrome/browser/chromeos/policy/adb_sideloading_allowance_mode_policy_handler.h"
Andreea Costinasc4b76ff2019-04-11 15:52:1320#include "chrome/browser/chromeos/policy/tpm_auto_update_mode_policy_handler.h"
Jimmy Gonga07ccf12020-06-18 00:32:3621#include "chrome/browser/chromeos/printing/print_management/printing_manager_factory.h"
Mattias Nissler980f2aa52019-02-13 13:21:4922#include "chrome/browser/chromeos/scheduler_configuration_manager.h"
sorinebcfc8dd2016-08-12 21:57:1823#include "chrome/browser/component_updater/component_updater_prefs.h"
[email protected]a6d36cc2011-02-23 00:39:4824#include "chrome/browser/custom_handlers/protocol_handler_registry.h"
Tarun Bansal2a09d3b2020-05-28 16:06:2725#include "chrome/browser/data_use_measurement/chrome_data_use_measurement.h"
[email protected]70019152012-12-19 11:44:1926#include "chrome/browser/devtools/devtools_window.h"
[email protected]e5dc4222010-08-30 22:16:3227#include "chrome/browser/download/download_prefs.h"
dmurph93fa43b2017-02-07 23:45:1628#include "chrome/browser/engagement/important_sites_util.h"
Dominique Fauteux-Chapleau556bb84f2020-04-20 22:06:2929#include "chrome/browser/enterprise/connectors/connectors_prefs.h"
[email protected]ed2b1002011-05-25 14:12:1030#include "chrome/browser/external_protocol/external_protocol_handler.h"
[email protected]1b3588d2012-10-10 21:17:2531#include "chrome/browser/first_run/first_run.h"
[email protected]e6933d2a2013-03-12 22:32:2132#include "chrome/browser/gpu/gpu_mode_manager.h"
[email protected]5e9d1f72011-01-19 14:15:2333#include "chrome/browser/intranet_redirect_detector.h"
Avi Drissmand30927342018-05-22 15:04:2734#include "chrome/browser/lifetime/browser_shutdown.h"
[email protected]cd80cce2013-12-02 15:19:1935#include "chrome/browser/media/media_device_id_salt.h"
Becca Hughes6354b6b2017-08-31 22:01:5536#include "chrome/browser/media/media_engagement_service.h"
John Rummelle5621c12017-09-05 23:52:1037#include "chrome/browser/media/media_storage_id_salt.h"
Derek Cheng23a01402018-07-24 13:38:1438#include "chrome/browser/media/router/media_router_feature.h"
mcasasa2023ab2016-09-08 01:06:3639#include "chrome/browser/media/webrtc/media_capture_devices_dispatcher.h"
Evan Stade32d635a2020-04-03 18:51:2540#include "chrome/browser/media/webrtc/permission_bubble_media_access_handler.h"
Henrik Grunelle11045a2019-04-12 09:27:2741#include "chrome/browser/media/webrtc/system_media_capture_permissions_stats_mac.h"
Sebastien Marchand5a63997a2019-09-27 19:15:3442#include "chrome/browser/memory/enterprise_memory_limit_pref_observer.h"
[email protected]4a55a712014-06-08 16:50:3443#include "chrome/browser/metrics/chrome_metrics_service_client.h"
Eric Secklera5c24e12018-11-28 16:09:2044#include "chrome/browser/net/net_error_tab_helper.h"
[email protected]ba85a602014-06-28 20:37:1245#include "chrome/browser/net/prediction_options.h"
Matt Menkecfef87d2017-08-03 13:03:0646#include "chrome/browser/net/profile_network_context_service.h"
Ben Schwartz135746c2020-05-14 04:37:0347#include "chrome/browser/net/secure_dns_util.h"
Matt Menke4dfb375c2018-06-13 18:06:3148#include "chrome/browser/net/system_network_context_manager.h"
Anita Woodruffda0cdb642017-08-22 18:36:5049#include "chrome/browser/notifications/notification_channels_provider_android.h"
Tom Anderson1ef51d032020-02-11 01:05:0850#include "chrome/browser/notifications/notification_display_service_impl.h"
peterc4007912015-07-31 21:13:3751#include "chrome/browser/notifications/notifier_state_tracker.h"
Sharon Yangc6706902018-07-16 13:06:1952#include "chrome/browser/notifications/platform_notification_service_impl.h"
Balazs Engedy715b0ec2019-12-04 15:11:4553#include "chrome/browser/permissions/quiet_notification_permission_ui_state.h"
Pavol Markodebb0ff2018-05-07 18:35:4154#include "chrome/browser/policy/developer_tools_policy_handler.h"
Alexander Hendrich25f5ad72019-09-11 12:10:5255#include "chrome/browser/policy/webusb_allow_devices_for_urls_policy_handler.h"
[email protected]24f95242014-02-10 17:55:2856#include "chrome/browser/prefs/chrome_pref_service_factory.h"
[email protected]4e94ab32011-08-05 05:28:2757#include "chrome/browser/prefs/incognito_mode_prefs.h"
iclelland27f4bcb2016-06-22 16:41:0358#include "chrome/browser/prefs/origin_trial_prefs.h"
[email protected]37858e52010-08-26 00:22:0259#include "chrome/browser/prefs/session_startup_pref.h"
Robert Ogdend46ffb692020-04-22 22:26:1360#include "chrome/browser/previews/previews_https_notification_infobar_decider.h"
Nikita Podguzov26222d12019-12-04 11:44:3161#include "chrome/browser/printing/print_preview_sticky_settings.h"
[email protected]1bee6ed2012-03-14 06:46:3662#include "chrome/browser/profiles/chrome_version_service.h"
[email protected]ee937fe2013-02-27 00:41:5963#include "chrome/browser/profiles/profile.h"
Thomas Tanglc67ace42019-06-07 19:31:5064#include "chrome/browser/profiles/profile_attributes_entry.h"
[email protected]8ecad5e2010-12-02 21:18:3365#include "chrome/browser/profiles/profile_impl.h"
[email protected]dee810e2011-06-27 19:43:3966#include "chrome/browser/profiles/profile_info_cache.h"
[email protected]de71ae992013-07-18 03:30:3867#include "chrome/browser/profiles/profiles_state.h"
johnmecf2da0c2015-10-28 19:42:1268#include "chrome/browser/push_messaging/push_messaging_app_identifier.h"
gab3ca4a492017-03-02 00:19:4169#include "chrome/browser/rlz/chrome_rlz_tracker_delegate.h"
[email protected]a7b8e43d2013-03-18 18:52:4370#include "chrome/browser/search/search.h"
Himanshu Jajubcf3b9292019-06-07 12:54:0771#include "chrome/browser/sharing/sharing_sync_preference.h"
Ryan Sleevi4689ad32018-04-16 19:09:0572#include "chrome/browser/ssl/ssl_config_service_manager.h"
Adrienne Walker297651292020-05-08 00:23:1873#include "chrome/browser/storage/appcache_feature_prefs.h"
rajendrant75742d42020-06-22 22:45:3374#include "chrome/browser/subresource_redirect/https_image_compression_infobar_decider.h"
avi24d693f2016-08-06 18:03:5275#include "chrome/browser/task_manager/task_manager_interface.h"
oysteine386fc9e2015-06-07 18:45:4176#include "chrome/browser/tracing/chrome_tracing_delegate.h"
[email protected]2cd4fde2012-06-26 03:10:2677#include "chrome/browser/ui/browser_ui_prefs.h"
Robert Liao741be302019-07-19 23:24:4278#include "chrome/browser/ui/hats/hats_service.h"
Keren Zhu425881df2020-09-14 21:45:0879#include "chrome/browser/ui/in_product_help/feature_promo_snooze_service.h"
[email protected]297fb7c22012-06-26 12:37:4980#include "chrome/browser/ui/network_profile_bubble.h"
[email protected]9ce7cb42011-12-07 18:53:0781#include "chrome/browser/ui/prefs/prefs_tab_helper.h"
[email protected]62f77772011-02-23 19:45:4282#include "chrome/browser/ui/search_engines/keyword_editor_controller.h"
Kristi Park6a5ed4d2020-01-27 20:24:0583#include "chrome/browser/ui/send_tab_to_self/send_tab_to_self_bubble_controller.h"
[email protected]b56e2e32012-05-11 21:18:0484#include "chrome/browser/ui/tabs/pinned_tab_codec.h"
Livvie Lin9141d0f132020-03-23 22:47:0485#include "chrome/browser/ui/toolbar/chrome_location_bar_model_delegate.h"
[email protected]265a1492011-02-27 05:58:0786#include "chrome/browser/ui/webui/flags_ui.h"
[email protected]7c5c6f3a2011-04-28 19:56:4987#include "chrome/browser/ui/webui/ntp/new_tab_ui.h"
Nicolas Ouellet-Payeur4dbdf1e52018-08-06 21:51:0288#include "chrome/browser/ui/webui/print_preview/policy_settings.h"
Xing Liu7252b8d2020-01-22 22:12:4789#include "chrome/browser/updates/announcement_notification/announcement_notification_service.h"
Alexey Baskakov396edb92018-08-02 05:11:4290#include "chrome/browser/web_applications/web_app_provider.h"
Martin Kreichgauer0e1b15ef2018-06-20 02:59:5091#include "chrome/browser/webauthn/chrome_authenticator_request_delegate.h"
Scott Violet6200d332018-02-23 21:29:2392#include "chrome/common/buildflags.h"
[email protected]f87919d72011-02-02 18:46:1693#include "chrome/common/pref_names.h"
Ayu Ishiifbb1fad2020-06-22 20:15:0794#include "chrome/common/secure_origin_allowlist.h"
Moe Ahmadi173b0a2b2018-08-03 17:35:5195#include "components/autofill/core/common/autofill_prefs.h"
Clark DuVall8236b6a82020-05-28 22:54:3296#include "components/blocked_content/safe_browsing_triggered_popup_blocker.h"
ioanapa8bfbc72016-09-07 16:09:0597#include "components/browsing_data/core/pref_names.h"
Doug Turner9e79cf0c2018-04-05 21:32:3098#include "components/certificate_transparency/pref_names.h"
mukai8eaec822014-10-25 17:53:1699#include "components/content_settings/core/browser/host_content_settings_map.h"
John Abd-El-Malek89a5f3a2019-06-14 18:21:53100#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_prefs.h"
[email protected]6a5b0712014-07-16 00:30:10101#include "components/dom_distiller/core/distilled_page_prefs.h"
Katie D1ca4328b2020-02-19 18:08:47102#include "components/dom_distiller/core/dom_distiller_features.h"
103#include "components/dom_distiller/core/pref_names.h"
sdefresne8593e6432015-12-01 12:38:08104#include "components/flags_ui/pref_service_flags_storage.h"
Brandon Wyliec7a94502018-10-18 18:43:25105#include "components/image_fetcher/core/cache/image_cache.h"
Anthony Vallee-Dubois43fded9702020-06-19 16:30:38106#include "components/invalidation/impl/fcm_invalidation_service.h"
Tanja Gornak5c8b5d952018-10-12 14:39:54107#include "components/invalidation/impl/invalidator_registrar_with_memory.h"
Marc Treib8c29f0c2019-12-19 12:48:07108#include "components/invalidation/impl/per_user_topic_subscription_manager.h"
Anthony Vallee-Dubois6f993122018-09-17 16:13:28109#include "components/language/content/browser/geo_language_provider.h"
Alexandre Frechette38f4ef92019-02-25 16:31:57110#include "components/language/content/browser/ulp_language_code_locator/ulp_language_code_locator.h"
Alexandre Frechette572755b2019-02-13 22:30:20111#include "components/language/core/browser/language_prefs.h"
Joe DeBlasio59db500b2020-08-21 00:37:35112#include "components/lookalikes/core/lookalike_url_util.h"
Mikel Astizf4226912020-10-19 19:10:37113#include "components/metrics/demographics/user_demographics.h"
Peter Wen45025ea2018-09-17 15:16:27114#include "components/metrics/metrics_pref_names.h"
[email protected]d0ab865b2014-06-04 19:41:34115#include "components/network_time/network_time_tracker.h"
treibbb0c5af52016-12-09 17:34:15116#include "components/ntp_tiles/most_visited_sites.h"
Scott Violet9ae82892018-03-01 18:38:12117#include "components/offline_pages/buildflags/buildflags.h"
Travis Skare27cee15c2018-07-19 14:34:13118#include "components/omnibox/browser/document_provider.h"
Moe Ahmadi1266de82020-04-10 17:19:53119#include "components/omnibox/browser/omnibox_prefs.h"
blundell2102f7c2015-07-09 10:00:53120#include "components/omnibox/browser/zero_suggest_provider.h"
Sophie Chang5ff4b942019-05-23 20:04:32121#include "components/optimization_guide/optimization_guide_prefs.h"
melandory444f85f2015-09-07 13:32:42122#include "components/password_manager/core/browser/password_bubble_experiment.h"
[email protected]1f730bd2014-02-28 15:11:32123#include "components/password_manager/core/browser/password_manager.h"
Vasilii Sukhanovdd791ee2019-06-24 12:11:59124#include "components/password_manager/core/common/password_manager_pref_names.h"
anthonyvd6a43b932017-05-11 18:39:27125#include "components/payments/core/payment_prefs.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"
David Bienvenu554a2592020-02-13 20:20:54128#include "components/policy/core/common/policy_pref_names.h"
brettw03e61962016-03-15 06:27:04129#include "components/policy/core/common/policy_statistics_collector.h"
[email protected]f0c8c4992014-05-15 17:37:26130#include "components/pref_registry/pref_registry_syncable.h"
Martin Šrámek5921f6312020-03-25 09:31:47131#include "components/prefs/pref_registry.h"
brettwb1fc1b82016-02-02 00:19:08132#include "components/prefs/pref_registry_simple.h"
133#include "components/prefs/pref_service.h"
abhishek.a2171c612852015-08-31 10:48:19134#include "components/proxy_config/pref_proxy_config_tracker_impl.h"
nzolghadrd87a308d2016-12-07 15:45:56135#include "components/rappor/rappor_service_impl.h"
Ali Jumafb3dc1f2020-01-07 17:33:47136#include "components/safe_browsing/core/common/safe_browsing_prefs.h"
[email protected]0915b352014-06-25 19:58:14137#include "components/search_engines/template_url_prepopulate_data.h"
Carlos IL06e6c8c2020-07-28 00:25:19138#include "components/security_interstitials/content/insecure_form_blocking_page.h"
Colin Blundell7657b402020-02-25 09:46:50139#include "components/security_interstitials/content/stateful_ssl_host_state_delegate.h"
Mikel Astizf61f4ba02018-06-01 10:50:19140#include "components/sessions/core/session_id_generator.h"
Henrique Ferreiro94eb46f2019-07-03 14:38:56141#include "components/signin/public/identity_manager/identity_manager.h"
Eric Robinson49f19b62018-09-17 21:28:15142#include "components/subresource_filter/content/browser/ruleset_service.h"
maxbogue2f960e52016-10-07 01:24:15143#include "components/sync/base/sync_prefs.h"
Jeffrey Cohen053be24d2019-07-23 23:44:05144#include "components/sync_device_info/device_info_prefs.h"
maxbogueea16ff412016-10-28 16:35:29145#include "components/sync_preferences/pref_service_syncable.h"
Mikel Astiz0889b2be2018-09-25 16:20:41146#include "components/sync_sessions/session_sync_prefs.h"
[email protected]81135072014-02-14 14:11:02147#include "components/translate/core/browser/translate_prefs.h"
wafflesd2d9a332016-04-09 01:59:57148#include "components/update_client/update_client.h"
blundell0300cdea2015-09-03 12:47:44149#include "components/variations/service/variations_service.h"
[email protected]f3b1a082011-11-18 00:34:30150#include "content/public/browser/render_process_host.h"
Scott Violetc8240b02018-03-08 22:03:59151#include "extensions/buildflags/buildflags.h"
[email protected]ad66db12014-07-10 12:43:47152#include "net/http/http_server_properties_manager.h"
Scott Violet02e38b92018-03-27 23:42:14153#include "ppapi/buildflags/buildflags.h"
Scott Violet318a55f2018-03-30 19:08:19154#include "printing/buildflags/buildflags.h"
Scott Violeta5f7ba12018-04-02 22:03:40155#include "rlz/buildflags/buildflags.h"
[email protected]a814d8632009-01-31 20:18:52156
Denis Kuznetsov32099f32017-12-15 14:04:57157#if BUILDFLAG(ENABLE_BACKGROUND_MODE)
thestige4155842014-10-20 18:58:02158#include "chrome/browser/background/background_mode_manager.h"
159#endif
160
brettw00899e62016-11-12 02:10:17161#if BUILDFLAG(ENABLE_EXTENSIONS)
je_julie.kim7fbb5a1a2015-02-09 17:26:05162#include "chrome/browser/accessibility/animation_policy_prefs.h"
Dominick Ng6ff51052018-07-06 05:30:20163#include "chrome/browser/apps/platform_apps/shortcut_manager.h"
[email protected]17510602014-06-05 11:02:28164#include "chrome/browser/extensions/activity_log/activity_log.h"
165#include "chrome/browser/extensions/api/commands/command_service.h"
Adam Langley4da8d112017-11-30 06:24:01166#include "chrome/browser/extensions/api/cryptotoken_private/cryptotoken_private_api.h"
[email protected]17510602014-06-05 11:02:28167#include "chrome/browser/extensions/api/tabs/tabs_api.h"
[email protected]d5a74be2014-08-08 01:01:27168#include "chrome/browser/extensions/extension_web_ui.h"
rdevlin.cronin81d35162017-05-31 15:44:48169#include "chrome/browser/extensions/ntp_overridden_bubble_delegate.h"
avib896c712015-12-26 02:10:43170#include "chrome/browser/ui/toolbar/toolbar_actions_bar.h"
Devlin Cronin71f0f532018-04-26 16:35:06171#include "chrome/browser/ui/webui/extensions/extensions_ui.h"
tbarzicfa3c7ef62017-04-17 23:12:02172#include "extensions/browser/api/audio/audio_api.h"
afakhry2bd481832016-06-16 16:17:24173#include "extensions/browser/api/runtime/runtime_api.h"
[email protected]d5a74be2014-08-08 01:01:27174#include "extensions/browser/extension_prefs.h"
James Hawkins1d1dc7e02018-03-02 22:11:54175#if defined(OS_CHROMEOS)
Aya ElAttarb4f7a5f2020-03-05 00:47:24176#include "chrome/browser/chromeos/extensions/extensions_permissions_tracker.h"
Joel Hockey7fb974342019-06-27 23:35:05177#include "chrome/browser/chromeos/guest_os/guest_os_share_path.h"
Lutz Justenbb2ad1892019-04-24 12:46:18178#include "chrome/browser/chromeos/kerberos/kerberos_credentials_manager.h"
James Hawkins5330caef2018-03-05 21:00:28179#include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_service.h"
Aya ElAttar3b017952020-03-12 19:29:17180#include "chrome/browser/chromeos/login/existing_user_controller.h"
Aya ElAttare58ee2b2020-03-25 13:08:26181#include "chrome/browser/chromeos/policy/system_features_disable_list_policy_handler.h"
Andreea Costinas33cec95d2020-08-06 14:47:18182#include "chrome/browser/chromeos/policy/system_proxy_manager.h"
A Olsen5806d6552019-01-22 09:58:20183#include "chrome/browser/chromeos/settings/stats_reporting_controller.h"
Xiaochu Liu48ab5932018-05-11 03:44:04184#include "chrome/browser/component_updater/metadata_table_chromeos.h"
Lei Zhang6cb9b842019-12-16 20:29:12185#endif // defined(OS_CHROMEOS)
brettw00899e62016-11-12 02:10:17186#endif // BUILDFLAG(ENABLE_EXTENSIONS)
[email protected]17510602014-06-05 11:02:28187
jianliac940cb2017-06-07 05:13:08188#if BUILDFLAG(ENABLE_OFFLINE_PAGES)
Dmitry Titov4d2bde02017-06-30 05:29:52189#include "chrome/browser/offline_pages/prefetch/offline_metrics_collector_impl.h"
Justin DeWittfa60f892017-07-26 01:33:33190#include "chrome/browser/offline_pages/prefetch/prefetch_background_task_handler_impl.h"
Dan Harrington57be4a02018-09-14 17:50:19191#include "components/offline_pages/core/prefetch/prefetch_prefs.h"
jianliac940cb2017-06-07 05:13:08192#endif
193
bauerbecab4f52017-03-13 20:16:41194#if BUILDFLAG(ENABLE_PLUGINS)
Nicholas Verned391eae2017-11-13 02:41:38195#include "chrome/browser/plugins/plugin_info_host_impl.h"
bauerb4da36132014-12-26 19:53:13196#include "chrome/browser/plugins/plugins_resource_service.h"
Lei Zhang244db525f2020-01-23 22:42:47197#include "chrome/browser/renderer_host/pepper/device_id_fetcher.h"
bauerb4da36132014-12-26 19:53:13198#endif
199
thestig4888f292016-10-07 23:57:55200#if BUILDFLAG(ENABLE_SERVICE_DISCOVERY)
[email protected]9544e562013-09-21 04:20:55201#include "chrome/browser/ui/webui/local_discovery/local_discovery_ui.h"
202#endif
203
Lei Zhang6cb9b842019-12-16 20:29:12204#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
205#include "chrome/browser/supervised_user/child_accounts/child_account_service.h"
Robbie McElrath2be691ca2020-08-17 20:14:48206#include "chrome/browser/supervised_user/supervised_user_allowlist_service.h"
Lei Zhang6cb9b842019-12-16 20:29:12207#include "chrome/browser/supervised_user/supervised_user_service.h"
Bettina Deaf3dac202017-09-16 20:53:22208#endif
209
thestigf2a0fa92016-09-07 09:37:29210#if defined(OS_ANDROID)
zpengdb4a58e2017-01-10 17:40:32211#include "chrome/browser/android/bookmarks/partner_bookmarks_shim.h"
Dmitry Titov5f6cfb42018-10-05 18:52:14212#include "chrome/browser/android/explore_sites/history_statistics_reporter.h"
zpengdb4a58e2017-01-10 17:40:32213#include "chrome/browser/android/ntp/recent_tabs_page_prefs.h"
Kenichi Ishibashi35ac7132017-12-08 03:44:30214#include "chrome/browser/android/oom_intervention/oom_intervention_decider.h"
mlliuee3a405c2016-10-28 22:34:52215#include "chrome/browser/android/preferences/browser_prefs_android.h"
Patrick Noland87d9f842019-01-16 03:52:02216#include "chrome/browser/android/usage_stats/usage_stats_bridge.h"
Sky Maliced8eb4302020-08-03 05:46:44217#include "chrome/browser/first_run/android/first_run_prefs.h"
John Rummell4703af62019-02-15 02:31:00218#include "chrome/browser/media/android/cdm/media_drm_origin_id_manager.h"
Christopher Thompson2602fea2019-11-26 19:36:54219#include "chrome/browser/ssl/known_interception_disclosure_infobar_delegate.h"
Shakti Sahu623d00c2020-09-22 00:32:42220#include "chrome/browser/video_tutorials/prefs.h"
Glen Robertson8a825ae4f2020-09-16 06:50:08221#include "components/cdm/browser/media_drm_storage_impl.h" // nogncheck crbug.com/1125897
Sky Malicedd28f282018-06-14 03:22:24222#include "components/feed/buildflags.h"
Dan Harringtonb0ffac0a2020-03-06 22:56:36223#include "components/feed/core/shared_prefs/pref_names.h"
Sebastien9f5e1d12019-12-19 20:09:57224#include "components/games/core/games_prefs.h"
zpengdb4a58e2017-01-10 17:40:32225#include "components/ntp_tiles/popular_sites_impl.h"
Clark DuVall600abea2020-03-23 16:16:17226#include "components/permissions/contexts/geolocation_permission_context_android.h"
Xing Liu0327d832020-05-15 21:07:03227#include "components/query_tiles/tile_service_prefs.h"
Dan Harringtonc4cedb3e2020-01-30 04:08:52228#include "components/feed/core/common/pref_names.h"
Greg Thompson8bcd799b2018-08-10 09:49:33229#else // defined(OS_ANDROID)
Abigail Klein4a4ac272020-04-07 17:47:15230#include "chrome/browser/accessibility/caption_controller.h"
Dominique Fauteux-Chapleaudfe386b2020-03-25 18:52:36231#include "chrome/browser/enterprise/reporting/prefs.h"
peter9f4490a2017-01-27 00:58:36232#include "chrome/browser/gcm/gcm_product_util.h"
Lei Zhang6cb9b842019-12-16 20:29:12233#include "chrome/browser/media/unified_autoplay_config.h"
Michael Giuffridab41fa5c42017-11-13 23:30:57234#include "chrome/browser/metrics/tab_stats_tracker.h"
Josh Nohle13ea6b432020-07-21 20:46:59235#include "chrome/browser/nearby_sharing/common/nearby_share_prefs.h"
Kyle Milka503bba32018-06-08 16:23:05236#include "chrome/browser/search/instant_service.h"
Dan Beam91995d12019-09-21 04:48:10237#include "chrome/browser/search/promos/promo_service.h"
Esmael El-Moslimany75e33762020-10-21 18:26:43238#include "chrome/browser/search/recipe_tasks/recipe_tasks_service.h"
Kyle Milka779c9ce2019-01-18 16:39:22239#include "chrome/browser/search/search_suggest/search_suggest_service.h"
Esmael El-Moslimany75e33762020-10-21 18:26:43240#include "chrome/browser/search/shopping_tasks/shopping_tasks_service.h"
thestigc91176f42014-10-28 20:16:35241#include "chrome/browser/signin/signin_promo.h"
zpengdb4a58e2017-01-10 17:40:32242#include "chrome/browser/ui/startup/startup_browser_creator.h"
rbpotterbe128632019-11-22 04:50:42243#include "chrome/browser/ui/webui/history/foreign_session_handler.h"
Tibor Goldschwendt53ca78b2020-10-07 19:56:18244#include "chrome/browser/ui/webui/new_tab_page/new_tab_page_handler.h"
John Lee136759f02019-04-15 20:19:11245#include "chrome/browser/ui/webui/settings/settings_ui.h"
Greg Thompson8bcd799b2018-08-10 09:49:33246#include "chrome/browser/upgrade_detector/upgrade_detector.h"
Lei Zhang6cb9b842019-12-16 20:29:12247#include "components/ntp_tiles/custom_links_manager_impl.h"
Greg Thompson8bcd799b2018-08-10 09:49:33248#endif // defined(OS_ANDROID)
thestigc91176f42014-10-28 20:16:35249
[email protected]9acc48602009-11-30 21:18:51250#if defined(OS_CHROMEOS)
Bailey Berro1ee1c122019-10-18 20:52:44251#include "ash/public/cpp/ash_pref_names.h"
Xiyuan Xia5a8c4172019-05-13 16:23:48252#include "ash/public/cpp/ash_prefs.h"
peletskyif19358fd2016-11-08 16:21:29253#include "chrome/browser/chromeos/app_mode/arc/arc_kiosk_app_manager.h"
[email protected]1637c192013-02-16 04:00:13254#include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h"
Anatoliy Potapchuk29a95cb32019-10-16 10:27:57255#include "chrome/browser/chromeos/app_mode/kiosk_cryptohome_remover.h"
Anatoliy Potapchuk02e248492019-10-21 16:19:26256#include "chrome/browser/chromeos/app_mode/web_app/web_kiosk_app_manager.h"
James Cookc542d992019-11-08 23:34:24257#include "chrome/browser/chromeos/apps/apk_web_app_service.h"
msramek56e72e82016-11-17 16:14:47258#include "chrome/browser/chromeos/arc/policy/arc_policy_bridge.h"
Yusuke Sato00ca17d2019-10-04 21:56:57259#include "chrome/browser/chromeos/arc/session/arc_session_manager.h"
Archie Pusakad68d92f2019-10-28 05:45:25260#include "chrome/browser/chromeos/bluetooth/debug_logs_manager.h"
Michael Ershov0601f5be2020-02-19 12:10:13261#include "chrome/browser/chromeos/cert_provisioning/cert_provisioning_common.h"
Xiqi Ruanf4c975e2020-10-15 17:47:05262#include "chrome/browser/chromeos/child_accounts/family_user_chrome_activity_metrics.h"
Toby Huangff1e2842020-09-01 06:05:42263#include "chrome/browser/chromeos/child_accounts/family_user_metrics_service.h"
Xiqi Ruane05b7ab2020-08-11 20:59:10264#include "chrome/browser/chromeos/child_accounts/family_user_session_metrics.h"
Aga Wronskaac6cf362019-02-26 21:36:55265#include "chrome/browser/chromeos/child_accounts/parent_access_code/parent_access_service.h"
Sarah Hua0b666a2018-05-22 16:45:38266#include "chrome/browser/chromeos/child_accounts/screen_time_controller.h"
yilkal2aaa55662020-02-25 01:38:30267#include "chrome/browser/chromeos/child_accounts/time_limits/app_activity_registry.h"
yilkalb8065b252020-01-09 01:35:51268#include "chrome/browser/chromeos/child_accounts/time_limits/app_time_controller.h"
Renee Wrightc41d5432018-04-26 05:27:37269#include "chrome/browser/chromeos/crostini/crostini_pref_names.h"
Josh Nohleb416b832020-05-20 00:43:01270#include "chrome/browser/chromeos/cryptauth/client_app_metadata_provider_service.h"
Kyle Horimoto776196a2018-04-03 17:29:17271#include "chrome/browser/chromeos/cryptauth/cryptauth_device_id_provider_impl.h"
Satoru Takabayashi876d4e62014-12-03 04:52:24272#include "chrome/browser/chromeos/customization/customization_document.h"
[email protected]a5058a22013-08-29 20:49:51273#include "chrome/browser/chromeos/extensions/echo_private_api.h"
Alexander Hendrichcafd3a2e2019-06-27 15:05:35274#include "chrome/browser/chromeos/extensions/login_screen/login/login_api.h"
Nikita Podguzovf84ee492020-01-23 13:22:31275#if defined(USE_CUPS)
276#include "chrome/browser/chromeos/extensions/printing/printing_api_handler.h"
277#endif
Nicholas Hollingumf4c11e32020-10-05 22:52:57278#include "chrome/browser/chromeos/borealis/borealis_prefs.h"
Anastasiia Nikolaienko57d479d42020-04-24 14:17:03279#include "chrome/browser/chromeos/child_accounts/secondary_account_consent_logger.h"
mtomaszbd1170f2014-10-21 05:34:18280#include "chrome/browser/chromeos/file_system_provider/registry.h"
[email protected]980d5f9e2013-12-17 17:47:08281#include "chrome/browser/chromeos/first_run/first_run.h"
Joel Hockey7fb974342019-06-27 23:35:05282#include "chrome/browser/chromeos/guest_os/guest_os_pref_names.h"
Toni Barzic14329d02017-07-17 21:59:12283#include "chrome/browser/chromeos/lock_screen_apps/state_controller.h"
jdufault59d6f53d2017-02-15 19:19:37284#include "chrome/browser/chromeos/login/demo_mode/demo_mode_detector.h"
Toni Barzic75610ae2018-08-17 20:33:07285#include "chrome/browser/chromeos/login/demo_mode/demo_mode_resources_remover.h"
Wenzhao Zangc7402e82018-10-23 17:49:17286#include "chrome/browser/chromeos/login/demo_mode/demo_session.h"
Aga Wronskad2535c42018-08-24 15:56:22287#include "chrome/browser/chromeos/login/demo_mode/demo_setup_controller.h"
xiaoyinhb849e9c12017-04-21 21:40:33288#include "chrome/browser/chromeos/login/quick_unlock/fingerprint_storage.h"
Jacob Dufaultf7918c92018-04-04 20:56:28289#include "chrome/browser/chromeos/login/quick_unlock/pin_storage_prefs.h"
sammiequon250289992016-11-08 07:22:04290#include "chrome/browser/chromeos/login/quick_unlock/quick_unlock_utils.h"
A Olsencf2d7cf2019-04-16 12:04:26291#include "chrome/browser/chromeos/login/saml/saml_profile_prefs.h"
Victor Hsiehca89ad002019-10-28 20:08:07292#include "chrome/browser/chromeos/login/screens/enable_adb_sideloading_screen.h"
Mattias Nissler41b4a5d2017-09-22 15:37:55293#include "chrome/browser/chromeos/login/screens/reset_screen.h"
Fabian Sommeread50122020-10-19 12:19:59294#include "chrome/browser/chromeos/login/security_token_session_controller.h"
[email protected]295ca1a72014-07-01 16:14:31295#include "chrome/browser/chromeos/login/session/user_session_manager.h"
yilkalfe049482020-09-03 03:57:03296#include "chrome/browser/chromeos/login/signin/signin_error_notifier_ash.h"
[email protected]aa8328fb2013-04-19 15:09:06297#include "chrome/browser/chromeos/login/startup_utils.h"
[email protected]83d82d42014-05-16 02:04:42298#include "chrome/browser/chromeos/login/users/avatar/user_image_manager.h"
299#include "chrome/browser/chromeos/login/users/avatar/user_image_sync_observer.h"
[email protected]4d390782014-08-15 09:22:58300#include "chrome/browser/chromeos/login/users/chrome_user_manager_impl.h"
[email protected]83d82d42014-05-16 02:04:42301#include "chrome/browser/chromeos/login/users/multi_profile_user_controller.h"
kirtika857eeac2016-11-05 00:24:26302#include "chrome/browser/chromeos/net/network_throttling_observer.h"
Olya Kalitovac869f962018-12-04 12:01:23303#include "chrome/browser/chromeos/plugin_vm/plugin_vm_pref_names.h"
Bartosz Fabianowskid4d93a72018-05-17 18:49:48304#include "chrome/browser/chromeos/policy/app_install_event_log_manager_wrapper.h"
Bartosz Fabianowski79028ae2018-02-23 17:25:03305#include "chrome/browser/chromeos/policy/app_install_event_logger.h"
Pavol Marko35bcf1a2018-05-23 15:33:07306#include "chrome/browser/chromeos/policy/auto_enrollment_client_impl.h"
[email protected]97275822014-01-21 19:30:36307#include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
[email protected]69a99822013-06-11 00:31:36308#include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h"
Aya ElAttarb54f88d2020-09-23 20:16:36309#include "chrome/browser/chromeos/policy/dlp/dlp_rules_manager.h"
rsorokin3c13ece2017-01-16 15:58:41310#include "chrome/browser/chromeos/policy/dm_token_storage.h"
Sergey Poromovd6575a0b2020-05-19 21:41:09311#include "chrome/browser/chromeos/policy/enrollment_requisition_manager.h"
Swapnil4694d412020-06-25 22:24:49312#include "chrome/browser/chromeos/policy/extension_install_event_log_manager_wrapper.h"
Nikita Podguzov39d70fb2019-06-17 18:13:14313#include "chrome/browser/chromeos/policy/external_data_handlers/device_wallpaper_image_external_data_handler.h"
Saurabh Nijhara839c17c2020-05-19 00:18:29314#include "chrome/browser/chromeos/policy/minimum_version_policy_handler.h"
[email protected]bcb94772013-12-19 14:28:58315#include "chrome/browser/chromeos/policy/policy_cert_service_factory.h"
Marcelo Almeida12d92c62019-04-15 19:00:11316#include "chrome/browser/chromeos/policy/status_collector/device_status_collector.h"
Marcelo Almeida9ef8c132019-05-13 20:19:12317#include "chrome/browser/chromeos/policy/status_collector/status_collector.h"
Jia4a1a9842018-11-22 03:45:37318#include "chrome/browser/chromeos/power/auto_screen_brightness/metrics_reporter.h"
Daniel Erat645c8652017-11-16 00:01:57319#include "chrome/browser/chromeos/power/power_metrics_reporter.h"
[email protected]9acc48602009-11-30 21:18:51320#include "chrome/browser/chromeos/preferences.h"
David Valleauce0aedfa2018-03-30 18:46:16321#include "chrome/browser/chromeos/printing/cups_printers_manager.h"
Luum Habtemariam30402882020-03-05 17:37:51322#include "chrome/browser/chromeos/printing/enterprise_printers_provider.h"
Nikita Podguzove5b8304a2019-10-08 21:36:17323#include "chrome/browser/chromeos/printing/history/print_job_history_service.h"
Yulun Wu502158732019-07-24 00:31:45324#include "chrome/browser/chromeos/release_notes/release_notes_storage.h"
[email protected]0c4d97c2012-09-01 20:47:20325#include "chrome/browser/chromeos/settings/device_settings_cache.h"
[email protected]c280dbf2013-03-19 12:17:44326#include "chrome/browser/chromeos/system/automatic_reboot_manager.h"
afakhrye8eac602015-11-10 02:31:22327#include "chrome/browser/chromeos/system/input_device_settings.h"
Anthony Vallee-Dubois85edf222020-03-24 20:30:02328#include "chrome/browser/device_identity/chromeos/device_oauth2_token_store_chromeos.h"
[email protected]a0e44ccf2013-04-19 01:48:22329#include "chrome/browser/extensions/api/enterprise_platform_keys_private/enterprise_platform_keys_private_api.h"
[email protected]5a145e82014-05-29 22:19:07330#include "chrome/browser/extensions/extension_assets_manager_chromeos.h"
xhwangc84739e2015-03-14 01:02:46331#include "chrome/browser/media/protected_media_identifier_permission_context.h"
[email protected]8304f61a2014-05-24 12:17:33332#include "chrome/browser/metrics/chromeos_metrics_provider.h"
James Cookc542d992019-11-08 23:34:24333#include "chrome/browser/ui/app_list/app_list_syncable_service.h"
334#include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h"
335#include "chrome/browser/ui/app_list/search/arc/arc_app_reinstall_search_provider.h"
Michael Giuffridab41fa5c42017-11-13 23:30:57336#include "chrome/browser/ui/ash/chrome_launcher_prefs.h"
Andreea Costinaseaec4c172019-02-04 11:57:43337#include "chrome/browser/ui/webui/certificates_handler.h"
zelidrag459b11b12014-11-14 04:05:53338#include "chrome/browser/ui/webui/chromeos/login/enable_debugging_screen_handler.h"
[email protected]8e6742a52014-05-23 14:56:22339#include "chrome/browser/ui/webui/chromeos/login/hid_detection_screen_handler.h"
[email protected]daf4b542013-07-23 17:11:27340#include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h"
Kyle Horimoto3706f3f2020-01-23 00:37:02341#include "chrome/browser/ui/webui/settings/chromeos/os_settings_ui.h"
Roman Aleksandrovd32e34e72019-05-22 17:29:50342#include "chrome/browser/upgrade_detector/upgrade_detector_chromeos.h"
jamescook9439c7392014-12-18 01:47:25343#include "chromeos/audio/audio_devices_pref_handler_impl.h"
Kush Sinha36c20c42019-03-13 19:12:57344#include "chromeos/components/account_manager/account_manager.h"
Thanh Nguyen4345a7dc2020-10-15 10:52:19345#include "chromeos/components/local_search_service/search_metrics_reporter_sync.h"
Li Lin1d647b12020-02-20 23:27:53346#include "chromeos/components/quick_answers/public/cpp/quick_answers_prefs.h"
Steven Bennetts38e9bde22019-01-03 17:31:10347#include "chromeos/constants/chromeos_switches.h"
Matthew Wang9e210652018-11-16 19:40:28348#include "chromeos/network/fast_transition_observer.h"
Jon Mann0ca42a82020-03-05 00:48:07349#include "chromeos/network/network_metadata_store.h"
stevenjb100c6202016-10-28 02:28:00350#include "chromeos/network/proxy/proxy_config_handler.h"
Xiaohui Chene5d0ff62019-10-02 00:34:04351#include "chromeos/services/assistant/public/cpp/assistant_prefs.h"
Glen Robertsona499a382020-09-02 18:11:59352#include "chromeos/services/device_sync/public/cpp/device_sync_prefs.h"
Jordy Greenblatt2265de702018-07-26 19:05:26353#include "chromeos/services/multidevice_setup/multidevice_setup_service.h"
alemate48255f3d2015-01-30 18:11:41354#include "chromeos/timezone/timezone_resolver.h"
Hidehiko Abe33e9adf2017-09-13 06:12:23355#include "components/arc/arc_prefs.h"
stevenjbf22f82e2016-10-26 21:47:38356#include "components/onc/onc_pref_names.h"
glevin5dd01a72016-03-23 23:08:12357#include "components/quirks/quirks_manager.h"
tbarzicd9a88fc92017-07-14 02:18:10358#include "extensions/browser/api/lock_screen_data/lock_screen_item_storage.h"
[email protected]86c6b9e32011-10-25 17:09:10359#else
360#include "chrome/browser/extensions/default_apps.h"
[email protected]9acc48602009-11-30 21:18:51361#endif
362
Avi Drissman2e458df2020-07-29 16:24:31363#if defined(OS_MAC)
[email protected]425f7a02014-04-29 01:51:44364#include "chrome/browser/ui/cocoa/apps/quit_with_apps_controller_mac.h"
Tom Anderson6a496032018-08-30 23:38:37365#include "chrome/browser/ui/cocoa/confirm_quit.h"
Christopher Cameron02f5c3b2020-03-26 02:13:12366#include "chrome/browser/web_applications/components/app_shim_registry_mac.h"
[email protected]2366a3a2012-10-02 20:41:14367#endif
368
[email protected]bdb8a1e2013-10-03 08:14:00369#if defined(OS_WIN)
[email protected]c5d4b1842014-06-20 21:19:50370#include "chrome/browser/component_updater/sw_reporter_installer_win.h"
Nico Webereaa08412019-08-14 01:24:37371#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
Patrick Monettebb543942019-05-17 17:45:32372#include "chrome/browser/win/conflicts/incompatible_applications_updater.h"
373#include "chrome/browser/win/conflicts/module_database.h"
374#include "chrome/browser/win/conflicts/third_party_conflicts_manager.h"
Nico Webereaa08412019-08-14 01:24:37375#endif // BUILDFLAG(GOOGLE_CHROME_BRANDING)
Rainhard Findling4d621ca2020-10-26 20:46:06376#include "chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_controller_win.h"
ftirelo46b34222017-06-19 10:36:57377#include "chrome/browser/safe_browsing/chrome_cleaner/settings_resetter_win.h"
alito856526d2017-03-03 09:16:17378#include "chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_prefs_manager.h"
[email protected]bdb8a1e2013-10-03 08:14:00379#endif
380
Avi Drissman2e458df2020-07-29 16:24:31381#if defined(OS_WIN) || defined(OS_MAC)
Will Harris265b3942019-10-21 01:01:33382#include "components/os_crypt/os_crypt.h"
383#endif
384
Avi Drissman2e458df2020-07-29 16:24:31385#if defined(OS_WIN) || defined(OS_MAC) || \
Nicolas Ouellet-Payeurbdcab0092018-10-22 14:50:33386 (defined(OS_LINUX) && !defined(OS_CHROMEOS))
Nicolas Ouellet-Payeur9a4a94d2018-09-17 15:26:11387#include "chrome/browser/browser_switcher/browser_switcher_prefs.h"
388#endif
389
thestigf2a0fa92016-09-07 09:37:29390#if !defined(OS_ANDROID) && !defined(OS_CHROMEOS)
Anthony Vallee-Dubois85edf222020-03-24 20:30:02391#include "chrome/browser/device_identity//device_oauth2_token_store_desktop.h"
Yann Dago0d896f62020-02-04 19:59:15392#include "chrome/browser/downgrade/downgrade_prefs.h"
thestigf2a0fa92016-09-07 09:37:29393#include "chrome/browser/ui/startup/default_browser_prompt.h"
394#endif
395
[email protected]ceafc462013-11-04 12:26:03396#if defined(TOOLKIT_VIEWS)
397#include "chrome/browser/ui/browser_view_prefs.h"
[email protected]ceafc462013-11-04 12:26:03398#endif
399
Becca Hughesf14a64bb2020-06-08 17:48:18400#if !defined(OS_ANDROID)
401#include "chrome/browser/media/feeds/media_feeds_service.h"
Tommy Steimelfdeeee32020-08-14 23:51:24402#include "chrome/browser/media/kaleidoscope/kaleidoscope_prefs.h"
Becca Hughesf14a64bb2020-06-08 17:48:18403#endif
404
[email protected]572f40c9b2012-07-06 20:35:33405namespace {
406
David Roger23101002019-09-10 11:24:09407// Deprecated 9/2019
408const char kGoogleServicesUsername[] = "google.services.username";
David Rogere8e83f3c2019-09-12 10:56:23409const char kGoogleServicesUserAccountId[] = "google.services.user_account_id";
Tarun Bansalbce6c2952019-09-20 19:45:02410const char kDataReductionProxySavingsClearedNegativeSystemClock[] =
411 "data_reduction.savings_cleared_negative_system_clock";
Tarun Bansal99e447d2020-03-17 10:07:56412const char kDataReductionNetworkProperties[] =
413 "data_reduction.network_properties";
David Roger23101002019-09-10 11:24:09414
Bailey Berro1ee1c122019-10-18 20:52:44415#if defined(OS_CHROMEOS)
416// Deprecated 10/2019
417const char kDisplayRotationAcceleratorDialogHasBeenAccepted[] =
418 "settings.a11y.display_rotation_accelerator_dialog_has_been_accepted";
419#endif // defined(OS_CHROMEOS)
420
Jan Wilken Dörriee4df0f92019-12-03 11:53:04421// Deprecated 11/2019
422const char kBlacklistedCredentialsNormalized[] =
423 "profile.blacklisted_credentials_normalized";
424
Vasilii Sukhanovd67cacc2020-01-17 12:52:38425// Deprecated 1/2020
Avi Drissman2e458df2020-07-29 16:24:31426#if defined(OS_MAC)
Vasilii Sukhanovd67cacc2020-01-17 12:52:38427const char kKeyCreated[] = "os_crypt.key_created";
Avi Drissman2e458df2020-07-29 16:24:31428#endif // defined(OS_MAC)
Vasilii Sukhanovd67cacc2020-01-17 12:52:38429
Marc Treibae8cac692020-01-28 12:10:12430const char kGCMChannelStatus[] = "gcm.channel_status";
431const char kGCMChannelPollIntervalSeconds[] = "gcm.poll_interval";
432const char kGCMChannelLastCheckTime[] = "gcm.check_time";
433
Marc Treib86a40c42020-02-13 17:35:41434// Deprecated 2/2020
435const char kInvalidatorClientId[] = "invalidator.client_id";
436const char kInvalidatorInvalidationState[] = "invalidator.invalidation_state";
437const char kInvalidatorSavedInvalidations[] = "invalidator.saved_invalidations";
438
wutao2e24aff2020-04-03 17:01:02439#if defined(OS_CHROMEOS)
440// Deprecated 4/2020
441const char kAmbientModeTopicSource[] = "settings.ambient_mode.topic_source";
Nikita Podguzovbdea7002020-04-10 11:30:27442
443// Deprecated 4/2020
444const char kPrintingAllowedPageSizes[] = "printing.allowed_page_sizes";
wutao2e24aff2020-04-03 17:01:02445#endif // defined(OS_CHROMEOS)
446
Todd Sahl057d9c62020-04-17 18:41:14447// Deprecated 4/2020
448const char kExcludedSchemes[] = "protocol_handler.excluded_schemes";
449
Robert Ogden54892d02020-04-28 22:36:37450// Deprecated 4/2020
451const char kPreviewsLPRHostBlacklist[] = "previews.litepage.host-blacklist";
452const char kPreviewsLPRProbeCache[] = "Availability.Prober.cache.Litepages";
453const char kPreviewsLPROriginProbeCache[] =
454 "Availability.Prober.cache.LitepagesOriginCheck";
455
Toby Huang33753282020-05-05 18:55:22456#if defined(OS_CHROMEOS)
457// Deprecated 4/2020
458const char kSupervisedUsersNextId[] = "LocallyManagedUsersNextId";
459#endif // defined(OS_CHROMEOS)
460
Carlos ILb1c3fd52020-06-17 22:12:04461// Deprecated 6/2020
462const char kStricterMixedContentTreatmentEnabled[] =
463 "security_state.stricter_mixed_content_treatment_enabled";
464
Sophie Changc4ddda6772020-07-15 15:08:32465// Deprecated 7/2020
466const char kHashedAvailablePages[] = "previews.offline_helper.available_pages";
467
Collin Baker7c1fe9732020-07-20 17:46:06468// Deprecated 7/2020
469const char kObservedSessionTime[] = "profile.observed_session_time";
470
Christian Dullweberb1917742020-09-03 17:55:57471// Deprecated 9/2020
472const char kBlockThirdPartyCookies[] = "profile.block_third_party_cookies";
473
Ravjit Singh Uppal6e388362020-09-09 19:52:22474// Deprecated 9/2020
475const char kPluginsDeprecationInfobarLastShown[] =
476 "plugins.deprecation_infobar_last_shown";
477
Jan Wilken Dörrieb5311132020-09-11 18:05:51478const char kPasswordManagerOnboardingState[] =
479 "profile.password_manager_onboarding_state";
480
481const char kWasOnboardingFeatureCheckedBefore[] =
482 "profile.was_pwm_onboarding_feature_checked_before";
483
Leonard Grey1f852a02020-10-16 13:02:46484// Deprecated 10/2020
485const char kHistoryMenuPromoShown[] = "history.menu_promo_shown";
486
Lei Zhangb76b80e32020-04-08 16:58:16487// Register local state used only for migration (clearing or moving to a new
488// key).
489void RegisterLocalStatePrefsForMigration(PrefRegistrySimple* registry) {
490 registry->RegisterBooleanPref(kGCMChannelStatus, true);
491 registry->RegisterIntegerPref(kGCMChannelPollIntervalSeconds, 0);
492 registry->RegisterInt64Pref(kGCMChannelLastCheckTime, 0);
493 registry->RegisterListPref(kInvalidatorSavedInvalidations);
494 registry->RegisterStringPref(kInvalidatorInvalidationState, std::string());
495 registry->RegisterStringPref(kInvalidatorClientId, std::string());
496
Toby Huang33753282020-05-05 18:55:22497#if defined(OS_CHROMEOS)
498 registry->RegisterIntegerPref(kSupervisedUsersNextId, 0);
499#endif // defined(OS_CHROMEOS)
Lei Zhangb76b80e32020-04-08 16:58:16500}
501
James Cook0ba192bf2017-12-01 20:53:11502// Register prefs used only for migration (clearing or moving to a new key).
503void RegisterProfilePrefsForMigration(
504 user_prefs::PrefRegistrySyncable* registry) {
David Roger23101002019-09-10 11:24:09505 registry->RegisterStringPref(kGoogleServicesUsername, std::string());
David Rogere8e83f3c2019-09-12 10:56:23506 registry->RegisterStringPref(kGoogleServicesUserAccountId, std::string());
Tarun Bansalbce6c2952019-09-20 19:45:02507 registry->RegisterInt64Pref(
508 kDataReductionProxySavingsClearedNegativeSystemClock, 0);
Tarun Bansal99e447d2020-03-17 10:07:56509 registry->RegisterDictionaryPref(kDataReductionNetworkProperties);
Bailey Berro1ee1c122019-10-18 20:52:44510
511#if defined(OS_CHROMEOS)
512 registry->RegisterBooleanPref(
513 kDisplayRotationAcceleratorDialogHasBeenAccepted, false);
514#endif // defined(OS_CHROMEOS)
Jan Wilken Dörriee4df0f92019-12-03 11:53:04515
516 registry->RegisterBooleanPref(kBlacklistedCredentialsNormalized, false);
Marc Treibae8cac692020-01-28 12:10:12517
518 registry->RegisterBooleanPref(kGCMChannelStatus, true);
519 registry->RegisterIntegerPref(kGCMChannelPollIntervalSeconds, 0);
520 registry->RegisterInt64Pref(kGCMChannelLastCheckTime, 0);
Marc Treib86a40c42020-02-13 17:35:41521
522 registry->RegisterListPref(kInvalidatorSavedInvalidations);
523 registry->RegisterStringPref(kInvalidatorInvalidationState, std::string());
524 registry->RegisterStringPref(kInvalidatorClientId, std::string());
Martin Šrámek5921f6312020-03-25 09:31:47525
Ben Schwartz135746c2020-05-14 04:37:03526 chrome_browser_net::secure_dns::RegisterProbesSettingBackupPref(registry);
wutao2e24aff2020-04-03 17:01:02527
528#if defined(OS_CHROMEOS)
529 registry->RegisterIntegerPref(kAmbientModeTopicSource, 0);
Nikita Podguzovbdea7002020-04-10 11:30:27530 registry->RegisterListPref(kPrintingAllowedPageSizes);
wutao2e24aff2020-04-03 17:01:02531#endif // defined(OS_CHROMEOS)
Todd Sahl057d9c62020-04-17 18:41:14532
533 registry->RegisterDictionaryPref(kExcludedSchemes);
Robert Ogden54892d02020-04-28 22:36:37534 registry->RegisterDictionaryPref(kPreviewsLPRHostBlacklist);
535 registry->RegisterDictionaryPref(kPreviewsLPRProbeCache);
536 registry->RegisterDictionaryPref(kPreviewsLPROriginProbeCache);
Carlos ILb1c3fd52020-06-17 22:12:04537
538 registry->RegisterBooleanPref(kStricterMixedContentTreatmentEnabled, true);
Sophie Changc4ddda6772020-07-15 15:08:32539
540 registry->RegisterDictionaryPref(kHashedAvailablePages);
Collin Baker7c1fe9732020-07-20 17:46:06541
542 registry->RegisterDictionaryPref(kObservedSessionTime);
Christian Dullweberb1917742020-09-03 17:55:57543
544 registry->RegisterBooleanPref(kBlockThirdPartyCookies, false);
Ravjit Singh Uppal6e388362020-09-09 19:52:22545
546 registry->RegisterTimePref(kPluginsDeprecationInfobarLastShown, base::Time());
Jan Wilken Dörrieb5311132020-09-11 18:05:51547
548 registry->RegisterIntegerPref(kPasswordManagerOnboardingState, 0);
549 registry->RegisterBooleanPref(kWasOnboardingFeatureCheckedBefore, false);
Leonard Grey1f852a02020-10-16 13:02:46550
551 registry->RegisterBooleanPref(kHistoryMenuPromoShown, true);
James Cook0ba192bf2017-12-01 20:53:11552}
553
[email protected]572f40c9b2012-07-06 20:35:33554} // namespace
555
[email protected]4082306d92013-02-21 14:51:01556void RegisterLocalState(PrefRegistrySimple* registry) {
Chris Hamilton65c41312020-06-10 13:14:40557 // Call outs to individual subsystems that register Local State (browser-wide)
558 // prefs en masse. See RegisterProfilePrefs for per-profile prefs. Please
559 // keep this list alphabetized.
[email protected]b1de2c72013-02-06 02:45:47560 browser_shutdown::RegisterPrefs(registry);
John Abd-El-Malek89a5f3a2019-06-14 18:21:53561 data_reduction_proxy::RegisterPrefs(registry);
Tarun Bansal2a09d3b2020-05-28 16:06:27562 data_use_measurement::ChromeDataUseMeasurement::RegisterPrefs(registry);
[email protected]b1de2c72013-02-06 02:45:47563 BrowserProcessImpl::RegisterPrefs(registry);
Chris Palmerac7d75642017-11-22 20:12:54564 ChromeContentBrowserClient::RegisterLocalStatePrefs(registry);
[email protected]4a55a712014-06-08 16:50:34565 ChromeMetricsServiceClient::RegisterPrefs(registry);
oysteinede6783b2016-05-25 18:08:43566 ChromeTracingDelegate::RegisterPrefs(registry);
sorinebcfc8dd2016-08-12 21:57:18567 component_updater::RegisterPrefs(registry);
[email protected]b1de2c72013-02-06 02:45:47568 ExternalProtocolHandler::RegisterPrefs(registry);
sdefresne8593e6432015-12-01 12:38:08569 flags_ui::PrefServiceFlagsStorage::RegisterPrefs(registry);
[email protected]e6933d2a2013-03-12 22:32:21570 GpuModeManager::RegisterPrefs(registry);
Miyoung Shin23737f62019-07-23 15:43:31571 signin::IdentityManager::RegisterLocalStatePrefs(registry);
[email protected]b1de2c72013-02-06 02:45:47572 IntranetRedirectDetector::RegisterPrefs(registry);
Anthony Vallee-Dubois43fded9702020-06-19 16:30:38573 invalidation::FCMInvalidationService::RegisterPrefs(registry);
Anthony Vallee-Dubois6f993122018-09-17 16:13:28574 language::GeoLanguageProvider::RegisterLocalStatePrefs(registry);
Alexandre Frechette38f4ef92019-02-25 16:31:57575 language::UlpLanguageCodeLocator::RegisterLocalStatePrefs(registry);
Sebastien Marchand5a63997a2019-09-27 19:15:34576 memory::EnterpriseMemoryLimitPrefObserver::RegisterPrefs(registry);
[email protected]d0ab865b2014-06-04 19:41:34577 network_time::NetworkTimeTracker::RegisterPrefs(registry);
iclelland27f4bcb2016-06-22 16:41:03578 OriginTrialPrefs::RegisterPrefs(registry);
Tonko Sabolčec6f271d32018-08-17 14:35:47579 password_manager::PasswordManager::RegisterLocalPrefs(registry);
Lei Zhang92c15542020-01-10 17:05:10580 policy::BrowserPolicyConnector::RegisterPrefs(registry);
581 policy::PolicyStatisticsCollector::RegisterPrefs(registry);
[email protected]b1de2c72013-02-06 02:45:47582 PrefProxyConfigTrackerImpl::RegisterPrefs(registry);
Thomas Tanglc67ace42019-06-07 19:31:50583 ProfileAttributesEntry::RegisterLocalStatePrefs(registry);
[email protected]b1de2c72013-02-06 02:45:47584 ProfileInfoCache::RegisterPrefs(registry);
Nick Harper030046f2019-09-05 23:36:09585 ProfileNetworkContextService::RegisterLocalStatePrefs(registry);
[email protected]de71ae992013-07-18 03:30:38586 profiles::RegisterPrefs(registry);
nzolghadrd87a308d2016-12-07 15:45:56587 rappor::RapporServiceImpl::RegisterPrefs(registry);
[email protected]ceafc462013-11-04 12:26:03588 RegisterScreenshotPrefs(registry);
Luke Zielinski63784cd2018-05-22 14:08:16589 safe_browsing::RegisterLocalStatePrefs(registry);
Ayu Ishiifbb1fad2020-06-22 20:15:07590 secure_origin_allowlist::RegisterPrefs(registry);
Mikel Astizf61f4ba02018-06-01 10:50:19591 sessions::SessionIdGenerator::RegisterPrefs(registry);
Ryan Sleevi4689ad32018-04-16 19:09:05592 SSLConfigServiceManager::RegisterPrefs(registry);
Michael Giuffridab41fa5c42017-11-13 23:30:57593 subresource_filter::IndexedRulesetVersion::RegisterPrefs(registry);
Anthony Vallee-Dubois43fded9702020-06-19 16:30:38594 syncer::InvalidatorRegistrarWithMemory::RegisterPrefs(registry);
595 syncer::PerUserTopicSubscriptionManager::RegisterPrefs(registry);
Matt Menke4dfb375c2018-06-13 18:06:31596 SystemNetworkContextManager::RegisterPrefs(registry);
wafflesd2d9a332016-04-09 01:59:57597 update_client::RegisterPrefs(registry);
Michael Giuffridab41fa5c42017-11-13 23:30:57598 variations::VariationsService::RegisterPrefs(registry);
[email protected]cc36c2c2012-03-01 00:57:34599
Chris Hamilton65c41312020-06-10 13:14:40600 // Individual preferences. If you have multiple preferences that should
601 // clearly be grouped together, please group them together into a helper
602 // function called above. Please keep this list alphabetized.
603 registry->RegisterBooleanPref(
604 policy::policy_prefs::kIntensiveWakeUpThrottlingEnabled, false);
Aaron Tagliaboschi8f3a28302020-06-24 03:08:26605 registry->RegisterBooleanPref(
606 policy::policy_prefs::kUserAgentClientHintsEnabled, true);
Rakina Zata Amnic123bd22020-07-31 19:08:39607#if defined(OS_ANDROID)
608 registry->RegisterBooleanPref(policy::policy_prefs::kBackForwardCacheEnabled,
609 true);
610#endif // defined(OS_ANDROID)
Chris Hamilton65c41312020-06-10 13:14:40611
612 // Below this point is for platform-specific and compile-time conditional
613 // calls. Please follow the helper-function-first-then-direct-calls pattern
614 // established above, and keep things alphabetized.
615
Denis Kuznetsov32099f32017-12-15 14:04:57616#if BUILDFLAG(ENABLE_BACKGROUND_MODE)
Michael Giuffridab41fa5c42017-11-13 23:30:57617 BackgroundModeManager::RegisterPrefs(registry);
618#endif
619
brettw4b461082016-11-19 18:55:16620#if BUILDFLAG(ENABLE_PLUGINS)
[email protected]ceafc462013-11-04 12:26:03621 PluginsResourceService::RegisterPrefs(registry);
622#endif
623
Mark Pearsonee17df912017-04-27 21:51:04624#if defined(OS_ANDROID)
625 ::android::RegisterPrefs(registry);
Sky Maliced8eb4302020-08-03 05:46:44626
627 registry->RegisterBooleanPref(first_run::kCCTToSDialogEnabled, true);
Shakti Sahu623d00c2020-09-22 00:32:42628#else // defined(OS_ANDROID)
Dominique Fauteux-Chapleau556bb84f2020-04-20 22:06:29629 enterprise_connectors::RegisterLocalStatePrefs(registry);
Lei Zhang92c15542020-01-10 17:05:10630 enterprise_reporting::RegisterLocalStatePrefs(registry);
johnme627dc8c72016-08-19 21:49:39631 gcm::RegisterPrefs(registry);
Lei Zhang92c15542020-01-10 17:05:10632 media_router::RegisterLocalStatePrefs(registry);
Michael Giuffridab41fa5c42017-11-13 23:30:57633 metrics::TabStatsTracker::RegisterPrefs(registry);
Michael Giuffridab41fa5c42017-11-13 23:30:57634 RegisterBrowserPrefs(registry);
Michael Giuffridab41fa5c42017-11-13 23:30:57635 StartupBrowserCreator::RegisterLocalStatePrefs(registry);
636 task_manager::TaskManagerInterface::RegisterPrefs(registry);
thestigd75ce5532015-10-05 22:08:34637 UpgradeDetector::RegisterPrefs(registry);
Sky Maliced8eb4302020-08-03 05:46:44638#endif // defined(OS_ANDROID)
[email protected]3954f332012-02-25 02:51:54639
[email protected]8f0d8ecd12010-04-20 11:51:30640#if defined(OS_CHROMEOS)
Shao-Chuan Lee85a46992019-03-05 04:46:15641 arc::prefs::RegisterLocalStatePrefs(registry);
[email protected]8304f61a2014-05-24 12:17:33642 ChromeOSMetricsProvider::RegisterPrefs(registry);
peletskyif19358fd2016-11-08 16:21:29643 chromeos::ArcKioskAppManager::RegisterPrefs(registry);
jamescook928c5e82015-01-07 20:47:18644 chromeos::AudioDevicesPrefHandlerImpl::RegisterPrefs(registry);
Matt Menard46daab52020-08-11 00:28:59645 chromeos::cert_provisioning::RegisterLocalStatePrefs(registry);
[email protected]4d390782014-08-15 09:22:58646 chromeos::ChromeUserManagerImpl::RegisterPrefs(registry);
Matt Menard46daab52020-08-11 00:28:59647 chromeos::CupsPrintersManager::RegisterLocalStatePrefs(registry);
[email protected]219643f2014-07-16 17:54:00648 chromeos::DemoModeDetector::RegisterPrefs(registry);
Toni Barzic75610ae2018-08-17 20:33:07649 chromeos::DemoModeResourcesRemover::RegisterLocalStatePrefs(registry);
Wenzhao Zangc7402e82018-10-23 17:49:17650 chromeos::DemoSession::RegisterLocalStatePrefs(registry);
Aga Wronskad2535c42018-08-24 15:56:22651 chromeos::DemoSetupController::RegisterLocalStatePrefs(registry);
Anthony Vallee-Dubois85edf222020-03-24 20:30:02652 chromeos::DeviceOAuth2TokenStoreChromeOS::RegisterPrefs(registry);
Aga Wronskad2535c42018-08-24 15:56:22653 chromeos::device_settings_cache::RegisterPrefs(registry);
Lei Zhang92c15542020-01-10 17:05:10654 chromeos::EasyUnlockService::RegisterPrefs(registry);
Aga Wronskad2535c42018-08-24 15:56:22655 chromeos::echo_offer::RegisterPrefs(registry);
Victor Hsiehca89ad002019-10-28 20:08:07656 chromeos::EnableAdbSideloadingScreen::RegisterPrefs(registry);
Aga Wronskad2535c42018-08-24 15:56:22657 chromeos::EnableDebuggingScreenHandler::RegisterPrefs(registry);
Aya ElAttar3b017952020-03-12 19:29:17658 chromeos::ExistingUserController::RegisterLocalStatePrefs(registry);
Matthew Wang9e210652018-11-16 19:40:28659 chromeos::FastTransitionObserver::RegisterPrefs(registry);
Aga Wronskad2535c42018-08-24 15:56:22660 chromeos::HIDDetectionScreenHandler::RegisterPrefs(registry);
Lutz Justenbb2ad1892019-04-24 12:46:18661 chromeos::KerberosCredentialsManager::RegisterLocalStatePrefs(registry);
Aga Wronskad2535c42018-08-24 15:56:22662 chromeos::KioskAppManager::RegisterPrefs(registry);
Anatoliy Potapchuk29a95cb32019-10-16 10:27:57663 chromeos::KioskCryptohomeRemover::RegisterPrefs(registry);
Aga Wronskad2535c42018-08-24 15:56:22664 chromeos::language_prefs::RegisterPrefs(registry);
Thanh Nguyen4345a7dc2020-10-15 10:52:19665 chromeos::local_search_service::SearchMetricsReporterSync::
Jia378c70612020-07-13 08:06:15666 RegisterLocalStatePrefs(registry);
Aga Wronskad2535c42018-08-24 15:56:22667 chromeos::MultiProfileUserController::RegisterPrefs(registry);
Jon Mann0ca42a82020-03-05 00:48:07668 chromeos::NetworkMetadataStore::RegisterPrefs(registry);
kirtika857eeac2016-11-05 00:24:26669 chromeos::NetworkThrottlingObserver::RegisterPrefs(registry);
Daniel Erat645c8652017-11-16 00:01:57670 chromeos::PowerMetricsReporter::RegisterLocalStatePrefs(registry);
Jia4a1a9842018-11-22 03:45:37671 chromeos::power::auto_screen_brightness::MetricsReporter::
672 RegisterLocalStatePrefs(registry);
[email protected]681958c2013-02-21 13:48:14673 chromeos::Preferences::RegisterPrefs(registry);
Mattias Nissler41b4a5d2017-09-22 15:37:55674 chromeos::ResetScreen::RegisterPrefs(registry);
Mattias Nissler980f2aa52019-02-13 13:21:49675 chromeos::SchedulerConfigurationManager::RegisterLocalStatePrefs(registry);
[email protected]b1de2c72013-02-06 02:45:47676 chromeos::ServicesCustomizationDocument::RegisterPrefs(registry);
[email protected]daf4b542013-07-23 17:11:27677 chromeos::SigninScreenHandler::RegisterPrefs(registry);
[email protected]295ca1a72014-07-01 16:14:31678 chromeos::StartupUtils::RegisterPrefs(registry);
A Olsen5806d6552019-01-22 09:58:20679 chromeos::StatsReportingController::RegisterLocalStatePrefs(registry);
[email protected]c280dbf2013-03-19 12:17:44680 chromeos::system::AutomaticRebootManager::RegisterPrefs(registry);
glevin5dd01a72016-03-23 23:08:12681 chromeos::TimeZoneResolver::RegisterPrefs(registry);
[email protected]b1de2c72013-02-06 02:45:47682 chromeos::UserImageManager::RegisterPrefs(registry);
[email protected]295ca1a72014-07-01 16:14:31683 chromeos::UserSessionManager::RegisterPrefs(registry);
Anatoliy Potapchuk02e248492019-10-21 16:19:26684 chromeos::WebKioskAppManager::RegisterPrefs(registry);
Xiaochu Liu48ab5932018-05-11 03:44:04685 component_updater::MetadataTable::RegisterPrefs(registry);
Kyle Horimoto776196a2018-04-03 17:29:17686 cryptauth::CryptAuthDeviceIdProviderImpl::RegisterLocalPrefs(registry);
[email protected]5a145e82014-05-29 22:19:07687 extensions::ExtensionAssetsManagerChromeOS::RegisterPrefs(registry);
Aya ElAttarb4f7a5f2020-03-05 00:47:24688 extensions::ExtensionsPermissionsTracker::RegisterLocalStatePrefs(registry);
tbarzicd9a88fc92017-07-14 02:18:10689 extensions::lock_screen_data::LockScreenItemStorage::RegisterLocalState(
690 registry);
Jit Yao Yap8e247322019-06-24 16:56:59691 extensions::login_api::RegisterLocalStatePrefs(registry);
stevenjbf22f82e2016-10-26 21:47:38692 ::onc::RegisterPrefs(registry);
Jana Grill784b1e52020-06-26 18:22:12693 policy::AdbSideloadingAllowanceModePolicyHandler::RegisterPrefs(registry);
Pavol Marko35bcf1a2018-05-23 15:33:07694 policy::AutoEnrollmentClientImpl::RegisterPrefs(registry);
[email protected]97275822014-01-21 19:30:36695 policy::BrowserPolicyConnectorChromeOS::RegisterPrefs(registry);
[email protected]69a99822013-06-11 00:31:36696 policy::DeviceCloudPolicyManagerChromeOS::RegisterPrefs(registry);
[email protected]b1de2c72013-02-06 02:45:47697 policy::DeviceStatusCollector::RegisterPrefs(registry);
Nikita Podguzov72c21f02019-06-17 14:48:41698 policy::DeviceWallpaperImageExternalDataHandler::RegisterPrefs(registry);
Aya ElAttarb54f88d2020-09-23 20:16:36699 policy::DlpRulesManager::RegisterPrefs(registry);
rsorokin3c13ece2017-01-16 15:58:41700 policy::DMTokenStorage::RegisterPrefs(registry);
Sergey Poromovd6575a0b2020-05-19 21:41:09701 policy::EnrollmentRequisitionManager::RegisterPrefs(registry);
Saurabh Nijhara839c17c2020-05-19 00:18:29702 policy::MinimumVersionPolicyHandler::RegisterPrefs(registry);
[email protected]bcb94772013-12-19 14:28:58703 policy::PolicyCertServiceFactory::RegisterPrefs(registry);
Andreea Costinasc4b76ff2019-04-11 15:52:13704 policy::TPMAutoUpdateModePolicyHandler::RegisterPrefs(registry);
Alexander Hendrich25f5ad72019-09-11 12:10:52705 policy::WebUsbAllowDevicesForUrlsPolicyHandler::RegisterPrefs(registry);
Aya ElAttare58ee2b2020-03-25 13:08:26706 policy::SystemFeaturesDisableListPolicyHandler::RegisterPrefs(registry);
glevin5dd01a72016-03-23 23:08:12707 quirks::QuirksManager::RegisterPrefs(registry);
Roman Aleksandrovd32e34e72019-05-22 17:29:50708 UpgradeDetectorChromeos::RegisterPrefs(registry);
James Hawkins225001cf2020-09-18 16:04:34709 RegisterNearbySharingLocalPrefs(registry);
Lei Zhang92c15542020-01-10 17:05:10710#endif // defined(OS_CHROMEOS)
[email protected]b6366ffa2012-02-29 17:12:26711
Avi Drissman2e458df2020-07-29 16:24:31712#if defined(OS_MAC)
[email protected]b1de2c72013-02-06 02:45:47713 confirm_quit::RegisterLocalState(registry);
[email protected]425f7a02014-04-29 01:51:44714 QuitWithAppsController::RegisterPrefs(registry);
Henrik Grunelle11045a2019-04-12 09:27:27715 system_media_permissions::RegisterSystemMediaPermissionStatesPrefs(registry);
Christopher Cameron81f442e2019-11-14 06:50:14716 AppShimRegistry::Get()->RegisterLocalPrefs(registry);
Vasilii Sukhanovd67cacc2020-01-17 12:52:38717 registry->RegisterBooleanPref(kKeyCreated, false);
[email protected]b6366ffa2012-02-29 17:12:26718#endif
[email protected]bdb8a1e2013-10-03 08:14:00719
Vasilii Sukhanovd67cacc2020-01-17 12:52:38720#if defined(OS_WIN)
Will Harris265b3942019-10-21 01:01:33721 OSCrypt::RegisterLocalPrefs(registry);
Will Harris956e0ca2019-08-23 20:47:39722 registry->RegisterBooleanPref(prefs::kRendererCodeIntegrityEnabled, true);
David Bienvenu554a2592020-02-13 20:20:54723 registry->RegisterBooleanPref(
724 policy::policy_prefs::kNativeWindowOcclusionEnabled, true);
[email protected]c5d4b1842014-06-20 21:19:50725 component_updater::RegisterPrefsForSwReporter(registry);
Rainhard Findling4d621ca2020-10-26 20:46:06726 safe_browsing::RegisterChromeCleanerScanCompletionTimePref(registry);
Nico Webereaa08412019-08-14 01:24:37727#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
Patrick Monettef8fd8b22018-05-10 20:58:04728 IncompatibleApplicationsUpdater::RegisterLocalStatePrefs(registry);
Patrick Monette6b7c475b2018-06-12 14:58:08729 ModuleDatabase::RegisterLocalStatePrefs(registry);
Patrick Monettee31f63e22018-06-06 00:10:34730 ThirdPartyConflictsManager::RegisterLocalStatePrefs(registry);
Nico Webereaa08412019-08-14 01:24:37731#endif // BUILDFLAG(GOOGLE_CHROME_BRANDING)
Hector Carmona935994452019-06-26 17:56:25732#endif // defined(OS_WIN)
[email protected]ceafc462013-11-04 12:26:03733
Lei Zhang92c15542020-01-10 17:05:10734#if !defined(OS_ANDROID) && !defined(OS_CHROMEOS)
735 RegisterDefaultBrowserPromptPrefs(registry);
Yann Dago0d896f62020-02-04 19:59:15736 downgrade::RegisterPrefs(registry);
Anthony Vallee-Dubois85edf222020-03-24 20:30:02737 DeviceOAuth2TokenStoreDesktop::RegisterPrefs(registry);
Lei Zhang92c15542020-01-10 17:05:10738#endif
739
[email protected]ceafc462013-11-04 12:26:03740#if defined(TOOLKIT_VIEWS)
[email protected]af97be4c62014-02-13 14:43:34741 RegisterBrowserViewLocalPrefs(registry);
[email protected]ceafc462013-11-04 12:26:03742#endif
Marc Treibae8cac692020-01-28 12:10:12743
Chris Hamilton65c41312020-06-10 13:14:40744 // This is intentionally last.
Lei Zhangb76b80e32020-04-08 16:58:16745 RegisterLocalStatePrefsForMigration(registry);
[email protected]9acc48602009-11-30 21:18:51746}
initial.commit09911bf2008-07-26 23:55:29747
[email protected]37ca3fe02013-07-05 15:32:44748// Register prefs applicable to all profiles.
Xi Han25a7f032019-04-18 21:44:21749void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
750 const std::string& locale) {
rkaplow058da3132015-02-19 18:18:38751 TRACE_EVENT0("browser", "chrome::RegisterProfilePrefs");
[email protected]2a5f29632012-11-26 17:17:55752 // User prefs. Please keep this list alphabetized.
Dominic Mazzoni21fb0282019-02-13 18:32:47753 AccessibilityLabelsService::RegisterProfilePrefs(registry);
James Wallace-Lee25a1b05e2018-07-24 00:06:31754 AccessibilityUIMessageHandler::RegisterProfilePrefs(registry);
Xing Liu7252b8d2020-01-22 22:12:47755 AnnouncementNotificationService::RegisterProfilePrefs(registry);
Adrienne Walker297651292020-05-08 00:23:18756 appcache_feature_prefs::RegisterProfilePrefs(registry);
Robert Ogden8e7116ea2019-07-25 18:54:08757 AvailabilityProber::RegisterProfilePrefs(registry);
Moe Ahmadi173b0a2b2018-08-03 17:35:51758 autofill::prefs::RegisterProfilePrefs(registry);
Bernhard Bauer19190732017-09-28 09:03:33759 browsing_data::prefs::RegisterBrowserUserPrefs(registry);
Doug Turner9e79cf0c2018-04-05 21:32:30760 certificate_transparency::prefs::RegisterPrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:44761 ChromeContentBrowserClient::RegisterProfilePrefs(registry);
Livvie Lin9141d0f132020-03-23 22:47:04762 ChromeLocationBarModelDelegate::RegisterProfilePrefs(registry);
Colin Blundell7657b402020-02-25 09:46:50763 StatefulSSLHostStateDelegate::RegisterProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:44764 ChromeVersionService::RegisterProfilePrefs(registry);
Eric Secklera5c24e12018-11-28 16:09:20765 chrome_browser_net::NetErrorTabHelper::RegisterProfilePrefs(registry);
[email protected]ba85a602014-06-28 20:37:12766 chrome_browser_net::RegisterPredictionOptionsProfilePrefs(registry);
[email protected]06690dc2014-03-07 08:44:00767 chrome_prefs::RegisterProfilePrefs(registry);
Travis Skare27cee15c2018-07-19 14:34:13768 DocumentProvider::RegisterProfilePrefs(registry);
Katie D1ca4328b2020-02-19 18:08:47769 dom_distiller::DistilledPagePrefs::RegisterProfilePrefs(registry);
770 dom_distiller::RegisterProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:44771 DownloadPrefs::RegisterProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:44772 HostContentSettingsMap::RegisterProfilePrefs(registry);
rajendrant75742d42020-06-22 22:45:33773 HttpsImageCompressionInfoBarDecider::RegisterProfilePrefs(registry);
Brandon Wylie6961a2e2018-09-19 23:03:37774 image_fetcher::ImageCache::RegisterProfilePrefs(registry);
dmurph93fa43b2017-02-07 23:45:16775 ImportantSitesUtil::RegisterProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:44776 IncognitoModePrefs::RegisterProfilePrefs(registry);
Alexandre Frechette37edd93a2019-03-19 15:57:20777 language::LanguagePrefs::RegisterProfilePrefs(registry);
Joe DeBlasio59db500b2020-08-21 00:37:35778 lookalikes::RegisterProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:44779 MediaCaptureDevicesDispatcher::RegisterProfilePrefs(registry);
[email protected]cd80cce2013-12-02 15:19:19780 MediaDeviceIDSalt::RegisterProfilePrefs(registry);
Becca Hughes6354b6b2017-08-31 22:01:55781 MediaEngagementService::RegisterProfilePrefs(registry);
John Rummelle5621c12017-09-05 23:52:10782 MediaStorageIdSalt::RegisterProfilePrefs(registry);
Mikel Astizf4226912020-10-19 19:10:37783 metrics::RegisterDemographicsProfilePrefs(registry);
Tom Anderson1ef51d032020-02-11 01:05:08784 NotificationDisplayServiceImpl::RegisterProfilePrefs(registry);
brettw1f92eed2016-12-07 01:12:58785 NotifierStateTracker::RegisterProfilePrefs(registry);
treibbb0c5af52016-12-09 17:34:15786 ntp_tiles::MostVisitedSites::RegisterProfilePrefs(registry);
Sophie Chang5ff4b942019-05-23 20:04:32787 optimization_guide::prefs::RegisterProfilePrefs(registry);
melandory444f85f2015-09-07 13:32:42788 password_bubble_experiment::RegisterPrefs(registry);
[email protected]a8564212014-04-09 16:16:51789 password_manager::PasswordManager::RegisterProfilePrefs(registry);
anthonyvd6a43b932017-05-11 18:39:27790 payments::RegisterProfilePrefs(registry);
Evan Stade32d635a2020-04-03 18:51:25791 PermissionBubbleMediaAccessHandler::RegisterProfilePrefs(registry);
Sharon Yangc6706902018-07-16 13:06:19792 PlatformNotificationServiceImpl::RegisterProfilePrefs(registry);
Pavol Markodebb0ff2018-05-07 18:35:41793 policy::DeveloperToolsPolicyHandler::RegisterProfilePrefs(registry);
Aaron Colwellf94fd97a2020-07-21 19:37:08794 policy::URLBlocklistManager::RegisterProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:44795 PrefProxyConfigTrackerImpl::RegisterProfilePrefs(registry);
Xi Han25a7f032019-04-18 21:44:21796 PrefsTabHelper::RegisterProfilePrefs(registry, locale);
Robert Ogdend46ffb692020-04-22 22:26:13797 PreviewsHTTPSNotificationInfoBarDecider::RegisterProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:44798 Profile::RegisterProfilePrefs(registry);
799 ProfileImpl::RegisterProfilePrefs(registry);
Matt Menkecfef87d2017-08-03 13:03:06800 ProfileNetworkContextService::RegisterProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:44801 ProtocolHandlerRegistry::RegisterProfilePrefs(registry);
johnmecf2da0c2015-10-28 19:42:12802 PushMessagingAppIdentifier::RegisterProfilePrefs(registry);
Balazs Engedy715b0ec2019-12-04 15:11:45803 QuietNotificationPermissionUiState::RegisterProfilePrefs(registry);
[email protected]c753f142013-02-10 13:14:04804 RegisterBrowserUserPrefs(registry);
Luke Zielinski12ef88552017-06-23 15:36:27805 safe_browsing::RegisterProfilePrefs(registry);
Clark DuVall8236b6a82020-05-28 22:54:32806 blocked_content::SafeBrowsingTriggeredPopupBlocker::RegisterProfilePrefs(
807 registry);
Carlos IL06e6c8c2020-07-28 00:25:19808 security_interstitials::InsecureFormBlockingPage::RegisterProfilePrefs(
809 registry);
[email protected]37ca3fe02013-07-05 15:32:44810 SessionStartupPref::RegisterProfilePrefs(registry);
Himanshu Jajubcf3b9292019-06-07 12:54:07811 SharingSyncPreference::RegisterProfilePrefs(registry);
Mikel Astiz0889b2be2018-09-25 16:20:41812 sync_sessions::SessionSyncPrefs::RegisterProfilePrefs(registry);
Jeffrey Cohen053be24d2019-07-23 23:44:05813 syncer::DeviceInfoPrefs::RegisterProfilePrefs(registry);
Bernhard Bauer19190732017-09-28 09:03:33814 syncer::SyncPrefs::RegisterProfilePrefs(registry);
Marc Treib8c29f0c2019-12-19 12:48:07815 syncer::PerUserTopicSubscriptionManager::RegisterProfilePrefs(registry);
Tanja Gornak5c8b5d952018-10-12 14:39:54816 syncer::InvalidatorRegistrarWithMemory::RegisterProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:44817 TemplateURLPrepopulateData::RegisterProfilePrefs(registry);
[email protected]e5e72cc2014-07-22 19:06:49818 translate::TranslatePrefs::RegisterProfilePrefs(registry);
Moe Ahmadi1266de82020-04-10 17:19:53819 omnibox::RegisterProfilePrefs(registry);
[email protected]855ebff2014-05-09 07:14:38820 ZeroSuggestProvider::RegisterProfilePrefs(registry);
[email protected]cc36c2c2012-03-01 00:57:34821
brettw00899e62016-11-12 02:10:17822#if BUILDFLAG(ENABLE_EXTENSIONS)
[email protected]17510602014-06-05 11:02:28823 ExtensionWebUI::RegisterProfilePrefs(registry);
je_julie.kim7fbb5a1a2015-02-09 17:26:05824 RegisterAnimationPolicyPrefs(registry);
mfoltz96f329c2016-01-13 18:16:58825 ToolbarActionsBar::RegisterProfilePrefs(registry);
Adam Langley4da8d112017-11-30 06:24:01826 extensions::api::CryptotokenRegisterProfilePrefs(registry);
mfoltz96f329c2016-01-13 18:16:58827 extensions::ActivityLog::RegisterProfilePrefs(registry);
tbarzicfa3c7ef62017-04-17 23:12:02828 extensions::AudioAPI::RegisterUserPrefs(registry);
mfoltz96f329c2016-01-13 18:16:58829 extensions::ExtensionPrefs::RegisterProfilePrefs(registry);
Devlin Cronin71f0f532018-04-26 16:35:06830 extensions::ExtensionsUI::RegisterProfilePrefs(registry);
rdevlin.cronin81d35162017-05-31 15:44:48831 extensions::NtpOverriddenBubbleDelegate::RegisterPrefs(registry);
afakhry2bd481832016-06-16 16:17:24832 extensions::RuntimeAPI::RegisterPrefs(registry);
Minh X. Nguyen3aa40692018-03-28 01:15:59833 update_client::RegisterProfilePrefs(registry);
Alexey Baskakov396edb92018-08-02 05:11:42834 web_app::WebAppProvider::RegisterProfilePrefs(registry);
brettw00899e62016-11-12 02:10:17835#endif // BUILDFLAG(ENABLE_EXTENSIONS)
[email protected]c2ac1dda2013-09-23 05:04:56836
Lei Zhang92c15542020-01-10 17:05:10837#if BUILDFLAG(ENABLE_OFFLINE_PAGES)
838 offline_pages::OfflineMetricsCollectorImpl::RegisterPrefs(registry);
839 offline_pages::prefetch_prefs::RegisterPrefs(registry);
840#endif
841
Bernhard Bauer19190732017-09-28 09:03:33842#if BUILDFLAG(ENABLE_PLUGINS)
Lei Zhang244db525f2020-01-23 22:42:47843 DeviceIDFetcher::RegisterProfilePrefs(registry);
Nicholas Verned391eae2017-11-13 02:41:38844 PluginInfoHostImpl::RegisterUserPrefs(registry);
Bernhard Bauer19190732017-09-28 09:03:33845#endif
846
Brett Wilson65f951c2016-11-03 22:06:12847#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
Nicolas Ouellet-Payeur4dbdf1e52018-08-06 21:51:02848 printing::PolicySettings::RegisterProfilePrefs(registry);
Nikita Podguzov26222d12019-12-04 11:44:31849 printing::PrintPreviewStickySettings::RegisterProfilePrefs(registry);
bauerb4da36132014-12-26 19:53:13850#endif
851
Lei Zhang92c15542020-01-10 17:05:10852#if BUILDFLAG(ENABLE_RLZ)
853 ChromeRLZTrackerDelegate::RegisterProfilePrefs(registry);
854#endif
855
thestig4888f292016-10-07 23:57:55856#if BUILDFLAG(ENABLE_SERVICE_DISCOVERY)
[email protected]2188c8d2014-03-21 00:58:56857 LocalDiscoveryUI::RegisterProfilePrefs(registry);
858#endif
859
brettw9e85ef42016-11-01 21:01:24860#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
bauerb7f3b8542015-06-29 19:56:19861 ChildAccountService::RegisterProfilePrefs(registry);
862 SupervisedUserService::RegisterProfilePrefs(registry);
Robbie McElrath2be691ca2020-08-17 20:14:48863 SupervisedUserAllowlistService::RegisterProfilePrefs(registry);
bauerb4da36132014-12-26 19:53:13864#endif
865
zpengdb4a58e2017-01-10 17:40:32866#if defined(OS_ANDROID)
Lei Zhang92c15542020-01-10 17:05:10867 cdm::MediaDrmStorageImpl::RegisterProfilePrefs(registry);
868 explore_sites::HistoryStatisticsReporter::RegisterPrefs(registry);
869 games::prefs::RegisterProfilePrefs(registry);
Clark DuVall600abea2020-03-23 16:16:17870 permissions::GeolocationPermissionContextAndroid::RegisterProfilePrefs(
871 registry);
Christopher Thompson2602fea2019-11-26 19:36:54872 KnownInterceptionDisclosureInfoBarDelegate::RegisterProfilePrefs(registry);
Lei Zhang92c15542020-01-10 17:05:10873 MediaDrmOriginIdManager::RegisterProfilePrefs(registry);
874 NotificationChannelsProviderAndroid::RegisterProfilePrefs(registry);
Lei Zhang92c15542020-01-10 17:05:10875 ntp_tiles::PopularSitesImpl::RegisterProfilePrefs(registry);
876 OomInterventionDecider::RegisterProfilePrefs(registry);
[email protected]084f82b2013-11-01 00:09:59877 PartnerBookmarksShim::RegisterProfilePrefs(registry);
Xing Liu0327d832020-05-15 21:07:03878 query_tiles::RegisterPrefs(registry);
mvanouwerkerkc1751e02017-01-06 12:16:43879 RecentTabsPagePrefs::RegisterProfilePrefs(registry);
Patrick Noland87d9f842019-01-16 03:52:02880 usage_stats::UsageStatsBridge::RegisterProfilePrefs(registry);
Lei Zhang92c15542020-01-10 17:05:10881 variations::VariationsService::RegisterProfilePrefs(registry);
Shakti Sahu623d00c2020-09-22 00:32:42882 video_tutorials::RegisterPrefs(registry);
Dan Harringtonb0ffac0a2020-03-06 22:56:36883 feed::prefs::RegisterFeedSharedProfilePrefs(registry);
Dan Harrington1a772022019-11-01 17:10:18884 feed::RegisterProfilePrefs(registry);
Lei Zhang92c15542020-01-10 17:05:10885#else // defined(OS_ANDROID)
[email protected]ceafc462013-11-04 12:26:03