blob: c436f130563ecf385f79714e5e7a133e425dec99 [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"
Andreea Costinasc4b76ff2019-04-11 15:52:1319#include "chrome/browser/chromeos/policy/tpm_auto_update_mode_policy_handler.h"
Mattias Nissler980f2aa52019-02-13 13:21:4920#include "chrome/browser/chromeos/scheduler_configuration_manager.h"
sorinebcfc8dd2016-08-12 21:57:1821#include "chrome/browser/component_updater/component_updater_prefs.h"
[email protected]a6d36cc2011-02-23 00:39:4822#include "chrome/browser/custom_handlers/protocol_handler_registry.h"
[email protected]70019152012-12-19 11:44:1923#include "chrome/browser/devtools/devtools_window.h"
[email protected]e5dc4222010-08-30 22:16:3224#include "chrome/browser/download/download_prefs.h"
dmurph93fa43b2017-02-07 23:45:1625#include "chrome/browser/engagement/important_sites_util.h"
[email protected]ed2b1002011-05-25 14:12:1026#include "chrome/browser/external_protocol/external_protocol_handler.h"
[email protected]1b3588d2012-10-10 21:17:2527#include "chrome/browser/first_run/first_run.h"
[email protected]e6933d2a2013-03-12 22:32:2128#include "chrome/browser/gpu/gpu_mode_manager.h"
[email protected]5e9d1f72011-01-19 14:15:2329#include "chrome/browser/intranet_redirect_detector.h"
Avi Drissmand30927342018-05-22 15:04:2730#include "chrome/browser/lifetime/browser_shutdown.h"
[email protected]cd80cce2013-12-02 15:19:1931#include "chrome/browser/media/media_device_id_salt.h"
Becca Hughes6354b6b2017-08-31 22:01:5532#include "chrome/browser/media/media_engagement_service.h"
John Rummelle5621c12017-09-05 23:52:1033#include "chrome/browser/media/media_storage_id_salt.h"
Derek Cheng23a01402018-07-24 13:38:1434#include "chrome/browser/media/router/media_router_feature.h"
mcasasa2023ab2016-09-08 01:06:3635#include "chrome/browser/media/webrtc/media_capture_devices_dispatcher.h"
36#include "chrome/browser/media/webrtc/media_stream_devices_controller.h"
Henrik Grunelle11045a2019-04-12 09:27:2737#include "chrome/browser/media/webrtc/system_media_capture_permissions_stats_mac.h"
Sebastien Marchand5a63997a2019-09-27 19:15:3438#include "chrome/browser/memory/enterprise_memory_limit_pref_observer.h"
[email protected]4a55a712014-06-08 16:50:3439#include "chrome/browser/metrics/chrome_metrics_service_client.h"
Eric Secklera5c24e12018-11-28 16:09:2040#include "chrome/browser/net/net_error_tab_helper.h"
[email protected]ba85a602014-06-28 20:37:1241#include "chrome/browser/net/prediction_options.h"
Matt Menkecfef87d2017-08-03 13:03:0642#include "chrome/browser/net/profile_network_context_service.h"
Matt Menke4dfb375c2018-06-13 18:06:3143#include "chrome/browser/net/system_network_context_manager.h"
Anita Woodruffda0cdb642017-08-22 18:36:5044#include "chrome/browser/notifications/notification_channels_provider_android.h"
peterc4007912015-07-31 21:13:3745#include "chrome/browser/notifications/notifier_state_tracker.h"
Sharon Yangc6706902018-07-16 13:06:1946#include "chrome/browser/notifications/platform_notification_service_impl.h"
[email protected]18a4d63c82012-05-25 23:37:0347#include "chrome/browser/pepper_flash_settings_manager.h"
Balazs Engedy715b0ec2019-12-04 15:11:4548#include "chrome/browser/permissions/quiet_notification_permission_ui_state.h"
Pavol Markodebb0ff2018-05-07 18:35:4149#include "chrome/browser/policy/developer_tools_policy_handler.h"
Alexander Hendrich25f5ad72019-09-11 12:10:5250#include "chrome/browser/policy/webusb_allow_devices_for_urls_policy_handler.h"
[email protected]24f95242014-02-10 17:55:2851#include "chrome/browser/prefs/chrome_pref_service_factory.h"
[email protected]4e94ab32011-08-05 05:28:2752#include "chrome/browser/prefs/incognito_mode_prefs.h"
iclelland27f4bcb2016-06-22 16:41:0353#include "chrome/browser/prefs/origin_trial_prefs.h"
[email protected]37858e52010-08-26 00:22:0254#include "chrome/browser/prefs/session_startup_pref.h"
Robert Ogden0f4d88682019-09-24 22:27:5255#include "chrome/browser/previews/previews_lite_page_redirect_decider.h"
Robert Ogden9b95cd52019-04-23 14:43:5856#include "chrome/browser/previews/previews_offline_helper.h"
Nikita Podguzov26222d12019-12-04 11:44:3157#include "chrome/browser/printing/print_preview_sticky_settings.h"
[email protected]1bee6ed2012-03-14 06:46:3658#include "chrome/browser/profiles/chrome_version_service.h"
[email protected]ee937fe2013-02-27 00:41:5959#include "chrome/browser/profiles/profile.h"
Thomas Tanglc67ace42019-06-07 19:31:5060#include "chrome/browser/profiles/profile_attributes_entry.h"
[email protected]8ecad5e2010-12-02 21:18:3361#include "chrome/browser/profiles/profile_impl.h"
[email protected]dee810e2011-06-27 19:43:3962#include "chrome/browser/profiles/profile_info_cache.h"
[email protected]de71ae992013-07-18 03:30:3863#include "chrome/browser/profiles/profiles_state.h"
johnmecf2da0c2015-10-28 19:42:1264#include "chrome/browser/push_messaging/push_messaging_app_identifier.h"
[email protected]bb9c9752013-04-25 23:02:1165#include "chrome/browser/renderer_host/pepper/device_id_fetcher.h"
gab3ca4a492017-03-02 00:19:4166#include "chrome/browser/rlz/chrome_rlz_tracker_delegate.h"
[email protected]a7b8e43d2013-03-18 18:52:4367#include "chrome/browser/search/search.h"
Himanshu Jajubcf3b9292019-06-07 12:54:0768#include "chrome/browser/sharing/sharing_sync_preference.h"
Emily Starkc657d45e2018-05-11 19:03:1969#include "chrome/browser/ssl/chrome_ssl_host_state_delegate.h"
Ryan Sleevi4689ad32018-04-16 19:09:0570#include "chrome/browser/ssl/ssl_config_service_manager.h"
avi24d693f2016-08-06 18:03:5271#include "chrome/browser/task_manager/task_manager_interface.h"
oysteine386fc9e2015-06-07 18:45:4172#include "chrome/browser/tracing/chrome_tracing_delegate.h"
Shivani Sharma343451382017-12-07 20:18:0873#include "chrome/browser/ui/blocked_content/safe_browsing_triggered_popup_blocker.h"
[email protected]2cd4fde2012-06-26 03:10:2674#include "chrome/browser/ui/browser_ui_prefs.h"
Robert Liao741be302019-07-19 23:24:4275#include "chrome/browser/ui/hats/hats_service.h"
[email protected]26bd3893c2014-04-15 18:59:5876#include "chrome/browser/ui/navigation_correction_tab_observer.h"
[email protected]297fb7c22012-06-26 12:37:4977#include "chrome/browser/ui/network_profile_bubble.h"
[email protected]9ce7cb42011-12-07 18:53:0778#include "chrome/browser/ui/prefs/prefs_tab_helper.h"
[email protected]62f77772011-02-23 19:45:4279#include "chrome/browser/ui/search_engines/keyword_editor_controller.h"
[email protected]b56e2e32012-05-11 21:18:0480#include "chrome/browser/ui/tabs/pinned_tab_codec.h"
[email protected]265a1492011-02-27 05:58:0781#include "chrome/browser/ui/webui/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"
Alexey Baskakov396edb92018-08-02 05:11:4284#include "chrome/browser/web_applications/web_app_provider.h"
Martin Kreichgauer0e1b15ef2018-06-20 02:59:5085#include "chrome/browser/webauthn/chrome_authenticator_request_delegate.h"
Scott Violet6200d332018-02-23 21:29:2386#include "chrome/common/buildflags.h"
[email protected]f87919d72011-02-02 18:46:1687#include "chrome/common/pref_names.h"
Daniel Vogelheim976f1c22017-11-22 16:26:0388#include "chrome/common/secure_origin_whitelist.h"
Mason Freed490f2a22019-11-05 21:41:2989#include "chrome/common/web_components_prefs.h"
Moe Ahmadi173b0a2b2018-08-03 17:35:5190#include "components/autofill/core/common/autofill_prefs.h"
ioanapa8bfbc72016-09-07 16:09:0591#include "components/browsing_data/core/pref_names.h"
Doug Turner9e79cf0c2018-04-05 21:32:3092#include "components/certificate_transparency/pref_names.h"
mukai8eaec822014-10-25 17:53:1693#include "components/content_settings/core/browser/host_content_settings_map.h"
John Abd-El-Malek89a5f3a2019-06-14 18:21:5394#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_prefs.h"
[email protected]6a5b0712014-07-16 00:30:1095#include "components/dom_distiller/core/distilled_page_prefs.h"
Scott Violet9ae82892018-03-01 18:38:1296#include "components/feature_engagement/buildflags.h"
sdefresne8593e6432015-12-01 12:38:0897#include "components/flags_ui/pref_service_flags_storage.h"
jianli2dc910b02014-09-19 02:42:4698#include "components/gcm_driver/gcm_channel_status_syncer.h"
Brandon Wyliec7a94502018-10-18 18:43:2599#include "components/image_fetcher/core/cache/image_cache.h"
Tanja Gornak5c8b5d952018-10-12 14:39:54100#include "components/invalidation/impl/invalidator_registrar_with_memory.h"
Marc Treib8c29f0c2019-12-19 12:48:07101#include "components/invalidation/impl/per_user_topic_subscription_manager.h"
Anthony Vallee-Dubois6f993122018-09-17 16:13:28102#include "components/language/content/browser/geo_language_provider.h"
Alexandre Frechette38f4ef92019-02-25 16:31:57103#include "components/language/content/browser/ulp_language_code_locator/ulp_language_code_locator.h"
Alexandre Frechette572755b2019-02-13 22:30:20104#include "components/language/core/browser/language_prefs.h"
Peter Wen45025ea2018-09-17 15:16:27105#include "components/metrics/metrics_pref_names.h"
[email protected]d0ab865b2014-06-04 19:41:34106#include "components/network_time/network_time_tracker.h"
dgn52914722016-10-18 10:28:42107#include "components/ntp_snippets/content_suggestions_service.h"
jkrcal093410c2016-12-21 16:13:55108#include "components/ntp_snippets/remote/remote_suggestions_provider_impl.h"
jkrcalf9966462017-03-29 16:25:21109#include "components/ntp_snippets/remote/remote_suggestions_scheduler_impl.h"
treibe0e11db2016-09-29 15:35:34110#include "components/ntp_snippets/remote/request_throttler.h"
jkrcale13510e2016-09-08 17:56:20111#include "components/ntp_snippets/user_classifier.h"
treibbb0c5af52016-12-09 17:34:15112#include "components/ntp_tiles/most_visited_sites.h"
Scott Violet9ae82892018-03-01 18:38:12113#include "components/offline_pages/buildflags/buildflags.h"
Travis Skare27cee15c2018-07-19 14:34:13114#include "components/omnibox/browser/document_provider.h"
blundell2102f7c2015-07-09 10:00:53115#include "components/omnibox/browser/zero_suggest_provider.h"
Sophie Chang5ff4b942019-05-23 20:04:32116#include "components/optimization_guide/optimization_guide_prefs.h"
melandory444f85f2015-09-07 13:32:42117#include "components/password_manager/core/browser/password_bubble_experiment.h"
[email protected]1f730bd2014-02-28 15:11:32118#include "components/password_manager/core/browser/password_manager.h"
Vasilii Sukhanovdd791ee2019-06-24 12:11:59119#include "components/password_manager/core/common/password_manager_pref_names.h"
anthonyvd6a43b932017-05-11 18:39:27120#include "components/payments/core/payment_prefs.h"
brettw03e61962016-03-15 06:27:04121#include "components/policy/core/browser/browser_policy_connector.h"
122#include "components/policy/core/browser/url_blacklist_manager.h"
123#include "components/policy/core/common/policy_statistics_collector.h"
[email protected]f0c8c4992014-05-15 17:37:26124#include "components/pref_registry/pref_registry_syncable.h"
brettwb1fc1b82016-02-02 00:19:08125#include "components/prefs/pref_registry_simple.h"
126#include "components/prefs/pref_service.h"
abhishek.a2171c612852015-08-31 10:48:19127#include "components/proxy_config/pref_proxy_config_tracker_impl.h"
nzolghadrd87a308d2016-12-07 15:45:56128#include "components/rappor/rappor_service_impl.h"
Luke Zielinski12ef88552017-06-23 15:36:27129#include "components/safe_browsing/common/safe_browsing_prefs.h"
[email protected]0915b352014-06-25 19:58:14130#include "components/search_engines/template_url_prepopulate_data.h"
Carlos ILb284c4c62019-12-05 08:07:20131#include "components/security_state/core/security_state.h"
Mikel Astizf61f4ba02018-06-01 10:50:19132#include "components/sessions/core/session_id_generator.h"
Henrique Ferreiro94eb46f2019-07-03 14:38:56133#include "components/signin/public/identity_manager/identity_manager.h"
Eric Robinson49f19b62018-09-17 21:28:15134#include "components/subresource_filter/content/browser/ruleset_service.h"
maxbogue2f960e52016-10-07 01:24:15135#include "components/sync/base/sync_prefs.h"
Jeffrey Cohen053be24d2019-07-23 23:44:05136#include "components/sync_device_info/device_info_prefs.h"
maxbogueea16ff412016-10-28 16:35:29137#include "components/sync_preferences/pref_service_syncable.h"
Mikel Astiz0889b2be2018-09-25 16:20:41138#include "components/sync_sessions/session_sync_prefs.h"
[email protected]81135072014-02-14 14:11:02139#include "components/translate/core/browser/translate_prefs.h"
wafflesd2d9a332016-04-09 01:59:57140#include "components/update_client/update_client.h"
blundell0300cdea2015-09-03 12:47:44141#include "components/variations/service/variations_service.h"
[email protected]f3b1a082011-11-18 00:34:30142#include "content/public/browser/render_process_host.h"
Scott Violetc8240b02018-03-08 22:03:59143#include "extensions/buildflags/buildflags.h"
[email protected]ad66db12014-07-10 12:43:47144#include "net/http/http_server_properties_manager.h"
Scott Violet02e38b92018-03-27 23:42:14145#include "ppapi/buildflags/buildflags.h"
Scott Violet318a55f2018-03-30 19:08:19146#include "printing/buildflags/buildflags.h"
Scott Violeta5f7ba12018-04-02 22:03:40147#include "rlz/buildflags/buildflags.h"
[email protected]a814d8632009-01-31 20:18:52148
Denis Kuznetsov32099f32017-12-15 14:04:57149#if BUILDFLAG(ENABLE_BACKGROUND_MODE)
thestige4155842014-10-20 18:58:02150#include "chrome/browser/background/background_mode_manager.h"
151#endif
152
brettw00899e62016-11-12 02:10:17153#if BUILDFLAG(ENABLE_EXTENSIONS)
je_julie.kim7fbb5a1a2015-02-09 17:26:05154#include "chrome/browser/accessibility/animation_policy_prefs.h"
Dominick Ng6ff51052018-07-06 05:30:20155#include "chrome/browser/apps/platform_apps/shortcut_manager.h"
[email protected]17510602014-06-05 11:02:28156#include "chrome/browser/extensions/activity_log/activity_log.h"
157#include "chrome/browser/extensions/api/commands/command_service.h"
Adam Langley4da8d112017-11-30 06:24:01158#include "chrome/browser/extensions/api/cryptotoken_private/cryptotoken_private_api.h"
[email protected]17510602014-06-05 11:02:28159#include "chrome/browser/extensions/api/tabs/tabs_api.h"
[email protected]d5a74be2014-08-08 01:01:27160#include "chrome/browser/extensions/extension_web_ui.h"
rdevlin.cronin81d35162017-05-31 15:44:48161#include "chrome/browser/extensions/ntp_overridden_bubble_delegate.h"
avib896c712015-12-26 02:10:43162#include "chrome/browser/ui/toolbar/toolbar_actions_bar.h"
Devlin Cronin71f0f532018-04-26 16:35:06163#include "chrome/browser/ui/webui/extensions/extensions_ui.h"
tbarzicfa3c7ef62017-04-17 23:12:02164#include "extensions/browser/api/audio/audio_api.h"
afakhry2bd481832016-06-16 16:17:24165#include "extensions/browser/api/runtime/runtime_api.h"
[email protected]d5a74be2014-08-08 01:01:27166#include "extensions/browser/extension_prefs.h"
James Hawkins1d1dc7e02018-03-02 22:11:54167#if defined(OS_CHROMEOS)
Joel Hockey7fb974342019-06-27 23:35:05168#include "chrome/browser/chromeos/guest_os/guest_os_share_path.h"
Lutz Justenbb2ad1892019-04-24 12:46:18169#include "chrome/browser/chromeos/kerberos/kerberos_credentials_manager.h"
James Hawkins5330caef2018-03-05 21:00:28170#include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_service.h"
A Olsen5806d6552019-01-22 09:58:20171#include "chrome/browser/chromeos/settings/stats_reporting_controller.h"
Xiaochu Liu48ab5932018-05-11 03:44:04172#include "chrome/browser/component_updater/metadata_table_chromeos.h"
Nicolas Ouellet-Payeur7f9a63ef2018-08-28 17:26:06173#else
174#include "chrome/browser/extensions/api/enterprise_reporting_private/prefs.h"
Lei Zhang6cb9b842019-12-16 20:29:12175#endif // defined(OS_CHROMEOS)
brettw00899e62016-11-12 02:10:17176#endif // BUILDFLAG(ENABLE_EXTENSIONS)
[email protected]17510602014-06-05 11:02:28177
Lei Zhang6cb9b842019-12-16 20:29:12178#if BUILDFLAG(ENABLE_LEGACY_DESKTOP_IN_PRODUCT_HELP)
179#include "chrome/browser/feature_engagement/session_duration_updater.h"
180#endif
181
jianliac940cb2017-06-07 05:13:08182#if BUILDFLAG(ENABLE_OFFLINE_PAGES)
Dmitry Titov4d2bde02017-06-30 05:29:52183#include "chrome/browser/offline_pages/prefetch/offline_metrics_collector_impl.h"
Justin DeWittfa60f892017-07-26 01:33:33184#include "chrome/browser/offline_pages/prefetch/prefetch_background_task_handler_impl.h"
Dan Harrington57be4a02018-09-14 17:50:19185#include "components/offline_pages/core/prefetch/prefetch_prefs.h"
jianliac940cb2017-06-07 05:13:08186#endif
187
bauerbecab4f52017-03-13 20:16:41188#if BUILDFLAG(ENABLE_PLUGINS)
Nicholas Verned391eae2017-11-13 02:41:38189#include "chrome/browser/plugins/plugin_info_host_impl.h"
bauerb4da36132014-12-26 19:53:13190#include "chrome/browser/plugins/plugins_resource_service.h"
191#endif
192
thestig4888f292016-10-07 23:57:55193#if BUILDFLAG(ENABLE_SERVICE_DISCOVERY)
[email protected]9544e562013-09-21 04:20:55194#include "chrome/browser/ui/webui/local_discovery/local_discovery_ui.h"
195#endif
196
Lei Zhang6cb9b842019-12-16 20:29:12197#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
198#include "chrome/browser/supervised_user/child_accounts/child_account_service.h"
199#include "chrome/browser/supervised_user/supervised_user_service.h"
200#include "chrome/browser/supervised_user/supervised_user_whitelist_service.h"
Bettina Deaf3dac202017-09-16 20:53:22201#endif
202
thestigf2a0fa92016-09-07 09:37:29203#if defined(OS_ANDROID)
zpengdb4a58e2017-01-10 17:40:32204#include "chrome/browser/android/bookmarks/partner_bookmarks_shim.h"
Dmitry Titov5f6cfb42018-10-05 18:52:14205#include "chrome/browser/android/explore_sites/history_statistics_reporter.h"
zpengdb4a58e2017-01-10 17:40:32206#include "chrome/browser/android/ntp/recent_tabs_page_prefs.h"
Kenichi Ishibashi35ac7132017-12-08 03:44:30207#include "chrome/browser/android/oom_intervention/oom_intervention_decider.h"
mlliuee3a405c2016-10-28 22:34:52208#include "chrome/browser/android/preferences/browser_prefs_android.h"
Patrick Noland87d9f842019-01-16 03:52:02209#include "chrome/browser/android/usage_stats/usage_stats_bridge.h"
benwells0b3748a2017-03-21 06:28:40210#include "chrome/browser/geolocation/geolocation_permission_context_android.h"
John Rummell4703af62019-02-15 02:31:00211#include "chrome/browser/media/android/cdm/media_drm_origin_id_manager.h"
Christopher Thompson2602fea2019-11-26 19:36:54212#include "chrome/browser/ssl/known_interception_disclosure_infobar_delegate.h"
xhwang116acb92017-04-03 18:27:20213#include "components/cdm/browser/media_drm_storage_impl.h"
Sky Malicedd28f282018-06-14 03:22:24214#include "components/feed/buildflags.h"
Sebastien9f5e1d12019-12-19 20:09:57215#include "components/games/core/games_prefs.h"
vitaliii9f8aa5f82016-12-22 09:26:35216#include "components/ntp_snippets/category_rankers/click_based_category_ranker.h"
zpengdb4a58e2017-01-10 17:40:32217#include "components/ntp_tiles/popular_sites_impl.h"
Sky Malicedd28f282018-06-14 03:22:24218#if BUILDFLAG(ENABLE_FEED_IN_CHROME)
Dan Harrington1a772022019-11-01 17:10:18219#include "components/feed/core/pref_names.h"
Sky Malicedd28f282018-06-14 03:22:24220#endif // BUILDFLAG(ENABLE_FEED_IN_CHROME)
Lei Zhang6cb9b842019-12-16 20:29:12221#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
222#include "components/games/core/games_prefs.h"
223#endif // BUILDFLAG(GOOGLE_CHROME_BRANDING)
Greg Thompson8bcd799b2018-08-10 09:49:33224#else // defined(OS_ANDROID)
James Cook3e50a062019-11-19 17:07:38225#include "chrome/browser/apps/app_service/app_service_proxy.h"
Owen Min840494652019-05-09 23:12:37226#include "chrome/browser/enterprise_reporting/prefs.h"
peter9f4490a2017-01-27 00:58:36227#include "chrome/browser/gcm/gcm_product_util.h"
Lei Zhang6cb9b842019-12-16 20:29:12228#include "chrome/browser/media/unified_autoplay_config.h"
Michael Giuffridab41fa5c42017-11-13 23:30:57229#include "chrome/browser/metrics/tab_stats_tracker.h"
Kyle Milka503bba32018-06-08 16:23:05230#include "chrome/browser/search/instant_service.h"
Dan Beam91995d12019-09-21 04:48:10231#include "chrome/browser/search/promos/promo_service.h"
Kyle Milka779c9ce2019-01-18 16:39:22232#include "chrome/browser/search/search_suggest/search_suggest_service.h"
thestigc91176f42014-10-28 20:16:35233#include "chrome/browser/signin/signin_promo.h"
zpengdb4a58e2017-01-10 17:40:32234#include "chrome/browser/ui/startup/startup_browser_creator.h"
rbpotterbe128632019-11-22 04:50:42235#include "chrome/browser/ui/webui/history/foreign_session_handler.h"
236#include "chrome/browser/ui/webui/history/history_ui.h"
John Lee136759f02019-04-15 20:19:11237#include "chrome/browser/ui/webui/settings/settings_ui.h"
Greg Thompson8bcd799b2018-08-10 09:49:33238#include "chrome/browser/upgrade_detector/upgrade_detector.h"
Lei Zhang6cb9b842019-12-16 20:29:12239#include "components/ntp_tiles/custom_links_manager_impl.h"
Greg Thompson8bcd799b2018-08-10 09:49:33240#endif // defined(OS_ANDROID)
thestigc91176f42014-10-28 20:16:35241
[email protected]9acc48602009-11-30 21:18:51242#if defined(OS_CHROMEOS)
Bailey Berro1ee1c122019-10-18 20:52:44243#include "ash/public/cpp/ash_pref_names.h"
Xiyuan Xia5a8c4172019-05-13 16:23:48244#include "ash/public/cpp/ash_prefs.h"
peletskyif19358fd2016-11-08 16:21:29245#include "chrome/browser/chromeos/app_mode/arc/arc_kiosk_app_manager.h"
[email protected]1637c192013-02-16 04:00:13246#include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h"
Anatoliy Potapchuk29a95cb32019-10-16 10:27:57247#include "chrome/browser/chromeos/app_mode/kiosk_cryptohome_remover.h"
Anatoliy Potapchuk02e248492019-10-21 16:19:26248#include "chrome/browser/chromeos/app_mode/web_app/web_kiosk_app_manager.h"
James Cookc542d992019-11-08 23:34:24249#include "chrome/browser/chromeos/apps/apk_web_app_service.h"
msramek56e72e82016-11-17 16:14:47250#include "chrome/browser/chromeos/arc/policy/arc_policy_bridge.h"
Yusuke Sato00ca17d2019-10-04 21:56:57251#include "chrome/browser/chromeos/arc/session/arc_session_manager.h"
Archie Pusakad68d92f2019-10-28 05:45:25252#include "chrome/browser/chromeos/bluetooth/debug_logs_manager.h"
Aga Wronskaac6cf362019-02-26 21:36:55253#include "chrome/browser/chromeos/child_accounts/parent_access_code/parent_access_service.h"
Sarah Hua0b666a2018-05-22 16:45:38254#include "chrome/browser/chromeos/child_accounts/screen_time_controller.h"
Renee Wrightc41d5432018-04-26 05:27:37255#include "chrome/browser/chromeos/crostini/crostini_pref_names.h"
Timothy Lohdc95cdac2018-03-22 01:02:03256#include "chrome/browser/chromeos/crostini/crostini_registry_service.h"
Kyle Horimoto776196a2018-04-03 17:29:17257#include "chrome/browser/chromeos/cryptauth/cryptauth_device_id_provider_impl.h"
Satoru Takabayashi876d4e62014-12-03 04:52:24258#include "chrome/browser/chromeos/customization/customization_document.h"
[email protected]a5058a22013-08-29 20:49:51259#include "chrome/browser/chromeos/extensions/echo_private_api.h"
Alexander Hendrichcafd3a2e2019-06-27 15:05:35260#include "chrome/browser/chromeos/extensions/login_screen/login/login_api.h"
mtomaszbd1170f2014-10-21 05:34:18261#include "chrome/browser/chromeos/file_system_provider/registry.h"
[email protected]980d5f9e2013-12-17 17:47:08262#include "chrome/browser/chromeos/first_run/first_run.h"
Joel Hockey7fb974342019-06-27 23:35:05263#include "chrome/browser/chromeos/guest_os/guest_os_pref_names.h"
Toni Barzic14329d02017-07-17 21:59:12264#include "chrome/browser/chromeos/lock_screen_apps/state_controller.h"
jdufault59d6f53d2017-02-15 19:19:37265#include "chrome/browser/chromeos/login/demo_mode/demo_mode_detector.h"
Toni Barzic75610ae2018-08-17 20:33:07266#include "chrome/browser/chromeos/login/demo_mode/demo_mode_resources_remover.h"
Wenzhao Zangc7402e82018-10-23 17:49:17267#include "chrome/browser/chromeos/login/demo_mode/demo_session.h"
Aga Wronskad2535c42018-08-24 15:56:22268#include "chrome/browser/chromeos/login/demo_mode/demo_setup_controller.h"
xiaoyinhb849e9c12017-04-21 21:40:33269#include "chrome/browser/chromeos/login/quick_unlock/fingerprint_storage.h"
Jacob Dufaultf7918c92018-04-04 20:56:28270#include "chrome/browser/chromeos/login/quick_unlock/pin_storage_prefs.h"
sammiequon250289992016-11-08 07:22:04271#include "chrome/browser/chromeos/login/quick_unlock/quick_unlock_utils.h"
A Olsencf2d7cf2019-04-16 12:04:26272#include "chrome/browser/chromeos/login/saml/saml_profile_prefs.h"
Victor Hsiehca89ad002019-10-28 20:08:07273#include "chrome/browser/chromeos/login/screens/enable_adb_sideloading_screen.h"
Mattias Nissler41b4a5d2017-09-22 15:37:55274#include "chrome/browser/chromeos/login/screens/reset_screen.h"
[email protected]295ca1a72014-07-01 16:14:31275#include "chrome/browser/chromeos/login/session/user_session_manager.h"
[email protected]aa8328fb2013-04-19 15:09:06276#include "chrome/browser/chromeos/login/startup_utils.h"
[email protected]83d82d42014-05-16 02:04:42277#include "chrome/browser/chromeos/login/users/avatar/user_image_manager.h"
278#include "chrome/browser/chromeos/login/users/avatar/user_image_sync_observer.h"
[email protected]4d390782014-08-15 09:22:58279#include "chrome/browser/chromeos/login/users/chrome_user_manager_impl.h"
[email protected]83d82d42014-05-16 02:04:42280#include "chrome/browser/chromeos/login/users/multi_profile_user_controller.h"
kirtika857eeac2016-11-05 00:24:26281#include "chrome/browser/chromeos/net/network_throttling_observer.h"
pneubeckdabdfe912015-06-18 13:42:13282#include "chrome/browser/chromeos/platform_keys/key_permissions.h"
Olya Kalitovac869f962018-12-04 12:01:23283#include "chrome/browser/chromeos/plugin_vm/plugin_vm_pref_names.h"
Bartosz Fabianowskid4d93a72018-05-17 18:49:48284#include "chrome/browser/chromeos/policy/app_install_event_log_manager_wrapper.h"
Bartosz Fabianowski79028ae2018-02-23 17:25:03285#include "chrome/browser/chromeos/policy/app_install_event_logger.h"
Pavol Marko35bcf1a2018-05-23 15:33:07286#include "chrome/browser/chromeos/policy/auto_enrollment_client_impl.h"
[email protected]97275822014-01-21 19:30:36287#include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
[email protected]69a99822013-06-11 00:31:36288#include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h"
rsorokin3c13ece2017-01-16 15:58:41289#include "chrome/browser/chromeos/policy/dm_token_storage.h"
Nikita Podguzov39d70fb2019-06-17 18:13:14290#include "chrome/browser/chromeos/policy/external_data_handlers/device_wallpaper_image_external_data_handler.h"
[email protected]bcb94772013-12-19 14:28:58291#include "chrome/browser/chromeos/policy/policy_cert_service_factory.h"
Marcelo Almeida12d92c62019-04-15 19:00:11292#include "chrome/browser/chromeos/policy/status_collector/device_status_collector.h"
Marcelo Almeida9ef8c132019-05-13 20:19:12293#include "chrome/browser/chromeos/policy/status_collector/status_collector.h"
Jia4a1a9842018-11-22 03:45:37294#include "chrome/browser/chromeos/power/auto_screen_brightness/metrics_reporter.h"
Daniel Erat645c8652017-11-16 00:01:57295#include "chrome/browser/chromeos/power/power_metrics_reporter.h"
[email protected]9acc48602009-11-30 21:18:51296#include "chrome/browser/chromeos/preferences.h"
David Valleauce0aedfa2018-03-30 18:46:16297#include "chrome/browser/chromeos/printing/cups_printers_manager.h"
Nikita Podguzove5b8304a2019-10-08 21:36:17298#include "chrome/browser/chromeos/printing/history/print_job_history_service.h"
Justin Carlson45339ae2017-07-17 23:59:10299#include "chrome/browser/chromeos/printing/synced_printers_manager.h"
Yulun Wu502158732019-07-24 00:31:45300#include "chrome/browser/chromeos/release_notes/release_notes_storage.h"
afakhry5b2b3d92016-10-12 21:15:46301#include "chrome/browser/chromeos/resource_reporter/resource_reporter.h"
[email protected]a28c45a2013-04-18 06:02:18302#include "chrome/browser/chromeos/settings/device_oauth2_token_service.h"
[email protected]0c4d97c2012-09-01 20:47:20303#include "chrome/browser/chromeos/settings/device_settings_cache.h"
[email protected]c280dbf2013-03-19 12:17:44304#include "chrome/browser/chromeos/system/automatic_reboot_manager.h"
afakhrye8eac602015-11-10 02:31:22305#include "chrome/browser/chromeos/system/input_device_settings.h"
[email protected]a0e44ccf2013-04-19 01:48:22306#include "chrome/browser/extensions/api/enterprise_platform_keys_private/enterprise_platform_keys_private_api.h"
[email protected]5a145e82014-05-29 22:19:07307#include "chrome/browser/extensions/extension_assets_manager_chromeos.h"
xhwangc84739e2015-03-14 01:02:46308#include "chrome/browser/media/protected_media_identifier_permission_context.h"
[email protected]8304f61a2014-05-24 12:17:33309#include "chrome/browser/metrics/chromeos_metrics_provider.h"
James Cookc542d992019-11-08 23:34:24310#include "chrome/browser/ui/app_list/app_list_syncable_service.h"
311#include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h"
312#include "chrome/browser/ui/app_list/search/arc/arc_app_reinstall_search_provider.h"
Michael Giuffridab41fa5c42017-11-13 23:30:57313#include "chrome/browser/ui/ash/chrome_launcher_prefs.h"
Andreea Costinaseaec4c172019-02-04 11:57:43314#include "chrome/browser/ui/webui/certificates_handler.h"
zelidrag459b11b12014-11-14 04:05:53315#include "chrome/browser/ui/webui/chromeos/login/enable_debugging_screen_handler.h"
[email protected]8e6742a52014-05-23 14:56:22316#include "chrome/browser/ui/webui/chromeos/login/hid_detection_screen_handler.h"
[email protected]daf4b542013-07-23 17:11:27317#include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h"
Roman Aleksandrovd32e34e72019-05-22 17:29:50318#include "chrome/browser/upgrade_detector/upgrade_detector_chromeos.h"
jamescook9439c7392014-12-18 01:47:25319#include "chromeos/audio/audio_devices_pref_handler_impl.h"
Kush Sinha36c20c42019-03-13 19:12:57320#include "chromeos/components/account_manager/account_manager.h"
Steven Bennetts38e9bde22019-01-03 17:31:10321#include "chromeos/constants/chromeos_switches.h"
Matthew Wang9e210652018-11-16 19:40:28322#include "chromeos/network/fast_transition_observer.h"
stevenjb100c6202016-10-28 02:28:00323#include "chromeos/network/proxy/proxy_config_handler.h"
Xiaohui Chene5d0ff62019-10-02 00:34:04324#include "chromeos/services/assistant/public/cpp/assistant_prefs.h"
James Cook1ddea982019-10-23 20:06:38325#include "chromeos/services/device_sync/device_sync_impl.h"
Jordy Greenblatt2265de702018-07-26 19:05:26326#include "chromeos/services/multidevice_setup/multidevice_setup_service.h"
alemate48255f3d2015-01-30 18:11:41327#include "chromeos/timezone/timezone_resolver.h"
Hidehiko Abe33e9adf2017-09-13 06:12:23328#include "components/arc/arc_prefs.h"
Askar Aitzhanb1a3e972019-06-07 11:08:56329#include "components/invalidation/impl/fcm_invalidation_service.h"
knn062cdbb2015-06-26 18:18:42330#include "components/invalidation/impl/invalidator_storage.h"
stevenjbf22f82e2016-10-26 21:47:38331#include "components/onc/onc_pref_names.h"
glevin5dd01a72016-03-23 23:08:12332#include "components/quirks/quirks_manager.h"
tbarzicd9a88fc92017-07-14 02:18:10333#include "extensions/browser/api/lock_screen_data/lock_screen_item_storage.h"
[email protected]86c6b9e32011-10-25 17:09:10334#else
335#include "chrome/browser/extensions/default_apps.h"
[email protected]9acc48602009-11-30 21:18:51336#endif
337
[email protected]ceafc462013-11-04 12:26:03338#if defined(OS_MACOSX)
Christopher Cameron81f442e2019-11-14 06:50:14339#include "chrome/browser/apps/platform_apps/app_shim_registry_mac.h"
[email protected]425f7a02014-04-29 01:51:44340#include "chrome/browser/ui/cocoa/apps/quit_with_apps_controller_mac.h"
Tom Anderson6a496032018-08-30 23:38:37341#include "chrome/browser/ui/cocoa/confirm_quit.h"
[email protected]2366a3a2012-10-02 20:41:14342#endif
343
[email protected]bdb8a1e2013-10-03 08:14:00344#if defined(OS_WIN)
[email protected]c5d4b1842014-06-20 21:19:50345#include "chrome/browser/component_updater/sw_reporter_installer_win.h"
Nico Webereaa08412019-08-14 01:24:37346#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
Patrick Monettebb543942019-05-17 17:45:32347#include "chrome/browser/win/conflicts/incompatible_applications_updater.h"
348#include "chrome/browser/win/conflicts/module_database.h"
349#include "chrome/browser/win/conflicts/third_party_conflicts_manager.h"
Nico Webereaa08412019-08-14 01:24:37350#endif // BUILDFLAG(GOOGLE_CHROME_BRANDING)
ftirelo46b34222017-06-19 10:36:57351#include "chrome/browser/safe_browsing/chrome_cleaner/settings_resetter_win.h"
alito856526d2017-03-03 09:16:17352#include "chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_prefs_manager.h"
[email protected]bdb8a1e2013-10-03 08:14:00353#endif
354
Will Harris265b3942019-10-21 01:01:33355#if defined(OS_WIN) || defined(OS_MACOSX)
356#include "components/os_crypt/os_crypt.h"
357#endif
358
Nicolas Ouellet-Payeurbdcab0092018-10-22 14:50:33359#if defined(OS_WIN) || defined(OS_MACOSX) || \
360 (defined(OS_LINUX) && !defined(OS_CHROMEOS))
Nicolas Ouellet-Payeur9a4a94d2018-09-17 15:26:11361#include "chrome/browser/browser_switcher/browser_switcher_prefs.h"
362#endif
363
thestigf2a0fa92016-09-07 09:37:29364#if !defined(OS_ANDROID) && !defined(OS_CHROMEOS)
365#include "chrome/browser/ui/startup/default_browser_prompt.h"
366#endif
367
[email protected]ceafc462013-11-04 12:26:03368#if defined(TOOLKIT_VIEWS)
369#include "chrome/browser/ui/browser_view_prefs.h"
[email protected]ceafc462013-11-04 12:26:03370#endif
371
[email protected]572f40c9b2012-07-06 20:35:33372namespace {
373
Alexandr Ilin273e20b2018-09-05 19:47:57374// Deprecated 8/2018.
375const char kDnsPrefetchingStartupList[] = "dns_prefetching.startup_list";
376const char kDnsPrefetchingHostReferralList[] =
377 "dns_prefetching.host_referral_list";
378
Ramin Halavati9057c112018-09-17 09:34:16379// Deprecated 9/2018
380const char kGeolocationAccessToken[] = "geolocation.access_token";
381const char kGoogleServicesPasswordHash[] = "google.services.password_hash";
382const char kModuleConflictBubbleShown[] = "module_conflict.bubble_shown";
383const char kOptionsWindowLastTabIndex[] = "options_window.last_tab_index";
384const char kTrustedDownloadSources[] = "trusted_download_sources";
385#if defined(OS_WIN)
386const char kLastWelcomedOSVersion[] = "browser.last_welcomed_os_version";
387#endif
Marc Treiba58d9962018-09-27 14:40:51388const char kSupervisedUserCreationAllowed[] =
389 "profile.managed_user_creation_allowed";
Ramin Halavati9057c112018-09-17 09:34:16390
Jaeyong Bae6e7d2262018-10-12 14:12:40391// Deprecated 10/2018
392const char kReverseAutologinEnabled[] = "reverse_autologin.enabled";
393
Tarun Bansal5f27ab972018-11-07 01:11:30394// Deprecated 11/2018.
395const char kNetworkQualities[] = "net.network_qualities";
Marc Treib81f6d602018-11-07 10:10:34396const char kForceSessionSync[] = "settings.history_recorded";
Hector Carmona523cf502018-11-19 19:51:40397const char kOnboardDuringNUX[] = "browser.onboard_during_nux";
Hector Carmona2ced80ec2018-11-29 21:35:01398const char kNuxOnboardGroup[] = "browser.onboard_group";
Matt Menke7f7caba2018-11-20 22:01:55399// This pref is particularly large, taking up 15+% of the prefs file, so should
400// perhaps be kept around longer than the others.
401const char kHttpServerProperties[] = "net.http_server_properties";
Tarun Bansal5f27ab972018-11-07 01:11:30402
Joshua Pawlicki009fb5f12019-01-18 21:44:47403// Deprecated 1/2019.
404const char kNextUpdateCheck[] = "extensions.autoupdate.next_check";
405const char kLastUpdateCheck[] = "extensions.autoupdate.last_check";
406
Gayane Petrosyan3818f75f2019-03-28 23:04:18407// Deprecated 3/2019.
408const char kCurrentThemeImages[] = "extensions.theme.images";
409const char kCurrentThemeColors[] = "extensions.theme.colors";
410const char kCurrentThemeTints[] = "extensions.theme.tints";
411const char kCurrentThemeDisplayProperties[] = "extensions.theme.properties";
412
Natalie Chouinard2f9dbcf2019-04-02 23:54:35413#if defined(OS_ANDROID)
414// Deprecated 4/2019.
415const char kDismissedAssetDownloadSuggestions[] =
416 "ntp_suggestions.downloads.assets.dismissed_ids";
417const char kDismissedOfflinePageDownloadSuggestions[] =
418 "ntp_suggestions.downloads.offline_pages.dismissed_ids";
Natalie Chouinardbdc8cef2019-04-16 19:55:49419
420// Deprecated 4/2019.
421const char kBreakingNewsSubscriptionDataToken[] =
422 "ntp_suggestions.breaking_news_subscription_data.token";