blob: 1f6331f99ecb633de84f291b6ca4bd2efbaf69ac [file] [log] [blame]
Avi Drissman4a8573c2022-09-09 19:35:541// Copyright 2012 The Chromium Authors
license.botbf09a502008-08-24 00:55:552// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
initial.commit09911bf2008-07-26 23:55:294
[email protected]37858e52010-08-26 00:22:025#include "chrome/browser/prefs/browser_prefs.h"
initial.commit09911bf2008-07-26 23:55:296
[email protected]c5d4b1842014-06-20 21:19:507#include <string>
John Palmer1e70a002023-08-15 02:20:348#include <string_view>
[email protected]c5d4b1842014-06-20 21:19:509
conniekxu4d14f65c2023-03-28 20:56:3610#include "ash/constants/ash_constants.h"
Artsiom Mitrokhincf332e22023-03-07 16:27:4711#include "base/time/time.h"
primiano6221e572015-01-28 12:14:3412#include "base/trace_event/trace_event.h"
Nico Webereaa08412019-08-14 01:24:3713#include "build/branding_buildflags.h"
avib896c712015-12-26 02:10:4314#include "build/build_config.h"
Maksim Sisovb2e86e272021-09-28 05:24:4915#include "build/chromecast_buildflags.h"
Yuta Hijikata31a359c2020-11-27 07:50:2616#include "build/chromeos_buildflags.h"
[email protected]1a47d7e2010-10-15 00:37:2417#include "chrome/browser/about_flags.h"
Dominic Mazzoni21fb0282019-02-13 18:32:4718#include "chrome/browser/accessibility/accessibility_labels_service.h"
James Wallace-Lee25a1b05e2018-07-24 00:06:3119#include "chrome/browser/accessibility/accessibility_ui.h"
[email protected]7a25d872012-05-21 19:14:1320#include "chrome/browser/accessibility/invert_bubble_prefs.h"
Jiaming Chengd3d84762023-07-20 20:47:3621#include "chrome/browser/ash/notifications/update_notification_showing_controller.h"
[email protected]b1de2c72013-02-06 02:45:4722#include "chrome/browser/browser_process_impl.h"
[email protected]bca18382012-06-25 19:15:2323#include "chrome/browser/chrome_content_browser_client.h"
Simon Hangl8ebaf732023-08-25 14:59:4724#include "chrome/browser/chromeos/enterprise/cloud_storage/policy_utils.h"
Andrew Rayskiy0ec947f2023-08-23 09:19:5425#include "chrome/browser/chromeos/upload_office_to_cloud/upload_office_to_cloud.h"
sorinebcfc8dd2016-08-12 21:57:1826#include "chrome/browser/component_updater/component_updater_prefs.h"
[email protected]70019152012-12-19 11:44:1927#include "chrome/browser/devtools/devtools_window.h"
[email protected]e5dc4222010-08-30 22:16:3228#include "chrome/browser/download/download_prefs.h"
dmurph93fa43b2017-02-07 23:45:1629#include "chrome/browser/engagement/important_sites_util.h"
Dominique Fauteux-Chapleau556bb84f2020-04-20 22:06:2930#include "chrome/browser/enterprise/connectors/connectors_prefs.h"
Og Astorga3089fd82021-09-21 00:02:3731#include "chrome/browser/enterprise/reporting/prefs.h"
Dominique Fauteux-Chapleau0e897db02021-04-19 18:42:2232#include "chrome/browser/enterprise/util/managed_browser_utils.h"
[email protected]ed2b1002011-05-25 14:12:1033#include "chrome/browser/external_protocol/external_protocol_handler.h"
[email protected]1b3588d2012-10-10 21:17:2534#include "chrome/browser/first_run/first_run.h"
[email protected]e6933d2a2013-03-12 22:32:2135#include "chrome/browser/gpu/gpu_mode_manager.h"
Avi Drissmand30927342018-05-22 15:04:2736#include "chrome/browser/lifetime/browser_shutdown.h"
rajendrantff2361da2020-12-16 09:18:2737#include "chrome/browser/login_detection/login_detection_prefs.h"
Becca Hughes6354b6b2017-08-31 22:01:5538#include "chrome/browser/media/media_engagement_service.h"
John Rummelle5621c12017-09-05 23:52:1039#include "chrome/browser/media/media_storage_id_salt.h"
Bryant Chandlerd638fb02023-11-03 23:40:1740#include "chrome/browser/media/prefs/capture_device_ranking.h"
George Benz13da3df02022-01-14 00:03:5241#include "chrome/browser/media/router/discovery/access_code/access_code_cast_feature.h"
Derek Cheng23a01402018-07-24 13:38:1442#include "chrome/browser/media/router/media_router_feature.h"
Simon Hangl2d73e742023-06-16 16:52:4743#include "chrome/browser/media/webrtc/capture_policy_utils.h"
mcasasa2023ab2016-09-08 01:06:3644#include "chrome/browser/media/webrtc/media_capture_devices_dispatcher.h"
Evan Stade32d635a2020-04-03 18:51:2545#include "chrome/browser/media/webrtc/permission_bubble_media_access_handler.h"
Sebastien Marchand5a63997a2019-09-27 19:15:3446#include "chrome/browser/memory/enterprise_memory_limit_pref_observer.h"
[email protected]4a55a712014-06-08 16:50:3447#include "chrome/browser/metrics/chrome_metrics_service_client.h"
Eric Secklera5c24e12018-11-28 16:09:2048#include "chrome/browser/net/net_error_tab_helper.h"
Matt Menkecfef87d2017-08-03 13:03:0649#include "chrome/browser/net/profile_network_context_service.h"
Ben Schwartz135746c2020-05-14 04:37:0350#include "chrome/browser/net/secure_dns_util.h"
Matt Menke4dfb375c2018-06-13 18:06:3151#include "chrome/browser/net/system_network_context_manager.h"
Tom Anderson1ef51d032020-02-11 01:05:0852#include "chrome/browser/notifications/notification_display_service_impl.h"
peterc4007912015-07-31 21:13:3753#include "chrome/browser/notifications/notifier_state_tracker.h"
Sharon Yangc6706902018-07-16 13:06:1954#include "chrome/browser/notifications/platform_notification_service_impl.h"
Balazs Engedy715b0ec2019-12-04 15:11:4555#include "chrome/browser/permissions/quiet_notification_permission_ui_state.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"
[email protected]37858e52010-08-26 00:22:0258#include "chrome/browser/prefs/session_startup_pref.h"
Max Curran14dd7872023-03-20 19:57:3659#include "chrome/browser/preloading/prefetch/prefetch_service/prefetch_origin_decider.h"
Sreeja Kamishettyb8e18ae2022-07-22 03:12:4360#include "chrome/browser/preloading/prefetch/search_prefetch/search_prefetch_service.h"
Hiroki Nakagawa0977bd02023-09-08 15:33:1161#include "chrome/browser/preloading/preloading_prefs.h"
Nikita Podguzov26222d12019-12-04 11:44:3162#include "chrome/browser/printing/print_preview_sticky_settings.h"
[email protected]1bee6ed2012-03-14 06:46:3663#include "chrome/browser/profiles/chrome_version_service.h"
Thomas Tanglc67ace42019-06-07 19:31:5064#include "chrome/browser/profiles/profile_attributes_entry.h"
Alex Ilinbb08a0d2021-07-08 09:37:2465#include "chrome/browser/profiles/profile_attributes_storage.h"
[email protected]8ecad5e2010-12-02 21:18:3366#include "chrome/browser/profiles/profile_impl.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"
Illia Klimov4b72378ed2022-07-18 13:46:5769#include "chrome/browser/push_messaging/push_messaging_service_impl.h"
gab3ca4a492017-03-02 00:19:4170#include "chrome/browser/rlz/chrome_rlz_tracker_delegate.h"
[email protected]a7b8e43d2013-03-18 18:52:4371#include "chrome/browser/search/search.h"
Himanshu Jajubcf3b9292019-06-07 12:54:0772#include "chrome/browser/sharing/sharing_sync_preference.h"
Kristi Parkd0f72412021-07-02 01:09:0373#include "chrome/browser/sharing_hub/sharing_hub_features.h"
Ryan Sleevi4689ad32018-04-16 19:09:0574#include "chrome/browser/ssl/ssl_config_service_manager.h"
avi24d693f2016-08-06 18:03:5275#include "chrome/browser/task_manager/task_manager_interface.h"
Patricia Alfonsoc6f40b5c2023-09-14 21:02:4376#include "chrome/browser/tpcd/experiment/tpcd_pref_names.h"
oysteine386fc9e2015-06-07 18:45:4177#include "chrome/browser/tracing/chrome_tracing_delegate.h"
[email protected]2cd4fde2012-06-26 03:10:2678#include "chrome/browser/ui/browser_ui_prefs.h"
Yifan Luo76b78f072023-11-17 14:49:2679#include "chrome/browser/ui/hats/hats_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"
Victor Hugo Vianna Silva3452787c2022-07-28 23:25:3083#include "chrome/browser/ui/send_tab_to_self/send_tab_to_self_bubble.h"
Caroline Risingf4b49092023-03-23 02:28:2684#include "chrome/browser/ui/side_panel/side_panel_prefs.h"
Taylor Bergquistc0109ac2023-11-18 01:10:0485#include "chrome/browser/ui/tabs/organization/prefs.h"
[email protected]b56e2e32012-05-11 21:18:0486#include "chrome/browser/ui/tabs/pinned_tab_codec.h"
Elaine Chien07f137d2021-01-14 02:57:2187#include "chrome/browser/ui/toolbar/chrome_labs_prefs.h"
Livvie Lin9141d0f132020-03-23 22:47:0488#include "chrome/browser/ui/toolbar/chrome_location_bar_model_delegate.h"
dljames4b665b22023-09-21 19:35:0889#include "chrome/browser/ui/toolbar/toolbar_pref_names.h"
Emily Shack670f745c2023-03-03 19:47:3090#include "chrome/browser/ui/webui/bookmarks/bookmark_prefs.h"
dpapad2be5b61c62020-12-08 11:58:4991#include "chrome/browser/ui/webui/flags/flags_ui.h"
[email protected]7c5c6f3a2011-04-28 19:56:4992#include "chrome/browser/ui/webui/ntp/new_tab_ui.h"
Jayee07bb468c2023-06-01 18:25:3193#include "chrome/browser/ui/webui/policy/policy_ui.h"
Nicolas Ouellet-Payeur4dbdf1e52018-08-06 21:51:0294#include "chrome/browser/ui/webui/print_preview/policy_settings.h"
Xing Liu7252b8d2020-01-22 22:12:4795#include "chrome/browser/updates/announcement_notification/announcement_notification_service.h"
Dana Friedb723dc42023-10-26 22:14:2296#include "chrome/browser/user_education/browser_feature_promo_storage_service.h"
Martin Kreichgauer0e1b15e2018-06-20 02:59:5097#include "chrome/browser/webauthn/chrome_authenticator_request_delegate.h"
Martin Kreichgauerd7aa4f92022-02-22 20:46:2198#include "chrome/browser/webauthn/webauthn_pref_names.h"
Scott Violet6200d332018-02-23 21:29:2399#include "chrome/common/buildflags.h"
[email protected]f87919d72011-02-02 18:46:16100#include "chrome/common/pref_names.h"
Ayu Ishiifbb1fad2020-06-22 20:15:07101#include "chrome/common/secure_origin_allowlist.h"
Moe Ahmadi173b0a2b2018-08-03 17:35:51102#include "components/autofill/core/common/autofill_prefs.h"
Clark DuVall8236b6a82020-05-28 22:54:32103#include "components/blocked_content/safe_browsing_triggered_popup_blocker.h"
Jesse McKenna0d767592023-11-03 19:31:52104#include "components/breadcrumbs/core/breadcrumbs_status.h"
ioanapa8bfbc72016-09-07 16:09:05105#include "components/browsing_data/core/pref_names.h"
Doug Turner9e79cf0c2018-04-05 21:32:30106#include "components/certificate_transparency/pref_names.h"
Matt Jones704e1a62022-09-20 16:28:24107#include "components/commerce/core/pref_names.h"
mukai8eaec822014-10-25 17:53:16108#include "components/content_settings/core/browser/host_content_settings_map.h"
Andrew Williams0e136592023-08-09 15:13:34109#include "components/content_settings/core/common/pref_names.h"
Javier Fernández García-Boente7966a892021-12-09 12:28:23110#include "components/custom_handlers/protocol_handler_registry.h"
[email protected]6a5b0712014-07-16 00:30:10111#include "components/dom_distiller/core/distilled_page_prefs.h"
Katie D1ca4328b2020-02-19 18:08:47112#include "components/dom_distiller/core/dom_distiller_features.h"
113#include "components/dom_distiller/core/pref_names.h"
Alex Chen9e56f7352023-01-20 22:56:15114#include "components/domain_reliability/domain_reliability_prefs.h"
Mugdha Lakhanida851fd2021-03-16 18:21:02115#include "components/embedder_support/origin_trials/origin_trial_prefs.h"
hmaree31cadf52022-11-09 22:32:55116#include "components/enterprise/browser/identifiers/identifiers_prefs.h"
Dominique Fauteux-Chapleaub6be8ae2023-09-26 13:48:40117#include "components/enterprise/buildflags/buildflags.h"
sdefresne8593e6432015-12-01 12:38:08118#include "components/flags_ui/pref_service_flags_storage.h"
Moe Ahmadi656dd532021-10-06 21:59:18119#include "components/history_clusters/core/history_clusters_prefs.h"
Brandon Wyliec7a94502018-10-18 18:43:25120#include "components/image_fetcher/core/cache/image_cache.h"
Anthony Vallee-Dubois43fded9702020-06-19 16:30:38121#include "components/invalidation/impl/fcm_invalidation_service.h"
Tanja Gornak5c8b5d952018-10-12 14:39:54122#include "components/invalidation/impl/invalidator_registrar_with_memory.h"
Marc Treib8c29f0c2019-12-19 12:48:07123#include "components/invalidation/impl/per_user_topic_subscription_manager.h"
Anthony Vallee-Dubois6f993122018-09-17 16:13:28124#include "components/language/content/browser/geo_language_provider.h"
Alexandre Frechette38f4ef92019-02-25 16:31:57125#include "components/language/content/browser/ulp_language_code_locator/ulp_language_code_locator.h"
Alexandre Frechette572755b2019-02-13 22:30:20126#include "components/language/core/browser/language_prefs.h"
Duncan Mercer8062eef2022-12-28 22:28:37127#include "components/lens/buildflags.h"
Joe DeBlasio59db500b2020-08-21 00:37:35128#include "components/lookalikes/core/lookalike_url_util.h"
Guido Urdaneta