blob: 851794fb5cebcb309c5313e9de3900db9bef5856 [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]e6933d2a2013-03-12 22:32:2124#include "chrome/browser/gpu/gpu_mode_manager.h"
[email protected]5e9d1f72011-01-19 14:15:2325#include "chrome/browser/intranet_redirect_detector.h"
[email protected]3c319eb2013-02-21 14:44:4526#include "chrome/browser/io_thread.h"
[email protected]cd80cce2013-12-02 15:19:1927#include "chrome/browser/media/media_device_id_salt.h"
Becca Hughes6354b6b2017-08-31 22:01:5528#include "chrome/browser/media/media_engagement_service.h"
John Rummelle5621c12017-09-05 23:52:1029#include "chrome/browser/media/media_storage_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"
tbansal0d42d6c2016-10-21 16:01:0433#include "chrome/browser/net/nqe/ui_network_quality_estimator_service.h"
[email protected]ba85a602014-06-28 20:37:1234#include "chrome/browser/net/prediction_options.h"
[email protected]67372ecf2011-09-10 01:30:4635#include "chrome/browser/net/predictor.h"
Matt Menkecfef87d2017-08-03 13:03:0636#include "chrome/browser/net/profile_network_context_service.h"
Anita Woodruffda0cdb642017-08-22 18:36:5037#include "chrome/browser/notifications/notification_channels_provider_android.h"
peterc4007912015-07-31 21:13:3738#include "chrome/browser/notifications/notifier_state_tracker.h"
[email protected]18a4d63c82012-05-25 23:37:0339#include "chrome/browser/pepper_flash_settings_manager.h"
Owen Min54ddcd72017-08-16 20:10:5840#include "chrome/browser/policy/policy_helpers.h"
[email protected]24f95242014-02-10 17:55:2841#include "chrome/browser/prefs/chrome_pref_service_factory.h"
[email protected]4e94ab32011-08-05 05:28:2742#include "chrome/browser/prefs/incognito_mode_prefs.h"
iclelland27f4bcb2016-06-22 16:41:0343#include "chrome/browser/prefs/origin_trial_prefs.h"
[email protected]37858e52010-08-26 00:22:0244#include "chrome/browser/prefs/session_startup_pref.h"
[email protected]1bee6ed2012-03-14 06:46:3645#include "chrome/browser/profiles/chrome_version_service.h"
[email protected]ee937fe2013-02-27 00:41:5946#include "chrome/browser/profiles/profile.h"
[email protected]8ecad5e2010-12-02 21:18:3347#include "chrome/browser/profiles/profile_impl.h"
[email protected]dee810e2011-06-27 19:43:3948#include "chrome/browser/profiles/profile_info_cache.h"
[email protected]de71ae992013-07-18 03:30:3849#include "chrome/browser/profiles/profiles_state.h"
johnmecf2da0c2015-10-28 19:42:1250#include "chrome/browser/push_messaging/push_messaging_app_identifier.h"
[email protected]bb9c9752013-04-25 23:02:1151#include "chrome/browser/renderer_host/pepper/device_id_fetcher.h"
gab3ca4a492017-03-02 00:19:4152#include "chrome/browser/rlz/chrome_rlz_tracker_delegate.h"
[email protected]a7b8e43d2013-03-18 18:52:4353#include "chrome/browser/search/search.h"
[email protected]8a120892012-06-08 01:18:5054#include "chrome/browser/signin/signin_manager_factory.h"
avi24d693f2016-08-06 18:03:5255#include "chrome/browser/task_manager/task_manager_interface.h"
oysteine386fc9e2015-06-07 18:45:4156#include "chrome/browser/tracing/chrome_tracing_delegate.h"
Shivani Sharma343451382017-12-07 20:18:0857#include "chrome/browser/ui/blocked_content/safe_browsing_triggered_popup_blocker.h"
Charles Harrison6d6838d2018-03-20 15:37:2958#include "chrome/browser/ui/blocked_content/tab_under_navigation_throttle.h"
[email protected]2cd4fde2012-06-26 03:10:2659#include "chrome/browser/ui/browser_ui_prefs.h"
[email protected]26bd3893c2014-04-15 18:59:5860#include "chrome/browser/ui/navigation_correction_tab_observer.h"
[email protected]297fb7c22012-06-26 12:37:4961#include "chrome/browser/ui/network_profile_bubble.h"
[email protected]9ce7cb42011-12-07 18:53:0762#include "chrome/browser/ui/prefs/prefs_tab_helper.h"
[email protected]62f77772011-02-23 19:45:4263#include "chrome/browser/ui/search_engines/keyword_editor_controller.h"
[email protected]b56e2e32012-05-11 21:18:0464#include "chrome/browser/ui/tabs/pinned_tab_codec.h"
[email protected]265a1492011-02-27 05:58:0765#include "chrome/browser/ui/webui/flags_ui.h"
[email protected]7c5c6f3a2011-04-28 19:56:4966#include "chrome/browser/ui/webui/ntp/new_tab_ui.h"
[email protected]0209b442012-07-18 00:38:0567#include "chrome/browser/ui/webui/print_preview/sticky_settings.h"
Scott Violet6200d332018-02-23 21:29:2368#include "chrome/common/buildflags.h"
[email protected]f87919d72011-02-02 18:46:1669#include "chrome/common/pref_names.h"
Daniel Vogelheim976f1c22017-11-22 16:26:0370#include "chrome/common/secure_origin_whitelist.h"
[email protected]526a16b2013-06-20 11:44:3371#include "components/autofill/core/browser/autofill_manager.h"
ioanapa8bfbc72016-09-07 16:09:0572#include "components/browsing_data/core/pref_names.h"
rsleevi96356f82016-06-30 09:01:2073#include "components/certificate_transparency/ct_policy_manager.h"
mukai8eaec822014-10-25 17:53:1674#include "components/content_settings/core/browser/host_content_settings_map.h"
[email protected]6a5b0712014-07-16 00:30:1075#include "components/dom_distiller/core/distilled_page_prefs.h"
Scott Violet9ae82892018-03-01 18:38:1276#include "components/feature_engagement/buildflags.h"
sdefresne8593e6432015-12-01 12:38:0877#include "components/flags_ui/pref_service_flags_storage.h"
jianli2dc910b02014-09-19 02:42:4678#include "components/gcm_driver/gcm_channel_status_syncer.h"
[email protected]d0ab865b2014-06-04 19:41:3479#include "components/network_time/network_time_tracker.h"
dgn52914722016-10-18 10:28:4280#include "components/ntp_snippets/content_suggestions_service.h"
jkrcal093410c2016-12-21 16:13:5581#include "components/ntp_snippets/remote/remote_suggestions_provider_impl.h"
jkrcalf9966462017-03-29 16:25:2182#include "components/ntp_snippets/remote/remote_suggestions_scheduler_impl.h"
treibe0e11db2016-09-29 15:35:3483#include "components/ntp_snippets/remote/request_throttler.h"
skym9e961db2016-09-19 19:02:0884#include "components/ntp_snippets/sessions/foreign_sessions_suggestions_provider.h"
jkrcale13510e2016-09-08 17:56:2085#include "components/ntp_snippets/user_classifier.h"
treibbb0c5af52016-12-09 17:34:1586#include "components/ntp_tiles/most_visited_sites.h"
Scott Violet9ae82892018-03-01 18:38:1287#include "components/offline_pages/buildflags/buildflags.h"
blundell2102f7c2015-07-09 10:00:5388#include "components/omnibox/browser/zero_suggest_provider.h"
melandory444f85f2015-09-07 13:32:4289#include "components/password_manager/core/browser/password_bubble_experiment.h"
[email protected]1f730bd2014-02-28 15:11:3290#include "components/password_manager/core/browser/password_manager.h"
anthonyvd6a43b932017-05-11 18:39:2791#include "components/payments/core/payment_prefs.h"
brettw03e61962016-03-15 06:27:0492#include "components/policy/core/browser/browser_policy_connector.h"
93#include "components/policy/core/browser/url_blacklist_manager.h"
94#include "components/policy/core/common/policy_statistics_collector.h"
[email protected]f0c8c4992014-05-15 17:37:2695#include "components/pref_registry/pref_registry_syncable.h"
brettwb1fc1b82016-02-02 00:19:0896#include "components/prefs/pref_registry_simple.h"
97#include "components/prefs/pref_service.h"
abhishek.a2171c612852015-08-31 10:48:1998#include "components/proxy_config/pref_proxy_config_tracker_impl.h"
nzolghadrd87a308d2016-12-07 15:45:5699#include "components/rappor/rappor_service_impl.h"
Luke Zielinski12ef88552017-06-23 15:36:27100#include "components/safe_browsing/common/safe_browsing_prefs.h"
[email protected]0915b352014-06-25 19:58:14101#include "components/search_engines/template_url_prepopulate_data.h"
David Rogera6c88122017-10-25 13:02:46102#include "components/signin/core/browser/profile_management_switches.h"
abhishek.a212849cee2015-10-20 11:27:29103#include "components/ssl_config/ssl_config_service_manager.h"
fdoray44cd7812016-01-08 17:03:59104#include "components/startup_metric_utils/browser/startup_metric_utils.h"
engedyc5ef21ad2016-06-17 20:22:27105#include "components/subresource_filter/core/browser/ruleset_service.h"
maxbogue2f960e52016-10-07 01:24:15106#include "components/sync/base/sync_prefs.h"
maxbogueea16ff412016-10-28 16:35:29107#include "components/sync_preferences/pref_service_syncable.h"
[email protected]81135072014-02-14 14:11:02108#include "components/translate/core/browser/translate_prefs.h"
wafflesd2d9a332016-04-09 01:59:57109#include "components/update_client/update_client.h"
blundell0300cdea2015-09-03 12:47:44110#include "components/variations/service/variations_service.h"
[email protected]f3b1a082011-11-18 00:34:30111#include "content/public/browser/render_process_host.h"
Scott Violetc8240b02018-03-08 22:03:59112#include "extensions/buildflags/buildflags.h"
[email protected]ad66db12014-07-10 12:43:47113#include "net/http/http_server_properties_manager.h"
Scott Violet02e38b92018-03-27 23:42:14114#include "ppapi/buildflags/buildflags.h"
Scott Violet318a55f2018-03-30 19:08:19115#include "printing/buildflags/buildflags.h"
gab3ca4a492017-03-02 00:19:41116#include "rlz/features/features.h"
[email protected]a814d8632009-01-31 20:18:52117
brettwd1bc9da2016-10-14 19:04:24118#if BUILDFLAG(ENABLE_APP_LIST)
khmeleca50572016-11-03 16:54:45119#include "chrome/browser/ui/app_list/app_list_syncable_service.h"
thestigf2a0fa92016-09-07 09:37:29120#endif
121
Denis Kuznetsov32099f32017-12-15 14:04:57122#if BUILDFLAG(ENABLE_BACKGROUND_MODE)
thestige4155842014-10-20 18:58:02123#include "chrome/browser/background/background_mode_manager.h"
124#endif
125
brettw00899e62016-11-12 02:10:17126#if BUILDFLAG(ENABLE_EXTENSIONS)
je_julie.kim7fbb5a1a2015-02-09 17:26:05127#include "chrome/browser/accessibility/animation_policy_prefs.h"
thestige4155842014-10-20 18:58:02128#include "chrome/browser/apps/shortcut_manager.h"
[email protected]17510602014-06-05 11:02:28129#include "chrome/browser/extensions/activity_log/activity_log.h"
130#include "chrome/browser/extensions/api/commands/command_service.h"
Adam Langley4da8d112017-11-30 06:24:01131#include "chrome/browser/extensions/api/cryptotoken_private/cryptotoken_private_api.h"
[email protected]17510602014-06-05 11:02:28132#include "chrome/browser/extensions/api/tabs/tabs_api.h"
[email protected]d5a74be2014-08-08 01:01:27133#include "chrome/browser/extensions/extension_web_ui.h"
[email protected]17510602014-06-05 11:02:28134#include "chrome/browser/extensions/launch_util.h"
rdevlin.cronin81d35162017-05-31 15:44:48135#include "chrome/browser/extensions/ntp_overridden_bubble_delegate.h"
thakis678822e2017-04-20 17:20:34136#include "chrome/browser/ui/toolbar/component_toolbar_actions_factory.h"
avib896c712015-12-26 02:10:43137#include "chrome/browser/ui/toolbar/toolbar_actions_bar.h"
thestig428c2ca2014-09-07 06:17:51138#include "chrome/browser/ui/webui/extensions/extension_settings_handler.h"
tbarzicfa3c7ef62017-04-17 23:12:02139#include "extensions/browser/api/audio/audio_api.h"
afakhry2bd481832016-06-16 16:17:24140#include "extensions/browser/api/runtime/runtime_api.h"
[email protected]d5a74be2014-08-08 01:01:27141#include "extensions/browser/extension_prefs.h"
James Hawkins1d1dc7e02018-03-02 22:11:54142#if defined(OS_CHROMEOS)
James Hawkins5330caef2018-03-05 21:00:28143#include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_service.h"
James Hawkins1d1dc7e02018-03-02 22:11:54144#endif
brettw00899e62016-11-12 02:10:17145#endif // BUILDFLAG(ENABLE_EXTENSIONS)
[email protected]17510602014-06-05 11:02:28146
jianliac940cb2017-06-07 05:13:08147#if BUILDFLAG(ENABLE_OFFLINE_PAGES)
Dmitry Titov4d2bde02017-06-30 05:29:52148#include "chrome/browser/offline_pages/prefetch/offline_metrics_collector_impl.h"
Justin DeWittfa60f892017-07-26 01:33:33149#include "chrome/browser/offline_pages/prefetch/prefetch_background_task_handler_impl.h"
jianliac940cb2017-06-07 05:13:08150#endif
151
bauerbecab4f52017-03-13 20:16:41152#if BUILDFLAG(ENABLE_PLUGINS)
Nicholas Verned391eae2017-11-13 02:41:38153#include "chrome/browser/plugins/plugin_info_host_impl.h"
bauerb4da36132014-12-26 19:53:13154#include "chrome/browser/plugins/plugins_resource_service.h"
155#endif
156
brettw9e85ef42016-11-01 21:01:24157#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
kotenkov8695455122015-04-16 16:40:07158#include "chrome/browser/supervised_user/child_accounts/child_account_service.h"
treibb473df22015-01-08 18:08:26159#include "chrome/browser/supervised_user/legacy/supervised_user_shared_settings_service.h"
160#include "chrome/browser/supervised_user/legacy/supervised_user_sync_service.h"
[email protected]cce15bb2014-06-17 13:43:51161#include "chrome/browser/supervised_user/supervised_user_service.h"
bauerb4da36132014-12-26 19:53:13162#include "chrome/browser/supervised_user/supervised_user_whitelist_service.h"
[email protected]a0795592013-05-25 14:19:02163#endif
164
thestig4888f292016-10-07 23:57:55165#if BUILDFLAG(ENABLE_SERVICE_DISCOVERY)
[email protected]9544e562013-09-21 04:20:55166#include "chrome/browser/ui/webui/local_discovery/local_discovery_ui.h"
167#endif
168
Bettina Deaf3dac202017-09-16 20:53:22169#if BUILDFLAG(ENABLE_DESKTOP_IN_PRODUCT_HELP)
170#include "chrome/browser/feature_engagement/session_duration_updater.h"
171#endif
172
thestigf2a0fa92016-09-07 09:37:29173#if defined(OS_ANDROID)
zpengdb4a58e2017-01-10 17:40:32174#include "chrome/browser/android/bookmarks/partner_bookmarks_shim.h"
sfierab0f63392017-01-05 14:24:47175#include "chrome/browser/android/ntp/content_suggestions_notifier_service.h"
zpengdb4a58e2017-01-10 17:40:32176#include "chrome/browser/android/ntp/recent_tabs_page_prefs.h"
Kenichi Ishibashi35ac7132017-12-08 03:44:30177#include "chrome/browser/android/oom_intervention/oom_intervention_decider.h"
mlliuee3a405c2016-10-28 22:34:52178#include "chrome/browser/android/preferences/browser_prefs_android.h"
benwells0b3748a2017-03-21 06:28:40179#include "chrome/browser/geolocation/geolocation_permission_context_android.h"
vitaliii2600e8e02016-12-09 17:23:36180#include "chrome/browser/ntp_snippets/download_suggestions_provider.h"
xhwang116acb92017-04-03 18:27:20181#include "components/cdm/browser/media_drm_storage_impl.h"
Vitalii Iarkoe4f716e2017-08-04 06:58:55182#include "components/ntp_snippets/breaking_news/breaking_news_gcm_app_handler.h"
183#include "components/ntp_snippets/breaking_news/subscription_manager_impl.h"
vitaliii9f8aa5f82016-12-22 09:26:35184#include "components/ntp_snippets/category_rankers/click_based_category_ranker.h"
vitaliii2600e8e02016-12-09 17:23:36185#include "components/ntp_snippets/offline_pages/recent_tab_suggestions_provider.h"
186#include "components/ntp_snippets/physical_web_pages/physical_web_page_suggestions_provider.h"
zpengdb4a58e2017-01-10 17:40:32187#include "components/ntp_tiles/popular_sites_impl.h"
thestigf2a0fa92016-09-07 09:37:29188#else
peter9f4490a2017-01-27 00:58:36189#include "chrome/browser/gcm/gcm_product_util.h"
Michael Giuffridab41fa5c42017-11-13 23:30:57190#include "chrome/browser/metrics/tab_stats_tracker.h"
thestigc91176f42014-10-28 20:16:35191#include "chrome/browser/signin/signin_promo.h"
zpengdb4a58e2017-01-10 17:40:32192#include "chrome/browser/ui/startup/startup_browser_creator.h"
dbeam72db0762015-05-20 20:37:12193#include "chrome/browser/ui/webui/foreign_session_handler.h"
Michael Giuffridab41fa5c42017-11-13 23:30:57194#include "chrome/browser/ui/webui/md_history_ui.h"
195#include "chrome/browser/ui/webui/settings/md_settings_ui.h"
zpengdb4a58e2017-01-10 17:40:32196#include "chrome/browser/upgrade_detector.h"
thestigc91176f42014-10-28 20:16:35197#endif
198
[email protected]9acc48602009-11-30 21:18:51199#if defined(OS_CHROMEOS)
peletskyif19358fd2016-11-08 16:21:29200#include "chrome/browser/chromeos/app_mode/arc/arc_kiosk_app_manager.h"
[email protected]1637c192013-02-16 04:00:13201#include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h"
hidehiko5d944082016-11-18 06:16:04202#include "chrome/browser/chromeos/arc/arc_session_manager.h"
msramek56e72e82016-11-17 16:14:47203#include "chrome/browser/chromeos/arc/policy/arc_policy_bridge.h"
Timothy Lohdc95cdac2018-03-22 01:02:03204#include "chrome/browser/chromeos/crostini/crostini_registry_service.h"
Satoru Takabayashi876d4e62014-12-03 04:52:24205#include "chrome/browser/chromeos/customization/customization_document.h"
Steven Bennettscce939192018-01-12 22:57:12206#include "chrome/browser/chromeos/display/display_prefs.h"
[email protected]a5058a22013-08-29 20:49:51207#include "chrome/browser/chromeos/extensions/echo_private_api.h"
mtomaszbd1170f2014-10-21 05:34:18208#include "chrome/browser/chromeos/file_system_provider/registry.h"
[email protected]980d5f9e2013-12-17 17:47:08209#include "chrome/browser/chromeos/first_run/first_run.h"
Toni Barzic14329d02017-07-17 21:59:12210#include "chrome/browser/chromeos/lock_screen_apps/state_controller.h"
jdufault59d6f53d2017-02-15 19:19:37211#include "chrome/browser/chromeos/login/demo_mode/demo_mode_detector.h"
xiaoyinhb849e9c12017-04-21 21:40:33212#include "chrome/browser/chromeos/login/quick_unlock/fingerprint_storage.h"
jdufault489f4302016-05-20 20:34:28213#include "chrome/browser/chromeos/login/quick_unlock/pin_storage.h"
sammiequon250289992016-11-08 07:22:04214#include "chrome/browser/chromeos/login/quick_unlock/quick_unlock_utils.h"
[email protected]3b9deb402014-01-30 17:50:16215#include "chrome/browser/chromeos/login/saml/saml_offline_signin_limiter.h"
Mattias Nissler41b4a5d2017-09-22 15:37:55216#include "chrome/browser/chromeos/login/screens/reset_screen.h"
[email protected]295ca1a72014-07-01 16:14:31217#include "chrome/browser/chromeos/login/session/user_session_manager.h"
[email protected]aa8328fb2013-04-19 15:09:06218#include "chrome/browser/chromeos/login/startup_utils.h"
[email protected]83d82d42014-05-16 02:04:42219#include "chrome/browser/chromeos/login/users/avatar/user_image_manager.h"
220#include "chrome/browser/chromeos/login/users/avatar/user_image_sync_observer.h"
[email protected]4d390782014-08-15 09:22:58221#include "chrome/browser/chromeos/login/users/chrome_user_manager_impl.h"
[email protected]83d82d42014-05-16 02:04:42222#include "chrome/browser/chromeos/login/users/multi_profile_user_controller.h"
kirtika857eeac2016-11-05 00:24:26223#include "chrome/browser/chromeos/net/network_throttling_observer.h"
pneubeckdabdfe912015-06-18 13:42:13224#include "chrome/browser/chromeos/platform_keys/key_permissions.h"
Bartosz Fabianowski79028ae2018-02-23 17:25:03225#include "chrome/browser/chromeos/policy/app_install_event_logger.h"
[email protected]b39d25712013-03-14 09:53:40226#include "chrome/browser/chromeos/policy/auto_enrollment_client.h"
[email protected]97275822014-01-21 19:30:36227#include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
[email protected]69a99822013-06-11 00:31:36228#include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h"
[email protected]b39d25712013-03-14 09:53:40229#include "chrome/browser/chromeos/policy/device_status_collector.h"
rsorokin3c13ece2017-01-16 15:58:41230#include "chrome/browser/chromeos/policy/dm_token_storage.h"
[email protected]bcb94772013-12-19 14:28:58231#include "chrome/browser/chromeos/policy/policy_cert_service_factory.h"
Daniel Erat645c8652017-11-16 00:01:57232#include "chrome/browser/chromeos/power/power_metrics_reporter.h"
[email protected]2424cc52013-07-17 13:44:38233#include "chrome/browser/chromeos/power/power_prefs.h"
[email protected]9acc48602009-11-30 21:18:51234#include "chrome/browser/chromeos/preferences.h"
David Valleauce0aedfa2018-03-30 18:46:16235#include "chrome/browser/chromeos/printing/cups_printers_manager.h"
Justin Carlson45339ae2017-07-17 23:59:10236#include "chrome/browser/chromeos/printing/synced_printers_manager.h"
afakhry5b2b3d92016-10-12 21:15:46237#include "chrome/browser/chromeos/resource_reporter/resource_reporter.h"
[email protected]a28c45a2013-04-18 06:02:18238#include "chrome/browser/chromeos/settings/device_oauth2_token_service.h"
[email protected]0c4d97c2012-09-01 20:47:20239#include "chrome/browser/chromeos/settings/device_settings_cache.h"
[email protected]c280dbf2013-03-19 12:17:44240#include "chrome/browser/chromeos/system/automatic_reboot_manager.h"
afakhrye8eac602015-11-10 02:31:22241#include "chrome/browser/chromeos/system/input_device_settings.h"
[email protected]a0e44ccf2013-04-19 01:48:22242#include "chrome/browser/extensions/api/enterprise_platform_keys_private/enterprise_platform_keys_private_api.h"
[email protected]5a145e82014-05-29 22:19:07243#include "chrome/browser/extensions/extension_assets_manager_chromeos.h"
xhwangc84739e2015-03-14 01:02:46244#include "chrome/browser/media/protected_media_identifier_permission_context.h"
[email protected]8304f61a2014-05-24 12:17:33245#include "chrome/browser/metrics/chromeos_metrics_provider.h"
Michael Giuffridab41fa5c42017-11-13 23:30:57246#include "chrome/browser/ui/ash/chrome_launcher_prefs.h"
Steven Bennettsdbe837492018-01-11 19:22:11247#include "chrome/browser/ui/ash/network/data_promo_notification.h"
zelidrag459b11b12014-11-14 04:05:53248#include "chrome/browser/ui/webui/chromeos/login/enable_debugging_screen_handler.h"
[email protected]8e6742a52014-05-23 14:56:22249#include "chrome/browser/ui/webui/chromeos/login/hid_detection_screen_handler.h"
[email protected]daf4b542013-07-23 17:11:27250#include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h"
jamescook9439c7392014-12-18 01:47:25251#include "chromeos/audio/audio_devices_pref_handler_impl.h"
hansberry25db6182017-04-12 21:45:34252#include "chromeos/chromeos_switches.h"
stevenjb100c6202016-10-28 02:28:00253#include "chromeos/network/proxy/proxy_config_handler.h"
alemate48255f3d2015-01-30 18:11:41254#include "chromeos/timezone/timezone_resolver.h"
Hidehiko Abe33e9adf2017-09-13 06:12:23255#include "components/arc/arc_prefs.h"
knn062cdbb2015-06-26 18:18:42256#include "components/invalidation/impl/invalidator_storage.h"
stevenjbf22f82e2016-10-26 21:47:38257#include "components/onc/onc_pref_names.h"
glevin5dd01a72016-03-23 23:08:12258#include "components/quirks/quirks_manager.h"
tbarzicd9a88fc92017-07-14 02:18:10259#include "extensions/browser/api/lock_screen_data/lock_screen_item_storage.h"
[email protected]86c6b9e32011-10-25 17:09:10260#else
261#include "chrome/browser/extensions/default_apps.h"
[email protected]9acc48602009-11-30 21:18:51262#endif
263
brettwd1bc9da2016-10-14 19:04:24264#if defined(OS_CHROMEOS) && BUILDFLAG(ENABLE_APP_LIST)
khmeld7c5a322015-12-04 16:24:47265#include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h"
skaref32ba96e2015-02-20 20:27:17266#endif
267
[email protected]ceafc462013-11-04 12:26:03268#if defined(OS_MACOSX)
[email protected]425f7a02014-04-29 01:51:44269#include "chrome/browser/ui/cocoa/apps/quit_with_apps_controller_mac.h"
[email protected]ceafc462013-11-04 12:26:03270#include "chrome/browser/ui/cocoa/confirm_quit.h"
[email protected]2366a3a2012-10-02 20:41:14271#endif
272
[email protected]bdb8a1e2013-10-03 08:14:00273#if defined(OS_WIN)
274#include "chrome/browser/apps/app_launch_for_metro_restart_win.h"
[email protected]c5d4b1842014-06-20 21:19:50275#include "chrome/browser/component_updater/sw_reporter_installer_win.h"
Patrick Monettee7d84a12018-02-28 00:16:34276#if defined(GOOGLE_CHROME_BUILD)
Patrick Monetteaff8f1f82018-03-20 23:03:09277#include "chrome/browser/conflicts/module_database_win.h"
Patrick Monetted9d2e642018-02-06 15:04:03278#include "chrome/browser/conflicts/problematic_programs_updater_win.h"
Patrick Monettee7d84a12018-02-28 00:16:34279#endif // defined(GOOGLE_CHROME_BUILD)
ftirelo46b34222017-06-19 10:36:57280#include "chrome/browser/safe_browsing/chrome_cleaner/settings_resetter_win.h"
alito856526d2017-03-03 09:16:17281#include "chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_prefs_manager.h"
mrefaat957939672017-02-13 21:04:54282#include "chrome/browser/ui/desktop_ios_promotion/desktop_ios_promotion_util.h"
[email protected]bdb8a1e2013-10-03 08:14:00283#endif
284
thestigf2a0fa92016-09-07 09:37:29285#if !defined(OS_ANDROID) && !defined(OS_CHROMEOS)
286#include "chrome/browser/ui/startup/default_browser_prompt.h"
287#endif
288
[email protected]ceafc462013-11-04 12:26:03289#if defined(TOOLKIT_VIEWS)
290#include "chrome/browser/ui/browser_view_prefs.h"
[email protected]ceafc462013-11-04 12:26:03291#endif
292
[email protected]572f40c9b2012-07-06 20:35:33293namespace {
294
takumif0cd92262017-02-10 17:51:51295#if BUILDFLAG(ENABLE_EXTENSIONS)
296// Deprecated 2/2017.
gab3ca4a492017-03-02 00:19:41297constexpr char kToolbarMigratedComponentActionStatus[] =
takumif0cd92262017-02-10 17:51:51298 "toolbar_migrated_component_action_status";
299#endif
300
gab3ca4a492017-03-02 00:19:41301#if BUILDFLAG(ENABLE_RLZ)
302// Migrated out of kDistroDict as of 2/2017.
303constexpr char kDistroRlzPingDelay[] = "ping_delay";
304#endif // BUILDFLAG(ENABLE_RLZ)
305
306// master_preferences used to be mapped as-is to Preferences on first run but
307// the "distribution" dictionary was never used beyond first run. It is now
308// stripped in first_run.cc prior to applying this mapping. Cleanup for existing
309// Preferences files added here 2/2017.
310constexpr char kDistroDict[] = "distribution";
311
Alexei Svitkine472ae5b2017-08-29 19:40:20312#if defined(OS_ANDROID)
313// Deprecated 8/2017.
314const char kStabilityForegroundActivityType[] =
315 "user_experience_metrics.stability.current_foreground_activity_type";
316const char kStabilityLaunchedActivityFlags[] =
317 "user_experience_metrics.stability.launched_activity_flags";
318const char kStabilityLaunchedActivityCounts[] =
319 "user_experience_metrics.stability.launched_activity_counts";
320const char kStabilityCrashedActivityCounts[] =
321 "user_experience_metrics.stability.crashed_activity_counts";
Bret Sepulvedae795b2b2018-01-25 20:00:05322#else
323// Deprecated 1/2018.
324const char kShowFirstRunBubbleOption[] = "show-first-run-bubble-option";
Alexei Svitkine472ae5b2017-08-29 19:40:20325#endif // defined(OS_ANDROID)
326
Marc Treib409320b2017-11-30 14:30:42327// Deprecated 11/2017.
328const char kInstantUIZeroSuggestUrlPrefix[] =
329 "instant_ui.zero_suggest_url_prefix";
330
James Cook0ba192bf2017-12-01 20:53:11331#if defined(OS_CHROMEOS)
332// Deprecated 12/2017.
333const char kTouchHudProjectionEnabled[] = "touch_hud.projection_enabled";
334#endif
335
336// Register prefs used only for migration (clearing or moving to a new key).
337void RegisterProfilePrefsForMigration(
338 user_prefs::PrefRegistrySyncable* registry) {
339#if BUILDFLAG(ENABLE_EXTENSIONS)
340 registry->RegisterDictionaryPref(kToolbarMigratedComponentActionStatus);
341#endif
342
343 registry->RegisterDictionaryPref(kDistroDict);
344 registry->RegisterStringPref(kInstantUIZeroSuggestUrlPrefix, std::string());
345
346#if defined(OS_CHROMEOS)
347 registry->RegisterBooleanPref(kTouchHudProjectionEnabled, false);
348#endif
349}
350
[email protected]572f40c9b2012-07-06 20:35:33351} // namespace
352
[email protected]4082306d92013-02-21 14:51:01353void RegisterLocalState(PrefRegistrySimple* registry) {
[email protected]2a5f29632012-11-26 17:17:55354 // Please keep this list alphabetized.
[email protected]b1de2c72013-02-06 02:45:47355 browser_shutdown::RegisterPrefs(registry);
356 BrowserProcessImpl::RegisterPrefs(registry);
Chris Palmerac7d75642017-11-22 20:12:54357 ChromeContentBrowserClient::RegisterLocalStatePrefs(registry);
[email protected]4a55a712014-06-08 16:50:34358 ChromeMetricsServiceClient::RegisterPrefs(registry);
oysteinede6783b2016-05-25 18:08:43359 ChromeTracingDelegate::RegisterPrefs(registry);
sorinebcfc8dd2016-08-12 21:57:18360 component_updater::RegisterPrefs(registry);
[email protected]b1de2c72013-02-06 02:45:47361 ExternalProtocolHandler::RegisterPrefs(registry);
sdefresne8593e6432015-12-01 12:38:08362 flags_ui::PrefServiceFlagsStorage::RegisterPrefs(registry);
[email protected]e6933d2a2013-03-12 22:32:21363 GpuModeManager::RegisterPrefs(registry);
[email protected]b1de2c72013-02-06 02:45:47364 IntranetRedirectDetector::RegisterPrefs(registry);
[email protected]3c319eb2013-02-21 14:44:45365 IOThread::RegisterPrefs(registry);
[email protected]d0ab865b2014-06-04 19:41:34366 network_time::NetworkTimeTracker::RegisterPrefs(registry);
iclelland27f4bcb2016-06-22 16:41:03367 OriginTrialPrefs::RegisterPrefs(registry);
[email protected]b1de2c72013-02-06 02:45:47368 PrefProxyConfigTrackerImpl::RegisterPrefs(registry);
369 ProfileInfoCache::RegisterPrefs(registry);
[email protected]de71ae992013-07-18 03:30:38370 profiles::RegisterPrefs(registry);
nzolghadrd87a308d2016-12-07 15:45:56371 rappor::RapporServiceImpl::RegisterPrefs(registry);
[email protected]ceafc462013-11-04 12:26:03372 RegisterScreenshotPrefs(registry);
[email protected]b1de2c72013-02-06 02:45:47373 SigninManagerFactory::RegisterPrefs(registry);
abhishek.a212849cee2015-10-20 11:27:29374 ssl_config::SSLConfigServiceManager::RegisterPrefs(registry);
fdoray44cd7812016-01-08 17:03:59375 startup_metric_utils::RegisterPrefs(registry);
Michael Giuffridab41fa5c42017-11-13 23:30:57376 subresource_filter::IndexedRulesetVersion::RegisterPrefs(registry);
wafflesd2d9a332016-04-09 01:59:57377 update_client::RegisterPrefs(registry);
Michael Giuffridab41fa5c42017-11-13 23:30:57378 variations::VariationsService::RegisterPrefs(registry);
[email protected]cc36c2c2012-03-01 00:57:34379
[email protected]b1de2c72013-02-06 02:45:47380 policy::BrowserPolicyConnector::RegisterPrefs(registry);
381 policy::PolicyStatisticsCollector::RegisterPrefs(registry);
Owen Min54ddcd72017-08-16 20:10:58382 policy::RegisterPrefs(registry);
[email protected]27e96a972011-10-20 20:06:55383
Denis Kuznetsov32099f32017-12-15 14:04:57384#if BUILDFLAG(ENABLE_BACKGROUND_MODE)
Michael Giuffridab41fa5c42017-11-13 23:30:57385 BackgroundModeManager::RegisterPrefs(registry);
386#endif
387
James Hawkins1d1dc7e02018-03-02 22:11:54388#if BUILDFLAG(ENABLE_EXTENSIONS) and defined(OS_CHROMEOS)
James Hawkins5330caef2018-03-05 21:00:28389 chromeos::EasyUnlockService::RegisterPrefs(registry);
xiyuane4f1c4e02014-10-06 16:28:44390#endif
391
brettw4b461082016-11-19 18:55:16392#if BUILDFLAG(ENABLE_PLUGINS)
[email protected]ceafc462013-11-04 12:26:03393 PluginsResourceService::RegisterPrefs(registry);
394#endif
395
Mark Pearsonee17df912017-04-27 21:51:04396#if defined(OS_ANDROID)
397 ::android::RegisterPrefs(registry);
Alexei Svitkine472ae5b2017-08-29 19:40:20398 // Obsolete activity prefs. See MigrateObsoleteBrowserPrefs().
399 registry->RegisterIntegerPref(kStabilityForegroundActivityType, 0);
400 registry->RegisterIntegerPref(kStabilityLaunchedActivityFlags, 0);
Alexei Svitkine472ae5b2017-08-29 19:40:20401 registry->RegisterListPref(kStabilityCrashedActivityCounts);
Michael Giuffridab41fa5c42017-11-13 23:30:57402 registry->RegisterListPref(kStabilityLaunchedActivityCounts);
403#else
jianli2dc910b02014-09-19 02:42:46404 // The native GCM is used on Android instead.
405 gcm::GCMChannelStatusSyncer::RegisterPrefs(registry);
johnme627dc8c72016-08-19 21:49:39406 gcm::RegisterPrefs(registry);
Michael Giuffridab41fa5c42017-11-13 23:30:57407 metrics::TabStatsTracker::RegisterPrefs(registry);
408 RegisterBrowserPrefs(registry);
409 StartupBrowserCreator::RegisterLocalStatePrefs(registry);
410 task_manager::TaskManagerInterface::RegisterPrefs(registry);
thestigd75ce5532015-10-05 22:08:34411 UpgradeDetector::RegisterPrefs(registry);
Bret Sepulvedae795b2b2018-01-25 20:00:05412 // Obsolete. See MigrateObsoleteBrowserPrefs().
413 registry->RegisterIntegerPref(kShowFirstRunBubbleOption, 0);
[email protected]e7f79872013-09-13 01:39:31414#if !defined(OS_CHROMEOS)
[email protected]abaca602013-03-29 01:31:29415 RegisterDefaultBrowserPromptPrefs(registry);
[email protected]e7f79872013-09-13 01:39:31416#endif // !defined(OS_CHROMEOS)
417#endif // !defined(OS_ANDROID)
[email protected]3954f332012-02-25 02:51:54418
[email protected]8f0d8ecd12010-04-20 11:51:30419#if defined(OS_CHROMEOS)
[email protected]8304f61a2014-05-24 12:17:33420 ChromeOSMetricsProvider::RegisterPrefs(registry);
Steven Bennettsdbe837492018-01-11 19:22:11421 DataPromoNotification::RegisterPrefs(registry);
peletskyif19358fd2016-11-08 16:21:29422 chromeos::ArcKioskAppManager::RegisterPrefs(registry);
jamescook928c5e82015-01-07 20:47:18423 chromeos::AudioDevicesPrefHandlerImpl::RegisterPrefs(registry);
[email protected]4d390782014-08-15 09:22:58424 chromeos::ChromeUserManagerImpl::RegisterPrefs(registry);
[email protected]a28c45a2013-04-18 06:02:18425 chromeos::DeviceOAuth2TokenService::RegisterPrefs(registry);
[email protected]b1de2c72013-02-06 02:45:47426 chromeos::device_settings_cache::RegisterPrefs(registry);
zelidrag459b11b12014-11-14 04:05:53427 chromeos::EnableDebuggingScreenHandler::RegisterPrefs(registry);
[email protected]b1de2c72013-02-06 02:45:47428 chromeos::language_prefs::RegisterPrefs(registry);
[email protected]1637c192013-02-16 04:00:13429 chromeos::KioskAppManager::RegisterPrefs(registry);
[email protected]d6001872013-09-24 18:31:26430 chromeos::MultiProfileUserController::RegisterPrefs(registry);
[email protected]8e6742a52014-05-23 14:56:22431 chromeos::HIDDetectionScreenHandler::RegisterPrefs(registry);
[email protected]219643f2014-07-16 17:54:00432 chromeos::DemoModeDetector::RegisterPrefs(registry);
kirtika857eeac2016-11-05 00:24:26433 chromeos::NetworkThrottlingObserver::RegisterPrefs(registry);
Daniel Erat645c8652017-11-16 00:01:57434 chromeos::PowerMetricsReporter::RegisterLocalStatePrefs(registry);
[email protected]681958c2013-02-21 13:48:14435 chromeos::Preferences::RegisterPrefs(registry);
Steven Bennettscce939192018-01-12 22:57:12436 chromeos::DisplayPrefs::RegisterLocalStatePrefs(registry);
Mattias Nissler41b4a5d2017-09-22 15:37:55437 chromeos::ResetScreen::RegisterPrefs(registry);
afakhry5b2b3d92016-10-12 21:15:46438 chromeos::ResourceReporter::RegisterPrefs(registry);
[email protected]b1de2c72013-02-06 02:45:47439 chromeos::ServicesCustomizationDocument::RegisterPrefs(registry);
[email protected]daf4b542013-07-23 17:11:27440 chromeos::SigninScreenHandler::RegisterPrefs(registry);
[email protected]295ca1a72014-07-01 16:14:31441 chromeos::StartupUtils::RegisterPrefs(registry);
[email protected]c280dbf2013-03-19 12:17:44442 chromeos::system::AutomaticRebootManager::RegisterPrefs(registry);
glevin5dd01a72016-03-23 23:08:12443 chromeos::TimeZoneResolver::RegisterPrefs(registry);
[email protected]b1de2c72013-02-06 02:45:47444 chromeos::UserImageManager::RegisterPrefs(registry);
[email protected]295ca1a72014-07-01 16:14:31445 chromeos::UserSessionManager::RegisterPrefs(registry);
[email protected]a5058a22013-08-29 20:49:51446 chromeos::echo_offer::RegisterPrefs(registry);
[email protected]5a145e82014-05-29 22:19:07447 extensions::ExtensionAssetsManagerChromeOS::RegisterPrefs(registry);
tbarzicd9a88fc92017-07-14 02:18:10448 extensions::lock_screen_data::LockScreenItemStorage::RegisterLocalState(
449 registry);
[email protected]db8bf052014-06-25 11:53:10450 invalidation::InvalidatorStorage::RegisterPrefs(registry);
stevenjbf22f82e2016-10-26 21:47:38451 ::onc::RegisterPrefs(registry);
[email protected]b1de2c72013-02-06 02:45:47452 policy::AutoEnrollmentClient::RegisterPrefs(registry);
[email protected]97275822014-01-21 19:30:36453 policy::BrowserPolicyConnectorChromeOS::RegisterPrefs(registry);
[email protected]69a99822013-06-11 00:31:36454 policy::DeviceCloudPolicyManagerChromeOS::RegisterPrefs(registry);
[email protected]b1de2c72013-02-06 02:45:47455 policy::DeviceStatusCollector::RegisterPrefs(registry);
rsorokin3c13ece2017-01-16 15:58:41456 policy::DMTokenStorage::RegisterPrefs(registry);
[email protected]bcb94772013-12-19 14:28:58457 policy::PolicyCertServiceFactory::RegisterPrefs(registry);
glevin5dd01a72016-03-23 23:08:12458 quirks::QuirksManager::RegisterPrefs(registry);
[email protected]8f0d8ecd12010-04-20 11:51:30459#endif
[email protected]b6366ffa2012-02-29 17:12:26460
461#if defined(OS_MACOSX)
[email protected]b1de2c72013-02-06 02:45:47462 confirm_quit::RegisterLocalState(registry);
[email protected]425f7a02014-04-29 01:51:44463 QuitWithAppsController::RegisterPrefs(registry);
[email protected]b6366ffa2012-02-29 17:12:26464#endif
[email protected]bdb8a1e2013-10-03 08:14:00465
466#if defined(OS_WIN)
467 app_metro_launch::RegisterPrefs(registry);
[email protected]c5d4b1842014-06-20 21:19:50468 component_updater::RegisterPrefsForSwReporter(registry);
mrefaat957939672017-02-13 21:04:54469 desktop_ios_promotion::RegisterLocalPrefs(registry);
[email protected]a8564212014-04-09 16:16:51470 password_manager::PasswordManager::RegisterLocalPrefs(registry);
Patrick Monettee7d84a12018-02-28 00:16:34471#if defined(GOOGLE_CHROME_BUILD)
Patrick Monetteaff8f1f82018-03-20 23:03:09472 ModuleDatabase::RegisterLocalStatePrefs(registry);
Patrick Monetted9d2e642018-02-06 15:04:03473 ProblematicProgramsUpdater::RegisterLocalStatePrefs(registry);
Patrick Monettee7d84a12018-02-28 00:16:34474#endif // defined(GOOGLE_CHROME_BUILD)
[email protected]bdb8a1e2013-10-03 08:14:00475#endif
[email protected]ceafc462013-11-04 12:26:03476
477#if defined(TOOLKIT_VIEWS)
[email protected]af97be4c62014-02-13 14:43:34478 RegisterBrowserViewLocalPrefs(registry);
[email protected]ceafc462013-11-04 12:26:03479#endif
[email protected]9acc48602009-11-30 21:18:51480}
initial.commit09911bf2008-07-26 23:55:29481
[email protected]37ca3fe02013-07-05 15:32:44482// Register prefs applicable to all profiles.
483void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
rkaplow058da3132015-02-19 18:18:38484 TRACE_EVENT0("browser", "chrome::RegisterProfilePrefs");
485 SCOPED_UMA_HISTOGRAM_TIMER("Settings.RegisterProfilePrefsTime");
[email protected]2a5f29632012-11-26 17:17:55486 // User prefs. Please keep this list alphabetized.
[email protected]37ca3fe02013-07-05 15:32:44487 autofill::AutofillManager::RegisterProfilePrefs(registry);
Bernhard Bauer19190732017-09-28 09:03:33488 browsing_data::prefs::RegisterBrowserUserPrefs(registry);
489 certificate_transparency::CTPolicyManager::RegisterPrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:44490 ChromeContentBrowserClient::RegisterProfilePrefs(registry);
491 ChromeVersionService::RegisterProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:44492 chrome_browser_net::Predictor::RegisterProfilePrefs(registry);
[email protected]ba85a602014-06-28 20:37:12493 chrome_browser_net::RegisterPredictionOptionsProfilePrefs(registry);
[email protected]06690dc2014-03-07 08:44:00494 chrome_prefs::RegisterProfilePrefs(registry);
[email protected]6a5b0712014-07-16 00:30:10495 dom_distiller::DistilledPagePrefs::RegisterProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:44496 DownloadPrefs::RegisterProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:44497 HostContentSettingsMap::RegisterProfilePrefs(registry);
dmurph93fa43b2017-02-07 23:45:16498 ImportantSitesUtil::RegisterProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:44499 IncognitoModePrefs::RegisterProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:44500 MediaCaptureDevicesDispatcher::RegisterProfilePrefs(registry);
[email protected]cd80cce2013-12-02 15:19:19501 MediaDeviceIDSalt::RegisterProfilePrefs(registry);
Becca Hughes6354b6b2017-08-31 22:01:55502 MediaEngagementService::RegisterProfilePrefs(registry);
John Rummelle5621c12017-09-05 23:52:10503 MediaStorageIdSalt::RegisterProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:44504 MediaStreamDevicesController::RegisterProfilePrefs(registry);
Michael Martis98cd8732017-07-14 03:26:19505 NavigationCorrectionTabObserver::RegisterProfilePrefs(registry);
brettw1f92eed2016-12-07 01:12:58506 NotifierStateTracker::RegisterProfilePrefs(registry);
jkrcal093410c2016-12-21 16:13:55507 ntp_snippets::ContentSuggestionsService::RegisterProfilePrefs(registry);
skym9e961db2016-09-19 19:02:08508 ntp_snippets::ForeignSessionsSuggestionsProvider::RegisterProfilePrefs(
509 registry);
jkrcal093410c2016-12-21 16:13:55510 ntp_snippets::RemoteSuggestionsProviderImpl::RegisterProfilePrefs(registry);
jkrcalf9966462017-03-29 16:25:21511 ntp_snippets::RemoteSuggestionsSchedulerImpl::RegisterProfilePrefs(registry);
jkrcal505ea3a2016-07-22 10:19:22512 ntp_snippets::RequestThrottler::RegisterProfilePrefs(registry);
jkrcale13510e2016-09-08 17:56:20513 ntp_snippets::UserClassifier::RegisterProfilePrefs(registry);
treibbb0c5af52016-12-09 17:34:15514 ntp_tiles::MostVisitedSites::RegisterProfilePrefs(registry);
melandory444f85f2015-09-07 13:32:42515 password_bubble_experiment::RegisterPrefs(registry);
[email protected]a8564212014-04-09 16:16:51516 password_manager::PasswordManager::RegisterProfilePrefs(registry);
anthonyvd6a43b932017-05-11 18:39:27517 payments::RegisterProfilePrefs(registry);
Bernhard Bauer19190732017-09-28 09:03:33518 policy::URLBlacklistManager::RegisterProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:44519 PrefProxyConfigTrackerImpl::RegisterProfilePrefs(registry);
520 PrefsTabHelper::RegisterProfilePrefs(registry);
521 Profile::RegisterProfilePrefs(registry);
522 ProfileImpl::RegisterProfilePrefs(registry);
Matt Menkecfef87d2017-08-03 13:03:06523 ProfileNetworkContextService::RegisterProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:44524 ProtocolHandlerRegistry::RegisterProfilePrefs(registry);
johnmecf2da0c2015-10-28 19:42:12525 PushMessagingAppIdentifier::RegisterProfilePrefs(registry);
[email protected]c753f142013-02-10 13:14:04526 RegisterBrowserUserPrefs(registry);
Luke Zielinski12ef88552017-06-23 15:36:27527 safe_browsing::RegisterProfilePrefs(registry);
Daniel Vogelheim976f1c22017-11-22 16:26:03528 secure_origin_whitelist::RegisterProfilePrefs(registry);
Shivani Sharma343451382017-12-07 20:18:08529 SafeBrowsingTriggeredPopupBlocker::RegisterProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:44530 SessionStartupPref::RegisterProfilePrefs(registry);
David Roger67a5cb32017-10-24 12:45:03531 signin::RegisterAccountConsistencyProfilePrefs(registry);
Bernhard Bauer19190732017-09-28 09:03:33532 syncer::SyncPrefs::RegisterProfilePrefs(registry);
Charles Harrison6d6838d2018-03-20 15:37:29533 TabUnderNavigationThrottle::RegisterProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:44534 TemplateURLPrepopulateData::RegisterProfilePrefs(registry);
[email protected]e5e72cc2014-07-22 19:06:49535 translate::TranslatePrefs::RegisterProfilePrefs(registry);
tbansal0d42d6c2016-10-21 16:01:04536 UINetworkQualityEstimatorService::RegisterProfilePrefs(registry);
[email protected]855ebff2014-05-09 07:14:38537 ZeroSuggestProvider::RegisterProfilePrefs(registry);
[email protected]cc36c2c2012-03-01 00:57:34538
brettw00899e62016-11-12 02:10:17539#if BUILDFLAG(ENABLE_EXTENSIONS)
[email protected]17510602014-06-05 11:02:28540 ExtensionWebUI::RegisterProfilePrefs(registry);
je_julie.kim7fbb5a1a2015-02-09 17:26:05541 RegisterAnimationPolicyPrefs(registry);
mfoltz96f329c2016-01-13 18:16:58542 ToolbarActionsBar::RegisterProfilePrefs(registry);
Adam Langley4da8d112017-11-30 06:24:01543 extensions::api::CryptotokenRegisterProfilePrefs(registry);
mfoltz96f329c2016-01-13 18:16:58544 extensions::ActivityLog::RegisterProfilePrefs(registry);
tbarzicfa3c7ef62017-04-17 23:12:02545 extensions::AudioAPI::RegisterUserPrefs(registry);
mfoltz96f329c2016-01-13 18:16:58546 extensions::ExtensionPrefs::RegisterProfilePrefs(registry);
547 extensions::launch_util::RegisterProfilePrefs(registry);
rdevlin.cronin81d35162017-05-31 15:44:48548 extensions::NtpOverriddenBubbleDelegate::RegisterPrefs(registry);
afakhry2bd481832016-06-16 16:17:24549 extensions::RuntimeAPI::RegisterPrefs(registry);
Minh X. Nguyen3aa40692018-03-28 01:15:59550 update_client::RegisterProfilePrefs(registry);
brettw00899e62016-11-12 02:10:17551#endif // BUILDFLAG(ENABLE_EXTENSIONS)
[email protected]c2ac1dda2013-09-23 05:04:56552
Bettina Deaf3dac202017-09-16 20:53:22553#if BUILDFLAG(ENABLE_DESKTOP_IN_PRODUCT_HELP)
554 feature_engagement::SessionDurationUpdater::RegisterProfilePrefs(registry);
555#endif
556
Bernhard Bauer19190732017-09-28 09:03:33557#if BUILDFLAG(ENABLE_PLUGINS)
Nicholas Verned391eae2017-11-13 02:41:38558 PluginInfoHostImpl::RegisterUserPrefs(registry);
Bernhard Bauer19190732017-09-28 09:03:33559#endif
560
Brett Wilson65f951c2016-11-03 22:06:12561#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
bauerb4da36132014-12-26 19:53:13562 printing::StickySettings::RegisterProfilePrefs(registry);
563#endif
564
thestig4888f292016-10-07 23:57:55565#if BUILDFLAG(ENABLE_SERVICE_DISCOVERY)
[email protected]2188c8d2014-03-21 00:58:56566 LocalDiscoveryUI::RegisterProfilePrefs(registry);
567#endif
568
brettw9e85ef42016-11-01 21:01:24569#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
jam1c5a91492016-02-24 20:47:53570#if !defined(OS_ANDROID)
bauerb4da36132014-12-26 19:53:13571 SupervisedUserSharedSettingsService::RegisterProfilePrefs(registry);
572 SupervisedUserSyncService::RegisterProfilePrefs(registry);
bauerb7f3b8542015-06-29 19:56:19573#endif
574 ChildAccountService::RegisterProfilePrefs(registry);
575 SupervisedUserService::RegisterProfilePrefs(registry);
bauerb4da36132014-12-26 19:53:13576 SupervisedUserWhitelistService::RegisterProfilePrefs(registry);
577#endif
578
zpengdb4a58e2017-01-10 17:40:32579#if defined(OS_ANDROID)
mastiz78efbde2016-12-14 17:07:07580 ntp_tiles::PopularSitesImpl::RegisterProfilePrefs(registry);
mvanouwerkerkc1751e02017-01-06 12:16:43581 variations::VariationsService::RegisterProfilePrefs(registry);
benwells0b3748a2017-03-21 06:28:40582 GeolocationPermissionContextAndroid::RegisterProfilePrefs(registry);
[email protected]084f82b2013-11-01 00:09:59583 PartnerBookmarksShim::RegisterProfilePrefs(registry);
mvanouwerkerkc1751e02017-01-06 12:16:43584 RecentTabsPagePrefs::RegisterProfilePrefs(registry);
[email protected]ceafc462013-11-04 12:26:03585#else
586 AppShortcutManager::RegisterProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:44587 DeviceIDFetcher::RegisterProfilePrefs(registry);
588 DevToolsWindow::RegisterProfilePrefs(registry);
brettwd1bc9da2016-10-14 19:04:24589#if BUILDFLAG(ENABLE_APP_LIST)
khmeleca50572016-11-03 16:54:45590 app_list::AppListSyncableService::RegisterProfilePrefs(registry);
taptedd13e0cd2016-05-13 08:26:56591#endif
[email protected]37ca3fe02013-07-05 15:32:44592 extensions::CommandService::RegisterProfilePrefs(registry);
[email protected]1c9bf752013-08-01 00:10:52593 extensions::ExtensionSettingsHandler::RegisterProfilePrefs(registry);
[email protected]d29f4e312013-08-07 05:28:31594 extensions::TabsCaptureVisibleTabFunction::RegisterProfilePrefs(registry);
[email protected]54b25a82014-04-30 21:47:05595 NewTabUI::RegisterProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:44596 PepperFlashSettingsManager::RegisterProfilePrefs(registry);
597 PinnedTabCodec::RegisterProfilePrefs(registry);
[email protected]3d27d272013-07-31 03:15:16598 signin::RegisterProfilePrefs(registry);
[email protected]cc36c2c2012-03-01 00:57:34599#endif
600
vitaliii2600e8e02016-12-09 17:23:36601#if defined(OS_ANDROID)
xhwang116acb92017-04-03 18:27:20602 cdm::MediaDrmStorageImpl::RegisterProfilePrefs(registry);
sfierab0f63392017-01-05 14:24:47603 ContentSuggestionsNotifierService::RegisterProfilePrefs(registry);
vitaliii2600e8e02016-12-09 17:23:36604 DownloadSuggestionsProvider::RegisterProfilePrefs(registry);
Vitalii Iarkoe4f716e2017-08-04 06:58:55605 ntp_snippets::BreakingNewsGCMAppHandler::RegisterProfilePrefs(registry);
vitaliii9f8aa5f82016-12-22 09:26:35606 ntp_snippets::ClickBasedCategoryRanker::RegisterProfilePrefs(registry);
vitaliii2600e8e02016-12-09 17:23:36607 ntp_snippets::PhysicalWebPageSuggestionsProvider::RegisterProfilePrefs(
608 registry);
609 ntp_snippets::RecentTabSuggestionsProvider::RegisterProfilePrefs(registry);
Vitalii Iarkoe4f716e2017-08-04 06:58:55610 ntp_snippets::SubscriptionManagerImpl::RegisterProfilePrefs(registry);
Kenichi Ishibashi35ac7132017-12-08 03:44:30611 OomInterventionDecider::RegisterProfilePrefs(registry);
vitaliii2600e8e02016-12-09 17:23:36612#endif // defined(OS_ANDROID)
613
mlliuee3a405c2016-10-28 22:34:52614#if !defined(OS_ANDROID)
johnme627dc8c72016-08-19 21:49:39615 browser_sync::ForeignSessionHandler::RegisterProfilePrefs(registry);
gabdac09c03b2017-03-22 20:00:11616 first_run::RegisterProfilePrefs(registry);
johnme627dc8c72016-08-19 21:49:39617 gcm::GCMChannelStatusSyncer::RegisterProfilePrefs(registry);
618 gcm::RegisterProfilePrefs(registry);
tmartino6254f472016-11-21 01:22:56619 StartupBrowserCreator::RegisterProfilePrefs(registry);
johnme627dc8c72016-08-19 21:49:39620#endif
621
622#if !defined(OS_ANDROID) && !defined(OS_CHROMEOS)
623 default_apps::RegisterProfilePrefs(registry);
mvanouwerkerk9f0f38a2016-06-08 14:11:44624#endif
625
[email protected]9acc48602009-11-30 21:18:51626#if defined(OS_CHROMEOS)
Hidehiko Abe33e9adf2017-09-13 06:12:23627 arc::prefs::RegisterProfilePrefs(registry);
Timothy Lohdc95cdac2018-03-22 01:02:03628 chromeos::CrostiniRegistryService::RegisterProfilePrefs(registry);
David Valleauce0aedfa2018-03-30 18:46:16629 chromeos::CupsPrintersManager::RegisterProfilePrefs(registry);
[email protected]980d5f9e2013-12-17 17:47:08630 chromeos::first_run::RegisterProfilePrefs(registry);
[email protected]7de7aee2014-06-02 12:37:52631 chromeos::file_system_provider::RegisterProfilePrefs(registry);
pneubeckdabdfe912015-06-18 13:42:13632 chromeos::KeyPermissions::RegisterProfilePrefs(registry);
[email protected]d6001872013-09-24 18:31:26633 chromeos::MultiProfileUserController::RegisterProfilePrefs(registry);
xiaoyinhb849e9c12017-04-21 21:40:33634 chromeos::quick_unlock::FingerprintStorage::RegisterProfilePrefs(registry);
sammiequon85feb872017-02-20 23:19:51635 chromeos::quick_unlock::PinStorage::RegisterProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:44636 chromeos::Preferences::RegisterProfilePrefs(registry);
Justin Carlson45339ae2017-07-17 23:59:10637 chromeos::SyncedPrintersManager::RegisterProfilePrefs(registry);
sammiequon85feb872017-02-20 23:19:51638 chromeos::quick_unlock::RegisterProfilePrefs(registry);
[email protected]3b9deb402014-01-30 17:50:16639 chromeos::SAMLOfflineSigninLimiter::RegisterProfilePrefs(registry);
[email protected]d0b28892014-03-05 18:56:31640 chromeos::ServicesCustomizationDocument::RegisterProfilePrefs(registry);
[email protected]de25c91f2013-09-06 06:51:58641 chromeos::UserImageSyncObserver::RegisterProfilePrefs(registry);
dkrahn3f7776e2016-02-26 08:12:29642 extensions::EPKPChallengeUserKey::RegisterProfilePrefs(registry);
sdefresne8593e6432015-12-01 12:38:08643 flags_ui::PrefServiceFlagsStorage::RegisterProfilePrefs(registry);
Toni Barzic14329d02017-07-17 21:59:12644 lock_screen_apps::StateController::RegisterProfilePrefs(registry);
Bartosz Fabianowski79028ae2018-02-23 17:25:03645 policy::AppInstallEventLogger::RegisterProfilePrefs(registry);
pmarko0a957522017-02-21 19:00:57646 policy::DeviceStatusCollector::RegisterProfilePrefs(registry);
stevenjbf22f82e2016-10-26 21:47:38647 ::onc::RegisterProfilePrefs(registry);
[email protected]9acc48602009-11-30 21:18:51648#endif
[email protected]cc36c2c2012-03-01 00:57:34649
brettwd1bc9da2016-10-14 19:04:24650#if defined(OS_CHROMEOS) && BUILDFLAG(ENABLE_APP_LIST)
khmeld7c5a322015-12-04 16:24:47651 ArcAppListPrefs::RegisterProfilePrefs(registry);
652#endif
653
gab3ca4a492017-03-02 00:19:41654#if BUILDFLAG(ENABLE_RLZ)
655 ChromeRLZTrackerDelegate::RegisterProfilePrefs(registry);
656#endif
657
[email protected]a4422802012-05-03 09:19:15658#if defined(OS_WIN)
mad2b3b6552014-09-25 00:44:49659 component_updater::RegisterProfilePrefsForSwReporter(registry);
mrefaat957939672017-02-13 21:04:54660 desktop_ios_promotion::RegisterProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:44661 NetworkProfileBubble::RegisterProfilePrefs(registry);
alito856526d2017-03-03 09:16:17662 safe_browsing::SettingsResetPromptPrefsManager::RegisterProfilePrefs(
663 registry);
ftirelo46b34222017-06-19 10:36:57664 safe_browsing::PostCleanupSettingsResetter::RegisterProfilePrefs(registry);
[email protected]a4422802012-05-03 09:19:15665#endif
[email protected]eeec6ca2013-02-21 15:10:43666
[email protected]ceafc462013-11-04 12:26:03667#if defined(TOOLKIT_VIEWS)
[email protected]af97be4c62014-02-13 14:43:34668 RegisterBrowserViewProfilePrefs(registry);
[email protected]ceafc462013-11-04 12:26:03669 RegisterInvertBubbleUserPrefs(registry);
[email protected]ceafc462013-11-04 12:26:03670#endif
671
James Cookf9d34d22017-10-04 16:39:35672#if defined(OS_CHROMEOS)
msw19b1335d92017-05-05 23:21:13673 RegisterChromeLauncherUserPrefs(registry);
[email protected]e4bf6b7bb52013-07-15 16:49:40674#endif
dbeam72db0762015-05-20 20:37:12675
thestig0c55ee32017-06-20 22:17:51676#if !defined(OS_ANDROID)
dbeam7db5f5392016-09-21 17:33:24677 MdHistoryUI::RegisterProfilePrefs(registry);
dbeam0b1f71df2017-03-07 18:36:36678 settings::MdSettingsUI::RegisterProfilePrefs(registry);
dbeam7db5f5392016-09-21 17:33:24679#endif
680
jianliac940cb2017-06-07 05:13:08681#if BUILDFLAG(ENABLE_OFFLINE_PAGES)
Dmitry Titov4d2bde02017-06-30 05:29:52682 offline_pages::OfflineMetricsCollectorImpl::RegisterPrefs(registry);
jianliac940cb2017-06-07 05:13:08683 offline_pages::RegisterPrefetchBackgroundTaskPrefs(registry);
684#endif
Anita Woodruffda0cdb642017-08-22 18:36:50685
686#if defined(OS_ANDROID)
687 NotificationChannelsProviderAndroid::RegisterProfilePrefs(registry);
688#endif
Marc Treib409320b2017-11-30 14:30:42689
James Cook0ba192bf2017-12-01 20:53:11690 RegisterProfilePrefsForMigration(registry);
initial.commit09911bf2008-07-26 23:55:29691}
license.botbf09a502008-08-24 00:55:55692
[email protected]37ca3fe02013-07-05 15:32:44693void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
694 RegisterProfilePrefs(registry);
[email protected]2424cc52013-07-17 13:44:38695
696#if defined(OS_CHROMEOS)
697 chromeos::PowerPrefs::RegisterUserProfilePrefs(registry);
698#endif
mlliuee3a405c2016-10-28 22:34:52699
700#if defined(OS_ANDROID)
701 ::android::RegisterUserProfilePrefs(registry);
702#endif
[email protected]37ca3fe02013-07-05 15:32:44703}
704
[email protected]8eefe842014-01-17 06:42:40705void RegisterScreenshotPrefs(PrefRegistrySimple* registry) {
706 registry->RegisterBooleanPref(prefs::kDisableScreenshots, false);
707}
708
[email protected]37ca3fe02013-07-05 15:32:44709#if defined(OS_CHROMEOS)
710void RegisterLoginProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
711 RegisterProfilePrefs(registry);
[email protected]2424cc52013-07-17 13:44:38712
713 chromeos::PowerPrefs::RegisterLoginProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:44714}
715#endif
716
rkaplowf216caf2015-03-02 22:37:45717// This method should be periodically pruned of year+ old migrations.
718void MigrateObsoleteBrowserPrefs(Profile* profile, PrefService* local_state) {
Alexei Svitkine472ae5b2017-08-29 19:40:20719#if defined(OS_ANDROID)
720 // Added 8/2017.
721 local_state->ClearPref(kStabilityForegroundActivityType);
722 local_state->ClearPref(kStabilityLaunchedActivityFlags);
723 local_state->ClearPref(kStabilityLaunchedActivityCounts);
724 local_state->ClearPref(kStabilityCrashedActivityCounts);
Bret Sepulvedae795b2b2018-01-25 20:00:05725#else
726 // Added 1/2018.
727 local_state->ClearPref(kShowFirstRunBubbleOption);
Alexei Svitkine472ae5b2017-08-29 19:40:20728#endif // defined(OS_ANDROID)
rkaplowf216caf2015-03-02 22:37:45729}
730
731// This method should be periodically pruned of year+ old migrations.
732void MigrateObsoleteProfilePrefs(Profile* profile) {
733 PrefService* profile_prefs = profile->GetPrefs();
734
takumif0cd92262017-02-10 17:51:51735#if BUILDFLAG(ENABLE_EXTENSIONS)
736 // Added 2/2017.
takumiffb4e8ac42017-03-08 20:21:30737 // NOTE(takumif): When removing this code, also remove the following tests:
738 // - MediaRouterUIBrowserTest.MigrateToolbarIconShownPref
739 // - MediaRouterUIBrowserTest.MigrateToolbarIconUnshownPref
740 {
takumiffb4e8ac42017-03-08 20:21:30741 bool show_cast_icon = false;
742 const base::DictionaryValue* action_migration_dict =
743 profile_prefs->GetDictionary(kToolbarMigratedComponentActionStatus);
744 if (action_migration_dict &&
745 action_migration_dict->GetBoolean(
746 ComponentToolbarActionsFactory::kMediaRouterActionId,
747 &show_cast_icon)) {
748 profile_prefs->SetBoolean(prefs::kShowCastIconInToolbar, show_cast_icon);
749 }
takumiffb4e8ac42017-03-08 20:21:30750 profile_prefs->ClearPref(kToolbarMigratedComponentActionStatus);
751 }
752#endif // BUILDFLAG(ENABLE_EXTENSIONS)
gab3ca4a492017-03-02 00:19:41753
754 // Added 2/2017.
755 {
756#if BUILDFLAG(ENABLE_RLZ)
757 const base::DictionaryValue* distro_dict =
758 profile_prefs->GetDictionary(kDistroDict);
759 int rlz_ping_delay = 0;
760 if (distro_dict &&
761 distro_dict->GetInteger(kDistroRlzPingDelay, &rlz_ping_delay)) {
762 profile_prefs->SetInteger(prefs::kRlzPingDelaySeconds, rlz_ping_delay);
763 }
764#endif // BUILDFLAG(ENABLE_RLZ)
765 profile_prefs->ClearPref(kDistroDict);
766 }
Marc Treib409320b2017-11-30 14:30:42767
768 // Added 11/2017.
769 profile_prefs->ClearPref(kInstantUIZeroSuggestUrlPrefix);
James Cook0ba192bf2017-12-01 20:53:11770
771#if defined(OS_CHROMEOS)
772 // Added 12/2017.
773 profile_prefs->ClearPref(kTouchHudProjectionEnabled);
774#endif
[email protected]102253f2012-12-14 17:00:58775}