blob: 524bf28d71466d2a8482748aefb2aaf9fd7ff8d0 [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
rkaplow058da3132015-02-19 18:18:389#include "base/metrics/histogram_macros.h"
primiano6221e572015-01-28 12:14:3410#include "base/trace_event/trace_event.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"
[email protected]7a25d872012-05-21 19:14:1313#include "chrome/browser/accessibility/invert_bubble_prefs.h"
[email protected]b1de2c72013-02-06 02:45:4714#include "chrome/browser/browser_process_impl.h"
[email protected]c5cf01032009-02-16 07:00:3715#include "chrome/browser/browser_shutdown.h"
[email protected]bca18382012-06-25 19:15:2316#include "chrome/browser/chrome_content_browser_client.h"
sorinebcfc8dd2016-08-12 21:57:1817#include "chrome/browser/component_updater/component_updater_prefs.h"
[email protected]a6d36cc2011-02-23 00:39:4818#include "chrome/browser/custom_handlers/protocol_handler_registry.h"
[email protected]70019152012-12-19 11:44:1919#include "chrome/browser/devtools/devtools_window.h"
[email protected]e5dc4222010-08-30 22:16:3220#include "chrome/browser/download/download_prefs.h"
dmurph93fa43b2017-02-07 23:45:1621#include "chrome/browser/engagement/important_sites_util.h"
[email protected]ed2b1002011-05-25 14:12:1022#include "chrome/browser/external_protocol/external_protocol_handler.h"
[email protected]1b3588d2012-10-10 21:17:2523#include "chrome/browser/first_run/first_run.h"
[email protected]4e48d772010-02-18 12:11:1424#include "chrome/browser/geolocation/geolocation_prefs.h"
[email protected]e6933d2a2013-03-12 22:32:2125#include "chrome/browser/gpu/gpu_mode_manager.h"
qinmin9899e492016-08-05 19:03:2626#include "chrome/browser/gpu/gpu_profile_cache.h"
[email protected]5e9d1f72011-01-19 14:15:2327#include "chrome/browser/intranet_redirect_detector.h"
[email protected]3c319eb2013-02-21 14:44:4528#include "chrome/browser/io_thread.h"
[email protected]cd80cce2013-12-02 15:19:1929#include "chrome/browser/media/media_device_id_salt.h"
mcasasa2023ab2016-09-08 01:06:3630#include "chrome/browser/media/webrtc/media_capture_devices_dispatcher.h"
31#include "chrome/browser/media/webrtc/media_stream_devices_controller.h"
[email protected]4a55a712014-06-08 16:50:3432#include "chrome/browser/metrics/chrome_metrics_service_client.h"
[email protected]ad66db12014-07-10 12:43:4733#include "chrome/browser/net/http_server_properties_manager_factory.h"
tbansal0d42d6c2016-10-21 16:01:0434#include "chrome/browser/net/nqe/ui_network_quality_estimator_service.h"
[email protected]ba85a602014-06-28 20:37:1235#include "chrome/browser/net/prediction_options.h"
[email protected]67372ecf2011-09-10 01:30:4636#include "chrome/browser/net/predictor.h"
Matt Menkecfef87d2017-08-03 13:03:0637#include "chrome/browser/net/profile_network_context_service.h"
peter70152812014-09-24 19:56:2538#include "chrome/browser/notifications/extension_welcome_notification.h"
peterc4007912015-07-31 21:13:3739#include "chrome/browser/notifications/notifier_state_tracker.h"
[email protected]18a4d63c82012-05-25 23:37:0340#include "chrome/browser/pepper_flash_settings_manager.h"
[email protected]cb166d4e3f2012-11-01 06:36:0841#include "chrome/browser/plugins/plugin_finder.h"
Owen Min54ddcd72017-08-16 20:10:5842#include "chrome/browser/policy/policy_helpers.h"
[email protected]24f95242014-02-10 17:55:2843#include "chrome/browser/prefs/chrome_pref_service_factory.h"
[email protected]4e94ab32011-08-05 05:28:2744#include "chrome/browser/prefs/incognito_mode_prefs.h"
iclelland27f4bcb2016-06-22 16:41:0345#include "chrome/browser/prefs/origin_trial_prefs.h"
[email protected]37858e52010-08-26 00:22:0246#include "chrome/browser/prefs/session_startup_pref.h"
[email protected]1bee6ed2012-03-14 06:46:3647#include "chrome/browser/profiles/chrome_version_service.h"
[email protected]ee937fe2013-02-27 00:41:5948#include "chrome/browser/profiles/profile.h"
[email protected]8ecad5e2010-12-02 21:18:3349#include "chrome/browser/profiles/profile_impl.h"
[email protected]dee810e2011-06-27 19:43:3950#include "chrome/browser/profiles/profile_info_cache.h"
[email protected]de71ae992013-07-18 03:30:3851#include "chrome/browser/profiles/profiles_state.h"
johnmecf2da0c2015-10-28 19:42:1252#include "chrome/browser/push_messaging/push_messaging_app_identifier.h"
[email protected]bb9c9752013-04-25 23:02:1153#include "chrome/browser/renderer_host/pepper/device_id_fetcher.h"
gab3ca4a492017-03-02 00:19:4154#include "chrome/browser/rlz/chrome_rlz_tracker_delegate.h"
[email protected]a7b8e43d2013-03-18 18:52:4355#include "chrome/browser/search/search.h"
[email protected]8a120892012-06-08 01:18:5056#include "chrome/browser/signin/signin_manager_factory.h"
avi24d693f2016-08-06 18:03:5257#include "chrome/browser/task_manager/task_manager_interface.h"
oysteine386fc9e2015-06-07 18:45:4158#include "chrome/browser/tracing/chrome_tracing_delegate.h"
[email protected]f0ee7912013-02-27 06:02:5559#include "chrome/browser/ui/app_list/app_list_service.h"
[email protected]2cd4fde2012-06-26 03:10:2660#include "chrome/browser/ui/browser_ui_prefs.h"
[email protected]26bd3893c2014-04-15 18:59:5861#include "chrome/browser/ui/navigation_correction_tab_observer.h"
[email protected]297fb7c22012-06-26 12:37:4962#include "chrome/browser/ui/network_profile_bubble.h"
[email protected]9ce7cb42011-12-07 18:53:0763#include "chrome/browser/ui/prefs/prefs_tab_helper.h"
[email protected]62f77772011-02-23 19:45:4264#include "chrome/browser/ui/search_engines/keyword_editor_controller.h"
[email protected]b56e2e32012-05-11 21:18:0465#include "chrome/browser/ui/tabs/pinned_tab_codec.h"
[email protected]265a1492011-02-27 05:58:0766#include "chrome/browser/ui/webui/flags_ui.h"
[email protected]213723212012-09-21 22:28:4667#include "chrome/browser/ui/webui/instant_ui.h"
[email protected]7c5c6f3a2011-04-28 19:56:4968#include "chrome/browser/ui/webui/ntp/new_tab_ui.h"
[email protected]0209b442012-07-18 00:38:0569#include "chrome/browser/ui/webui/print_preview/sticky_settings.h"
sievers2f1e8112015-12-04 18:43:5670#include "chrome/common/features.h"
[email protected]f87919d72011-02-02 18:46:1671#include "chrome/common/pref_names.h"
[email protected]526a16b2013-06-20 11:44:3372#include "components/autofill/core/browser/autofill_manager.h"
ioanapa8bfbc72016-09-07 16:09:0573#include "components/browsing_data/core/pref_names.h"
rsleevi96356f82016-06-30 09:01:2074#include "components/certificate_transparency/ct_policy_manager.h"
mukai8eaec822014-10-25 17:53:1675#include "components/content_settings/core/browser/host_content_settings_map.h"
[email protected]6a5b0712014-07-16 00:30:1076#include "components/dom_distiller/core/distilled_page_prefs.h"
treib72fb38882017-03-17 14:58:5577#include "components/doodle/doodle_service.h"
sdefresne8593e6432015-12-01 12:38:0878#include "components/flags_ui/pref_service_flags_storage.h"
jianli2dc910b02014-09-19 02:42:4679#include "components/gcm_driver/gcm_channel_status_syncer.h"
Michael Martis98cd8732017-07-14 03:26:1980#include "components/language/core/browser/url_language_histogram.h"
[email protected]d0ab865b2014-06-04 19:41:3481#include "components/network_time/network_time_tracker.h"
dgn52914722016-10-18 10:28:4282#include "components/ntp_snippets/content_suggestions_service.h"
jkrcal093410c2016-12-21 16:13:5583#include "components/ntp_snippets/remote/remote_suggestions_provider_impl.h"
jkrcalf9966462017-03-29 16:25:2184#include "components/ntp_snippets/remote/remote_suggestions_scheduler_impl.h"
treibe0e11db2016-09-29 15:35:3485#include "components/ntp_snippets/remote/request_throttler.h"
skym9e961db2016-09-19 19:02:0886#include "components/ntp_snippets/sessions/foreign_sessions_suggestions_provider.h"
jkrcale13510e2016-09-08 17:56:2087#include "components/ntp_snippets/user_classifier.h"
treibbb0c5af52016-12-09 17:34:1588#include "components/ntp_tiles/most_visited_sites.h"
jianliac940cb2017-06-07 05:13:0889#include "components/offline_pages/features/features.h"
blundell2102f7c2015-07-09 10:00:5390#include "components/omnibox/browser/zero_suggest_provider.h"
melandory444f85f2015-09-07 13:32:4291#include "components/password_manager/core/browser/password_bubble_experiment.h"
[email protected]1f730bd2014-02-28 15:11:3292#include "components/password_manager/core/browser/password_manager.h"
anthonyvd6a43b932017-05-11 18:39:2793#include "components/payments/core/payment_prefs.h"
brettw03e61962016-03-15 06:27:0494#include "components/policy/core/browser/browser_policy_connector.h"
95#include "components/policy/core/browser/url_blacklist_manager.h"
96#include "components/policy/core/common/policy_statistics_collector.h"
[email protected]f0c8c4992014-05-15 17:37:2697#include "components/pref_registry/pref_registry_syncable.h"
brettwb1fc1b82016-02-02 00:19:0898#include "components/prefs/pref_registry_simple.h"
99#include "components/prefs/pref_service.h"
abhishek.a2171c612852015-08-31 10:48:19100#include "components/proxy_config/pref_proxy_config_tracker_impl.h"
nzolghadrd87a308d2016-12-07 15:45:56101#include "components/rappor/rappor_service_impl.h"
Luke Zielinski12ef88552017-06-23 15:36:27102#include "components/safe_browsing/common/safe_browsing_prefs.h"
[email protected]0915b352014-06-25 19:58:14103#include "components/search_engines/template_url_prepopulate_data.h"
abhishek.a212849cee2015-10-20 11:27:29104#include "components/ssl_config/ssl_config_service_manager.h"
fdoray44cd7812016-01-08 17:03:59105#include "components/startup_metric_utils/browser/startup_metric_utils.h"
engedyc5ef21ad2016-06-17 20:22:27106#include "components/subresource_filter/core/browser/ruleset_service.h"
maxbogue2f960e52016-10-07 01:24:15107#include "components/sync/base/sync_prefs.h"
maxbogueea16ff412016-10-28 16:35:29108#include "components/sync_preferences/pref_service_syncable.h"
[email protected]81135072014-02-14 14:11:02109#include "components/translate/core/browser/translate_prefs.h"
wafflesd2d9a332016-04-09 01:59:57110#include "components/update_client/update_client.h"
blundell0300cdea2015-09-03 12:47:44111#include "components/variations/service/variations_service.h"
[email protected]f3b1a082011-11-18 00:34:30112#include "content/public/browser/render_process_host.h"
brettw00899e62016-11-12 02:10:17113#include "extensions/features/features.h"
[email protected]ad66db12014-07-10 12:43:47114#include "net/http/http_server_properties_manager.h"
brettw4b461082016-11-19 18:55:16115#include "ppapi/features/features.h"
Brett Wilson65f951c2016-11-03 22:06:12116#include "printing/features/features.h"
gab3ca4a492017-03-02 00:19:41117#include "rlz/features/features.h"
[email protected]a814d8632009-01-31 20:18:52118
brettwd1bc9da2016-10-14 19:04:24119#if BUILDFLAG(ENABLE_APP_LIST)
thestigf2a0fa92016-09-07 09:37:29120#include "chrome/browser/apps/drive/drive_app_mapping.h"
khmeleca50572016-11-03 16:54:45121#include "chrome/browser/ui/app_list/app_list_syncable_service.h"
thestigf2a0fa92016-09-07 09:37:29122#endif
123
brettw3224f3c2016-02-25 20:07:45124#if BUILDFLAG(ENABLE_BACKGROUND)
thestige4155842014-10-20 18:58:02125#include "chrome/browser/background/background_mode_manager.h"
126#endif
127
brettw00899e62016-11-12 02:10:17128#if BUILDFLAG(ENABLE_EXTENSIONS)
je_julie.kim7fbb5a1a2015-02-09 17:26:05129#include "chrome/browser/accessibility/animation_policy_prefs.h"
thestige4155842014-10-20 18:58:02130#include "chrome/browser/apps/shortcut_manager.h"
[email protected]17510602014-06-05 11:02:28131#include "chrome/browser/extensions/activity_log/activity_log.h"
132#include "chrome/browser/extensions/api/commands/command_service.h"
133#include "chrome/browser/extensions/api/tabs/tabs_api.h"
[email protected]d5a74be2014-08-08 01:01:27134#include "chrome/browser/extensions/extension_web_ui.h"
[email protected]17510602014-06-05 11:02:28135#include "chrome/browser/extensions/launch_util.h"
rdevlin.cronin81d35162017-05-31 15:44:48136#include "chrome/browser/extensions/ntp_overridden_bubble_delegate.h"
[email protected]deba96a2014-08-03 05:48:54137#include "chrome/browser/signin/easy_unlock_service.h"
thakis678822e2017-04-20 17:20:34138#include "chrome/browser/ui/toolbar/component_toolbar_actions_factory.h"
avib896c712015-12-26 02:10:43139#include "chrome/browser/ui/toolbar/toolbar_actions_bar.h"
thestig428c2ca2014-09-07 06:17:51140#include "chrome/browser/ui/webui/extensions/extension_settings_handler.h"
tbarzicfa3c7ef62017-04-17 23:12:02141#include "extensions/browser/api/audio/audio_api.h"
afakhry2bd481832016-06-16 16:17:24142#include "extensions/browser/api/runtime/runtime_api.h"
[email protected]d5a74be2014-08-08 01:01:27143#include "extensions/browser/extension_prefs.h"
brettw00899e62016-11-12 02:10:17144#endif // BUILDFLAG(ENABLE_EXTENSIONS)
[email protected]17510602014-06-05 11:02:28145
jianliac940cb2017-06-07 05:13:08146#if BUILDFLAG(ENABLE_OFFLINE_PAGES)
Dmitry Titov4d2bde02017-06-30 05:29:52147#include "chrome/browser/offline_pages/prefetch/offline_metrics_collector_impl.h"
Justin DeWittfa60f892017-07-26 01:33:33148#include "chrome/browser/offline_pages/prefetch/prefetch_background_task_handler_impl.h"
jianliac940cb2017-06-07 05:13:08149#endif
150
bauerbecab4f52017-03-13 20:16:41151#if BUILDFLAG(ENABLE_PLUGINS)
bauerb4da36132014-12-26 19:53:13152#include "chrome/browser/plugins/plugins_resource_service.h"
153#endif
154
brettw9e85ef42016-11-01 21:01:24155#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
kotenkov8695455122015-04-16 16:40:07156#include "chrome/browser/supervised_user/child_accounts/child_account_service.h"
treibb473df22015-01-08 18:08:26157#include "chrome/browser/supervised_user/legacy/supervised_user_shared_settings_service.h"
158#include "chrome/browser/supervised_user/legacy/supervised_user_sync_service.h"
[email protected]cce15bb2014-06-17 13:43:51159#include "chrome/browser/supervised_user/supervised_user_service.h"
bauerb4da36132014-12-26 19:53:13160#include "chrome/browser/supervised_user/supervised_user_whitelist_service.h"
[email protected]a0795592013-05-25 14:19:02161#endif
162
thestig4888f292016-10-07 23:57:55163#if BUILDFLAG(ENABLE_SERVICE_DISCOVERY)
[email protected]9544e562013-09-21 04:20:55164#include "chrome/browser/ui/webui/local_discovery/local_discovery_ui.h"
165#endif
166
thestigf2a0fa92016-09-07 09:37:29167#if defined(OS_ANDROID)
zpengdb4a58e2017-01-10 17:40:32168#include "chrome/browser/android/bookmarks/partner_bookmarks_shim.h"
sfierab0f63392017-01-05 14:24:47169#include "chrome/browser/android/ntp/content_suggestions_notifier_service.h"
zpengdb4a58e2017-01-10 17:40:32170#include "chrome/browser/android/ntp/recent_tabs_page_prefs.h"
mlliuee3a405c2016-10-28 22:34:52171#include "chrome/browser/android/preferences/browser_prefs_android.h"
benwells0b3748a2017-03-21 06:28:40172#include "chrome/browser/geolocation/geolocation_permission_context_android.h"
vitaliii2600e8e02016-12-09 17:23:36173#include "chrome/browser/ntp_snippets/download_suggestions_provider.h"
xhwang116acb92017-04-03 18:27:20174#include "components/cdm/browser/media_drm_storage_impl.h"
Vitalii Iarkoe4f716e2017-08-04 06:58:55175#include "components/ntp_snippets/breaking_news/breaking_news_gcm_app_handler.h"
176#include "components/ntp_snippets/breaking_news/subscription_manager_impl.h"
vitaliii9f8aa5f82016-12-22 09:26:35177#include "components/ntp_snippets/category_rankers/click_based_category_ranker.h"
vitaliii2600e8e02016-12-09 17:23:36178#include "components/ntp_snippets/offline_pages/recent_tab_suggestions_provider.h"
179#include "components/ntp_snippets/physical_web_pages/physical_web_page_suggestions_provider.h"
zpengdb4a58e2017-01-10 17:40:32180#include "components/ntp_tiles/popular_sites_impl.h"
thestigf2a0fa92016-09-07 09:37:29181#else
peter9f4490a2017-01-27 00:58:36182#include "chrome/browser/gcm/gcm_product_util.h"
thestigc91176f42014-10-28 20:16:35183#include "chrome/browser/signin/signin_promo.h"
zpengdb4a58e2017-01-10 17:40:32184#include "chrome/browser/ui/startup/startup_browser_creator.h"
dbeam72db0762015-05-20 20:37:12185#include "chrome/browser/ui/webui/foreign_session_handler.h"
zpengdb4a58e2017-01-10 17:40:32186#include "chrome/browser/upgrade_detector.h"
thestigc91176f42014-10-28 20:16:35187#endif
188
[email protected]9acc48602009-11-30 21:18:51189#if defined(OS_CHROMEOS)
peletskyif19358fd2016-11-08 16:21:29190#include "chrome/browser/chromeos/app_mode/arc/arc_kiosk_app_manager.h"
[email protected]1637c192013-02-16 04:00:13191#include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h"
hidehiko5d944082016-11-18 06:16:04192#include "chrome/browser/chromeos/arc/arc_session_manager.h"
msramek56e72e82016-11-17 16:14:47193#include "chrome/browser/chromeos/arc/policy/arc_policy_bridge.h"
Satoru Takabayashi876d4e62014-12-03 04:52:24194#include "chrome/browser/chromeos/customization/customization_document.h"
[email protected]658124652012-10-11 00:49:33195#include "chrome/browser/chromeos/display/display_preferences.h"
[email protected]a5058a22013-08-29 20:49:51196#include "chrome/browser/chromeos/extensions/echo_private_api.h"
mtomaszbd1170f2014-10-21 05:34:18197#include "chrome/browser/chromeos/file_system_provider/registry.h"
[email protected]980d5f9e2013-12-17 17:47:08198#include "chrome/browser/chromeos/first_run/first_run.h"
Toni Barzic14329d02017-07-17 21:59:12199#include "chrome/browser/chromeos/lock_screen_apps/state_controller.h"
jdufault59d6f53d2017-02-15 19:19:37200#include "chrome/browser/chromeos/login/demo_mode/demo_mode_detector.h"
xiaoyinhb849e9c12017-04-21 21:40:33201#include "chrome/browser/chromeos/login/quick_unlock/fingerprint_storage.h"
jdufault489f4302016-05-20 20:34:28202#include "chrome/browser/chromeos/login/quick_unlock/pin_storage.h"
sammiequon250289992016-11-08 07:22:04203#include "chrome/browser/chromeos/login/quick_unlock/quick_unlock_utils.h"
[email protected]3b9deb402014-01-30 17:50:16204#include "chrome/browser/chromeos/login/saml/saml_offline_signin_limiter.h"
[email protected]295ca1a72014-07-01 16:14:31205#include "chrome/browser/chromeos/login/session/user_session_manager.h"
[email protected]aa8328fb2013-04-19 15:09:06206#include "chrome/browser/chromeos/login/startup_utils.h"
[email protected]83d82d42014-05-16 02:04:42207#include "chrome/browser/chromeos/login/users/avatar/user_image_manager.h"
208#include "chrome/browser/chromeos/login/users/avatar/user_image_sync_observer.h"
[email protected]4d390782014-08-15 09:22:58209#include "chrome/browser/chromeos/login/users/chrome_user_manager_impl.h"
[email protected]83d82d42014-05-16 02:04:42210#include "chrome/browser/chromeos/login/users/multi_profile_user_controller.h"
pkotwiczafd6d922015-01-16 00:32:33211#include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h"
kirtika857eeac2016-11-05 00:24:26212#include "chrome/browser/chromeos/net/network_throttling_observer.h"
pneubeckdabdfe912015-06-18 13:42:13213#include "chrome/browser/chromeos/platform_keys/key_permissions.h"
[email protected]b39d25712013-03-14 09:53:40214#include "chrome/browser/chromeos/policy/auto_enrollment_client.h"
[email protected]97275822014-01-21 19:30:36215#include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
[email protected]69a99822013-06-11 00:31:36216#include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h"
[email protected]b39d25712013-03-14 09:53:40217#include "chrome/browser/chromeos/policy/device_status_collector.h"
rsorokin3c13ece2017-01-16 15:58:41218#include "chrome/browser/chromeos/policy/dm_token_storage.h"
[email protected]bcb94772013-12-19 14:28:58219#include "chrome/browser/chromeos/policy/policy_cert_service_factory.h"
[email protected]2424cc52013-07-17 13:44:38220#include "chrome/browser/chromeos/power/power_prefs.h"
[email protected]9acc48602009-11-30 21:18:51221#include "chrome/browser/chromeos/preferences.h"
Justin Carlson45339ae2017-07-17 23:59:10222#include "chrome/browser/chromeos/printing/synced_printers_manager.h"
afakhry5b2b3d92016-10-12 21:15:46223#include "chrome/browser/chromeos/resource_reporter/resource_reporter.h"
[email protected]a28c45a2013-04-18 06:02:18224#include "chrome/browser/chromeos/settings/device_oauth2_token_service.h"
[email protected]0c4d97c2012-09-01 20:47:20225#include "chrome/browser/chromeos/settings/device_settings_cache.h"