blob: 574453b5961fbb39c40bf36f65dde26177467a60 [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"
Katie D93c943b62019-01-08 04:04:1913#include "chrome/browser/accessibility/accessibility_labels_prefs.h"
James Wallace-Lee25a1b05e2018-07-24 00:06:3114#include "chrome/browser/accessibility/accessibility_ui.h"
[email protected]7a25d872012-05-21 19:14:1315#include "chrome/browser/accessibility/invert_bubble_prefs.h"
[email protected]b1de2c72013-02-06 02:45:4716#include "chrome/browser/browser_process_impl.h"
[email protected]bca18382012-06-25 19:15:2317#include "chrome/browser/chrome_content_browser_client.h"
sorinebcfc8dd2016-08-12 21:57:1818#include "chrome/browser/component_updater/component_updater_prefs.h"
[email protected]a6d36cc2011-02-23 00:39:4819#include "chrome/browser/custom_handlers/protocol_handler_registry.h"
[email protected]70019152012-12-19 11:44:1920#include "chrome/browser/devtools/devtools_window.h"
[email protected]e5dc4222010-08-30 22:16:3221#include "chrome/browser/download/download_prefs.h"
dmurph93fa43b2017-02-07 23:45:1622#include "chrome/browser/engagement/important_sites_util.h"
[email protected]ed2b1002011-05-25 14:12:1023#include "chrome/browser/external_protocol/external_protocol_handler.h"
[email protected]1b3588d2012-10-10 21:17:2524#include "chrome/browser/first_run/first_run.h"
[email protected]e6933d2a2013-03-12 22:32:2125#include "chrome/browser/gpu/gpu_mode_manager.h"
[email protected]5e9d1f72011-01-19 14:15:2326#include "chrome/browser/intranet_redirect_detector.h"
[email protected]3c319eb2013-02-21 14:44:4527#include "chrome/browser/io_thread.h"
Avi Drissmand30927342018-05-22 15:04:2728#include "chrome/browser/lifetime/browser_shutdown.h"
[email protected]cd80cce2013-12-02 15:19:1929#include "chrome/browser/media/media_device_id_salt.h"
Becca Hughes6354b6b2017-08-31 22:01:5530#include "chrome/browser/media/media_engagement_service.h"
John Rummelle5621c12017-09-05 23:52:1031#include "chrome/browser/media/media_storage_id_salt.h"
Derek Cheng23a01402018-07-24 13:38:1432#include "chrome/browser/media/router/media_router_feature.h"
mcasasa2023ab2016-09-08 01:06:3633#include "chrome/browser/media/webrtc/media_capture_devices_dispatcher.h"
34#include "chrome/browser/media/webrtc/media_stream_devices_controller.h"
[email protected]4a55a712014-06-08 16:50:3435#include "chrome/browser/metrics/chrome_metrics_service_client.h"
Eric Secklera5c24e12018-11-28 16:09:2036#include "chrome/browser/net/net_error_tab_helper.h"
[email protected]ba85a602014-06-28 20:37:1237#include "chrome/browser/net/prediction_options.h"
Matt Menkecfef87d2017-08-03 13:03:0638#include "chrome/browser/net/profile_network_context_service.h"
Matt Menke4dfb375c2018-06-13 18:06:3139#include "chrome/browser/net/system_network_context_manager.h"
Anita Woodruffda0cdb642017-08-22 18:36:5040#include "chrome/browser/notifications/notification_channels_provider_android.h"
peterc4007912015-07-31 21:13:3741#include "chrome/browser/notifications/notifier_state_tracker.h"
Sharon Yangc6706902018-07-16 13:06:1942#include "chrome/browser/notifications/platform_notification_service_impl.h"
[email protected]18a4d63c82012-05-25 23:37:0343#include "chrome/browser/pepper_flash_settings_manager.h"
Pavol Markodebb0ff2018-05-07 18:35:4144#include "chrome/browser/policy/developer_tools_policy_handler.h"
Owen Min54ddcd72017-08-16 20:10:5845#include "chrome/browser/policy/policy_helpers.h"
[email protected]24f95242014-02-10 17:55:2846#include "chrome/browser/prefs/chrome_pref_service_factory.h"
[email protected]4e94ab32011-08-05 05:28:2747#include "chrome/browser/prefs/incognito_mode_prefs.h"
iclelland27f4bcb2016-06-22 16:41:0348#include "chrome/browser/prefs/origin_trial_prefs.h"
[email protected]37858e52010-08-26 00:22:0249#include "chrome/browser/prefs/session_startup_pref.h"
Robert Ogden22bd863372018-10-01 22:10:2650#include "chrome/browser/previews/previews_lite_page_decider.h"
[email protected]1bee6ed2012-03-14 06:46:3651#include "chrome/browser/profiles/chrome_version_service.h"
[email protected]ee937fe2013-02-27 00:41:5952#include "chrome/browser/profiles/profile.h"
[email protected]8ecad5e2010-12-02 21:18:3353#include "chrome/browser/profiles/profile_impl.h"
[email protected]dee810e2011-06-27 19:43:3954#include "chrome/browser/profiles/profile_info_cache.h"
[email protected]de71ae992013-07-18 03:30:3855#include "chrome/browser/profiles/profiles_state.h"
johnmecf2da0c2015-10-28 19:42:1256#include "chrome/browser/push_messaging/push_messaging_app_identifier.h"
[email protected]bb9c9752013-04-25 23:02:1157#include "chrome/browser/renderer_host/pepper/device_id_fetcher.h"
gab3ca4a492017-03-02 00:19:4158#include "chrome/browser/rlz/chrome_rlz_tracker_delegate.h"
[email protected]a7b8e43d2013-03-18 18:52:4359#include "chrome/browser/search/search.h"
[email protected]8a120892012-06-08 01:18:5060#include "chrome/browser/signin/signin_manager_factory.h"
Emily Starkc657d45e2018-05-11 19:03:1961#include "chrome/browser/ssl/chrome_ssl_host_state_delegate.h"
Ryan Sleevi4689ad32018-04-16 19:09:0562#include "chrome/browser/ssl/ssl_config_service_manager.h"
avi24d693f2016-08-06 18:03:5263#include "chrome/browser/task_manager/task_manager_interface.h"
oysteine386fc9e2015-06-07 18:45:4164#include "chrome/browser/tracing/chrome_tracing_delegate.h"
Shivani Sharma343451382017-12-07 20:18:0865#include "chrome/browser/ui/blocked_content/safe_browsing_triggered_popup_blocker.h"
[email protected]2cd4fde2012-06-26 03:10:2666#include "chrome/browser/ui/browser_ui_prefs.h"
[email protected]26bd3893c2014-04-15 18:59:5867#include "chrome/browser/ui/navigation_correction_tab_observer.h"
[email protected]297fb7c22012-06-26 12:37:4968#include "chrome/browser/ui/network_profile_bubble.h"
[email protected]9ce7cb42011-12-07 18:53:0769#include "chrome/browser/ui/prefs/prefs_tab_helper.h"
[email protected]62f77772011-02-23 19:45:4270#include "chrome/browser/ui/search_engines/keyword_editor_controller.h"
[email protected]b56e2e32012-05-11 21:18:0471#include "chrome/browser/ui/tabs/pinned_tab_codec.h"
[email protected]265a1492011-02-27 05:58:0772#include "chrome/browser/ui/webui/flags_ui.h"
[email protected]7c5c6f3a2011-04-28 19:56:4973#include "chrome/browser/ui/webui/ntp/new_tab_ui.h"
Nicolas Ouellet-Payeur4dbdf1e52018-08-06 21:51:0274#include "chrome/browser/ui/webui/print_preview/policy_settings.h"
[email protected]0209b442012-07-18 00:38:0575#include "chrome/browser/ui/webui/print_preview/sticky_settings.h"
Alexey Baskakov396edb92018-08-02 05:11:4276#include "chrome/browser/web_applications/web_app_provider.h"
Martin Kreichgauer0e1b15ef2018-06-20 02:59:5077#include "chrome/browser/webauthn/chrome_authenticator_request_delegate.h"
Scott Violet6200d332018-02-23 21:29:2378#include "chrome/common/buildflags.h"
[email protected]f87919d72011-02-02 18:46:1679#include "chrome/common/pref_names.h"
Daniel Vogelheim976f1c22017-11-22 16:26:0380#include "chrome/common/secure_origin_whitelist.h"
Moe Ahmadi173b0a2b2018-08-03 17:35:5181#include "components/autofill/core/common/autofill_prefs.h"
ioanapa8bfbc72016-09-07 16:09:0582#include "components/browsing_data/core/pref_names.h"
Doug Turner9e79cf0c2018-04-05 21:32:3083#include "components/certificate_transparency/pref_names.h"
mukai8eaec822014-10-25 17:53:1684#include "components/content_settings/core/browser/host_content_settings_map.h"
[email protected]6a5b0712014-07-16 00:30:1085#include "components/dom_distiller/core/distilled_page_prefs.h"
Scott Violet9ae82892018-03-01 18:38:1286#include "components/feature_engagement/buildflags.h"
sdefresne8593e6432015-12-01 12:38:0887#include "components/flags_ui/pref_service_flags_storage.h"
jianli2dc910b02014-09-19 02:42:4688#include "components/gcm_driver/gcm_channel_status_syncer.h"
Brandon Wyliec7a94502018-10-18 18:43:2589#include "components/image_fetcher/core/cache/image_cache.h"
Tanja Gornak5c8b5d952018-10-12 14:39:5490#include "components/invalidation/impl/invalidator_registrar_with_memory.h"
Tatiana Gornaka4f3a922018-05-28 08:53:5391#include "components/invalidation/impl/per_user_topic_registration_manager.h"
Anthony Vallee-Dubois6f993122018-09-17 16:13:2892#include "components/language/content/browser/geo_language_provider.h"
Peter Wen45025ea2018-09-17 15:16:2793#include "components/metrics/metrics_pref_names.h"
[email protected]d0ab865b2014-06-04 19:41:3494#include "components/network_time/network_time_tracker.h"
dgn52914722016-10-18 10:28:4295#include "components/ntp_snippets/content_suggestions_service.h"
jkrcal093410c2016-12-21 16:13:5596#include "components/ntp_snippets/remote/remote_suggestions_provider_impl.h"
jkrcalf9966462017-03-29 16:25:2197#include "components/ntp_snippets/remote/remote_suggestions_scheduler_impl.h"
treibe0e11db2016-09-29 15:35:3498#include "components/ntp_snippets/remote/request_throttler.h"
jkrcale13510e2016-09-08 17:56:2099#include "components/ntp_snippets/user_classifier.h"
treibbb0c5af52016-12-09 17:34:15100#include "components/ntp_tiles/most_visited_sites.h"
Scott Violet9ae82892018-03-01 18:38:12101#include "components/offline_pages/buildflags/buildflags.h"
Travis Skare27cee15c2018-07-19 14:34:13102#include "components/omnibox/browser/document_provider.h"
blundell2102f7c2015-07-09 10:00:53103#include "components/omnibox/browser/zero_suggest_provider.h"
melandory444f85f2015-09-07 13:32:42104#include "components/password_manager/core/browser/password_bubble_experiment.h"
[email protected]1f730bd2014-02-28 15:11:32105#include "components/password_manager/core/browser/password_manager.h"
anthonyvd6a43b932017-05-11 18:39:27106#include "components/payments/core/payment_prefs.h"
brettw03e61962016-03-15 06:27:04107#include "components/policy/core/browser/browser_policy_connector.h"
108#include "components/policy/core/browser/url_blacklist_manager.h"
109#include "components/policy/core/common/policy_statistics_collector.h"
[email protected]f0c8c4992014-05-15 17:37:26110#include "components/pref_registry/pref_registry_syncable.h"
brettwb1fc1b82016-02-02 00:19:08111#include "components/prefs/pref_registry_simple.h"
112#include "components/prefs/pref_service.h"
abhishek.a2171c612852015-08-31 10:48:19113#include "components/proxy_config/pref_proxy_config_tracker_impl.h"
nzolghadrd87a308d2016-12-07 15:45:56114#include "components/rappor/rappor_service_impl.h"
Luke Zielinski12ef88552017-06-23 15:36:27115#include "components/safe_browsing/common/safe_browsing_prefs.h"
[email protected]0915b352014-06-25 19:58:14116#include "components/search_engines/template_url_prepopulate_data.h"
Mikel Astizf61f4ba02018-06-01 10:50:19117#include "components/sessions/core/session_id_generator.h"
fdoray44cd7812016-01-08 17:03:59118#include "components/startup_metric_utils/browser/startup_metric_utils.h"
Eric Robinson49f19b62018-09-17 21:28:15119#include "components/subresource_filter/content/browser/ruleset_service.h"
maxbogue2f960e52016-10-07 01:24:15120#include "components/sync/base/sync_prefs.h"
maxbogueea16ff412016-10-28 16:35:29121#include "components/sync_preferences/pref_service_syncable.h"
Mikel Astiz0889b2be2018-09-25 16:20:41122#include "components/sync_sessions/session_sync_prefs.h"
[email protected]81135072014-02-14 14:11:02123#include "components/translate/core/browser/translate_prefs.h"
wafflesd2d9a332016-04-09 01:59:57124#include "components/update_client/update_client.h"
blundell0300cdea2015-09-03 12:47:44125#include "components/variations/service/variations_service.h"
[email protected]f3b1a082011-11-18 00:34:30126#include "content/public/browser/render_process_host.h"
Scott Violetc8240b02018-03-08 22:03:59127#include "extensions/buildflags/buildflags.h"
[email protected]ad66db12014-07-10 12:43:47128#include "net/http/http_server_properties_manager.h"
Scott Violet02e38b92018-03-27 23:42:14129#include "ppapi/buildflags/buildflags.h"
Scott Violet318a55f2018-03-30 19:08:19130#include "printing/buildflags/buildflags.h"
Scott Violeta5f7ba12018-04-02 22:03:40131#include "rlz/buildflags/buildflags.h"
[email protected]a814d8632009-01-31 20:18:52132
brettwd1bc9da2016-10-14 19:04:24133#if BUILDFLAG(ENABLE_APP_LIST)
khmeleca50572016-11-03 16:54:45134#include "chrome/browser/ui/app_list/app_list_syncable_service.h"
thestigf2a0fa92016-09-07 09:37:29135#endif
136
Denis Kuznetsov32099f32017-12-15 14:04:57137#if BUILDFLAG(ENABLE_BACKGROUND_MODE)
thestige4155842014-10-20 18:58:02138#include "chrome/browser/background/background_mode_manager.h"
139#endif
140
brettw00899e62016-11-12 02:10:17141#if BUILDFLAG(ENABLE_EXTENSIONS)
je_julie.kim7fbb5a1a2015-02-09 17:26:05142#include "chrome/browser/accessibility/animation_policy_prefs.h"
Dominick Ng6ff51052018-07-06 05:30:20143#include "chrome/browser/apps/platform_apps/shortcut_manager.h"
[email protected]17510602014-06-05 11:02:28144#include "chrome/browser/extensions/activity_log/activity_log.h"
145#include "chrome/browser/extensions/api/commands/command_service.h"
Adam Langley4da8d112017-11-30 06:24:01146#include "chrome/browser/extensions/api/cryptotoken_private/cryptotoken_private_api.h"
[email protected]17510602014-06-05 11:02:28147#include "chrome/browser/extensions/api/tabs/tabs_api.h"
[email protected]d5a74be2014-08-08 01:01:27148#include "chrome/browser/extensions/extension_web_ui.h"
[email protected]17510602014-06-05 11:02:28149#include "chrome/browser/extensions/launch_util.h"
rdevlin.cronin81d35162017-05-31 15:44:48150#include "chrome/browser/extensions/ntp_overridden_bubble_delegate.h"
thakis678822e2017-04-20 17:20:34151#include "chrome/browser/ui/toolbar/component_toolbar_actions_factory.h"
avib896c712015-12-26 02:10:43152#include "chrome/browser/ui/toolbar/toolbar_actions_bar.h"
Devlin Cronin71f0f532018-04-26 16:35:06153#include "chrome/browser/ui/webui/extensions/extensions_ui.h"
tbarzicfa3c7ef62017-04-17 23:12:02154#include "extensions/browser/api/audio/audio_api.h"
afakhry2bd481832016-06-16 16:17:24155#include "extensions/browser/api/runtime/runtime_api.h"
[email protected]d5a74be2014-08-08 01:01:27156#include "extensions/browser/extension_prefs.h"
James Hawkins1d1dc7e02018-03-02 22:11:54157#if defined(OS_CHROMEOS)
James Hawkins5330caef2018-03-05 21:00:28158#include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_service.h"
A Olsen5806d6552019-01-22 09:58:20159#include "chrome/browser/chromeos/settings/stats_reporting_controller.h"
Xiaochu Liu48ab5932018-05-11 03:44:04160#include "chrome/browser/component_updater/metadata_table_chromeos.h"
Nicolas Ouellet-Payeur7f9a63ef2018-08-28 17:26:06161#else
162#include "chrome/browser/extensions/api/enterprise_reporting_private/prefs.h"
James Hawkins1d1dc7e02018-03-02 22:11:54163#endif
brettw00899e62016-11-12 02:10:17164#endif // BUILDFLAG(ENABLE_EXTENSIONS)
[email protected]17510602014-06-05 11:02:28165
jianliac940cb2017-06-07 05:13:08166#if BUILDFLAG(ENABLE_OFFLINE_PAGES)
Dmitry Titov4d2bde02017-06-30 05:29:52167#include "chrome/browser/offline_pages/prefetch/offline_metrics_collector_impl.h"
Justin DeWittfa60f892017-07-26 01:33:33168#include "chrome/browser/offline_pages/prefetch/prefetch_background_task_handler_impl.h"
Dan Harrington57be4a02018-09-14 17:50:19169#include "components/offline_pages/core/prefetch/prefetch_prefs.h"
jianliac940cb2017-06-07 05:13:08170#endif
171
bauerbecab4f52017-03-13 20:16:41172#if BUILDFLAG(ENABLE_PLUGINS)
Nicholas Verned391eae2017-11-13 02:41:38173#include "chrome/browser/plugins/plugin_info_host_impl.h"
bauerb4da36132014-12-26 19:53:13174#include "chrome/browser/plugins/plugins_resource_service.h"
175#endif
176
brettw9e85ef42016-11-01 21:01:24177#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
kotenkov8695455122015-04-16 16:40:07178#include "chrome/browser/supervised_user/child_accounts/child_account_service.h"
[email protected]cce15bb2014-06-17 13:43:51179#include "chrome/browser/supervised_user/supervised_user_service.h"
bauerb4da36132014-12-26 19:53:13180#include "chrome/browser/supervised_user/supervised_user_whitelist_service.h"
[email protected]a0795592013-05-25 14:19:02181#endif
182
thestig4888f292016-10-07 23:57:55183#if BUILDFLAG(ENABLE_SERVICE_DISCOVERY)
[email protected]9544e562013-09-21 04:20:55184#include "chrome/browser/ui/webui/local_discovery/local_discovery_ui.h"
185#endif
186
Bettina Deaf3dac202017-09-16 20:53:22187#if BUILDFLAG(ENABLE_DESKTOP_IN_PRODUCT_HELP)
188#include "chrome/browser/feature_engagement/session_duration_updater.h"
189#endif
190
thestigf2a0fa92016-09-07 09:37:29191#if defined(OS_ANDROID)
zpengdb4a58e2017-01-10 17:40:32192#include "chrome/browser/android/bookmarks/partner_bookmarks_shim.h"
Becky Zhou5ea1b5b2018-04-13 01:48:10193#include "chrome/browser/android/contextual_suggestions/contextual_suggestions_prefs.h"
Dmitry Titov5f6cfb42018-10-05 18:52:14194#include "chrome/browser/android/explore_sites/history_statistics_reporter.h"
sfierab0f63392017-01-05 14:24:47195#include "chrome/browser/android/ntp/content_suggestions_notifier_service.h"
zpengdb4a58e2017-01-10 17:40:32196#include "chrome/browser/android/ntp/recent_tabs_page_prefs.h"
Kenichi Ishibashi35ac7132017-12-08 03:44:30197#include "chrome/browser/android/oom_intervention/oom_intervention_decider.h"
mlliuee3a405c2016-10-28 22:34:52198#include "chrome/browser/android/preferences/browser_prefs_android.h"
Patrick Noland87d9f842019-01-16 03:52:02199#include "chrome/browser/android/usage_stats/usage_stats_bridge.h"
benwells0b3748a2017-03-21 06:28:40200#include "chrome/browser/geolocation/geolocation_permission_context_android.h"
vitaliii2600e8e02016-12-09 17:23:36201#include "chrome/browser/ntp_snippets/download_suggestions_provider.h"
xhwang116acb92017-04-03 18:27:20202#include "components/cdm/browser/media_drm_storage_impl.h"
Sky Malicedd28f282018-06-14 03:22:24203#include "components/feed/buildflags.h"
Vitalii Iarkoe4f716e2017-08-04 06:58:55204#include "components/ntp_snippets/breaking_news/breaking_news_gcm_app_handler.h"
205#include "components/ntp_snippets/breaking_news/subscription_manager_impl.h"
vitaliii9f8aa5f82016-12-22 09:26:35206#include "components/ntp_snippets/category_rankers/click_based_category_ranker.h"
zpengdb4a58e2017-01-10 17:40:32207#include "components/ntp_tiles/popular_sites_impl.h"
Sky Malicedd28f282018-06-14 03:22:24208#if BUILDFLAG(ENABLE_FEED_IN_CHROME)
209#include "components/feed/core/feed_scheduler_host.h"
Sky Malice8ff643002018-07-31 21:06:07210#include "components/feed/core/refresh_throttler.h"
Sky Malice14f348282018-06-14 22:50:14211#include "components/feed/core/user_classifier.h"
Sky Malicedd28f282018-06-14 03:22:24212#endif // BUILDFLAG(ENABLE_FEED_IN_CHROME)
Greg Thompson8bcd799b2018-08-10 09:49:33213#else // defined(OS_ANDROID)
peter9f4490a2017-01-27 00:58:36214#include "chrome/browser/gcm/gcm_product_util.h"
Michael Giuffridab41fa5c42017-11-13 23:30:57215#include "chrome/browser/metrics/tab_stats_tracker.h"
Kyle Milka503bba32018-06-08 16:23:05216#include "chrome/browser/search/instant_service.h"
Kyle Milka779c9ce2019-01-18 16:39:22217#include "chrome/browser/search/search_suggest/search_suggest_service.h"
thestigc91176f42014-10-28 20:16:35218#include "chrome/browser/signin/signin_promo.h"
zpengdb4a58e2017-01-10 17:40:32219#include "chrome/browser/ui/startup/startup_browser_creator.h"
dbeam72db0762015-05-20 20:37:12220#include "chrome/browser/ui/webui/foreign_session_handler.h"
John Lee8269bcaf2019-01-25 22:44:27221#include "chrome/browser/ui/webui/history_ui.h"
Michael Giuffridab41fa5c42017-11-13 23:30:57222#include "chrome/browser/ui/webui/settings/md_settings_ui.h"
Greg Thompson8bcd799b2018-08-10 09:49:33223#include "chrome/browser/upgrade_detector/upgrade_detector.h"
224#endif // defined(OS_ANDROID)
thestigc91176f42014-10-28 20:16:35225
[email protected]9acc48602009-11-30 21:18:51226#if defined(OS_CHROMEOS)
peletskyif19358fd2016-11-08 16:21:29227#include "chrome/browser/chromeos/app_mode/arc/arc_kiosk_app_manager.h"
[email protected]1637c192013-02-16 04:00:13228#include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h"
hidehiko5d944082016-11-18 06:16:04229#include "chrome/browser/chromeos/arc/arc_session_manager.h"
msramek56e72e82016-11-17 16:14:47230#include "chrome/browser/chromeos/arc/policy/arc_policy_bridge.h"
Sarah Hua0b666a2018-05-22 16:45:38231#include "chrome/browser/chromeos/child_accounts/screen_time_controller.h"
Renee Wrightc41d5432018-04-26 05:27:37232#include "chrome/browser/chromeos/crostini/crostini_pref_names.h"
Timothy Lohdc95cdac2018-03-22 01:02:03233#include "chrome/browser/chromeos/crostini/crostini_registry_service.h"
Kyle Horimoto776196a2018-04-03 17:29:17234#include "chrome/browser/chromeos/cryptauth/cryptauth_device_id_provider_impl.h"
Satoru Takabayashi876d4e62014-12-03 04:52:24235#include "chrome/browser/chromeos/customization/customization_document.h"
[email protected]a5058a22013-08-29 20:49:51236#include "chrome/browser/chromeos/extensions/echo_private_api.h"
mtomaszbd1170f2014-10-21 05:34:18237#include "chrome/browser/chromeos/file_system_provider/registry.h"
[email protected]980d5f9e2013-12-17 17:47:08238#include "chrome/browser/chromeos/first_run/first_run.h"
Toni Barzic14329d02017-07-17 21:59:12239#include "chrome/browser/chromeos/lock_screen_apps/state_controller.h"
jdufault59d6f53d2017-02-15 19:19:37240#include "chrome/browser/chromeos/login/demo_mode/demo_mode_detector.h"
Toni Barzic75610ae2018-08-17 20:33:07241#include "chrome/browser/chromeos/login/demo_mode/demo_mode_resources_remover.h"
Wenzhao Zangc7402e82018-10-23 17:49:17242#include "chrome/browser/chromeos/login/demo_mode/demo_session.h"
Aga Wronskad2535c42018-08-24 15:56:22243#include "chrome/browser/chromeos/login/demo_mode/demo_setup_controller.h"
xiaoyinhb849e9c12017-04-21 21:40:33244#include "chrome/browser/chromeos/login/quick_unlock/fingerprint_storage.h"
Jacob Dufaultf7918c92018-04-04 20:56:28245#include "chrome/browser/chromeos/login/quick_unlock/pin_storage_prefs.h"
sammiequon250289992016-11-08 07:22:04246#include "chrome/browser/chromeos/login/quick_unlock/quick_unlock_utils.h"
[email protected]3b9deb402014-01-30 17:50:16247#include "chrome/browser/chromeos/login/saml/saml_offline_signin_limiter.h"
Mattias Nissler41b4a5d2017-09-22 15:37:55248#include "chrome/browser/chromeos/login/screens/reset_screen.h"
[email protected]295ca1a72014-07-01 16:14:31249#include "chrome/browser/chromeos/login/session/user_session_manager.h"
[email protected]aa8328fb2013-04-19 15:09:06250#include "chrome/browser/chromeos/login/startup_utils.h"
[email protected]83d82d42014-05-16 02:04:42251#include "chrome/browser/chromeos/login/users/avatar/user_image_manager.h"
252#include "chrome/browser/chromeos/login/users/avatar/user_image_sync_observer.h"
[email protected]4d390782014-08-15 09:22:58253#include "chrome/browser/chromeos/login/users/chrome_user_manager_impl.h"
[email protected]83d82d42014-05-16 02:04:42254#include "chrome/browser/chromeos/login/users/multi_profile_user_controller.h"
kirtika857eeac2016-11-05 00:24:26255#include "chrome/browser/chromeos/net/network_throttling_observer.h"
pneubeckdabdfe912015-06-18 13:42:13256#include "chrome/browser/chromeos/platform_keys/key_permissions.h"
Olya Kalitovac869f962018-12-04 12:01:23257#include "chrome/browser/chromeos/plugin_vm/plugin_vm_pref_names.h"
Bartosz Fabianowskid4d93a72018-05-17 18:49:48258#include "chrome/browser/chromeos/policy/app_install_event_log_manager_wrapper.h"
Bartosz Fabianowski79028ae2018-02-23 17:25:03259#include "chrome/browser/chromeos/policy/app_install_event_logger.h"
Pavol Marko35bcf1a2018-05-23 15:33:07260#include "chrome/browser/chromeos/policy/auto_enrollment_client_impl.h"
[email protected]97275822014-01-21 19:30:36261#include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
[email protected]69a99822013-06-11 00:31:36262#include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h"
[email protected]b39d25712013-03-14 09:53:40263#include "chrome/browser/chromeos/policy/device_status_collector.h"
rsorokin3c13ece2017-01-16 15:58:41264#include "chrome/browser/chromeos/policy/dm_token_storage.h"
[email protected]bcb94772013-12-19 14:28:58265#include "chrome/browser/chromeos/policy/policy_cert_service_factory.h"
Jia4a1a9842018-11-22 03:45:37266#include "chrome/browser/chromeos/power/auto_screen_brightness/metrics_reporter.h"
Daniel Erat645c8652017-11-16 00:01:57267#include "chrome/browser/chromeos/power/power_metrics_reporter.h"
[email protected]9acc48602009-11-30 21:18:51268#include "chrome/browser/chromeos/preferences.h"
David Valleauce0aedfa2018-03-30 18:46:16269#include "chrome/browser/chromeos/printing/cups_printers_manager.h"
Justin Carlson45339ae2017-07-17 23:59:10270#include "chrome/browser/chromeos/printing/synced_printers_manager.h"
afakhry5b2b3d92016-10-12 21:15:46271#include "chrome/browser/chromeos/resource_reporter/resource_reporter.h"
[email protected]a28c45a2013-04-18 06:02:18272#include "chrome/browser/chromeos/settings/device_oauth2_token_service.h"
[email protected]0c4d97c2012-09-01 20:47:20273#include "chrome/browser/chromeos/settings/device_settings_cache.h"
[email protected]c280dbf2013-03-19 12:17:44274#include "chrome/browser/chromeos/system/automatic_reboot_manager.h"
afakhrye8eac602015-11-10 02:31:22275#include "chrome/browser/chromeos/system/input_device_settings.h"
[email protected]a0e44ccf2013-04-19 01:48:22276#include "chrome/browser/extensions/api/enterprise_platform_keys_private/enterprise_platform_keys_private_api.h"
[email protected]5a145e82014-05-29 22:19:07277#include "chrome/browser/extensions/extension_assets_manager_chromeos.h"
xhwangc84739e2015-03-14 01:02:46278#include "chrome/browser/media/protected_media_identifier_permission_context.h"
[email protected]8304f61a2014-05-24 12:17:33279#include "chrome/browser/metrics/chromeos_metrics_provider.h"
Michael Giuffridab41fa5c42017-11-13 23:30:57280#include "chrome/browser/ui/ash/chrome_launcher_prefs.h"
zelidrag459b11b12014-11-14 04:05:53281#include "chrome/browser/ui/webui/chromeos/login/enable_debugging_screen_handler.h"
[email protected]8e6742a52014-05-23 14:56:22282#include "chrome/browser/ui/webui/chromeos/login/hid_detection_screen_handler.h"
[email protected]daf4b542013-07-23 17:11:27283#include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h"
jamescook9439c7392014-12-18 01:47:25284#include "chromeos/audio/audio_devices_pref_handler_impl.h"
Steven Bennetts38e9bde22019-01-03 17:31:10285#include "chromeos/constants/chromeos_switches.h"
Matthew Wang9e210652018-11-16 19:40:28286#include "chromeos/network/fast_transition_observer.h"
stevenjb100c6202016-10-28 02:28:00287#include "chromeos/network/proxy/proxy_config_handler.h"
Jordy Greenblatt2265de702018-07-26 19:05:26288#include "chromeos/services/multidevice_setup/multidevice_setup_service.h"
alemate48255f3d2015-01-30 18:11:41289#include "chromeos/timezone/timezone_resolver.h"
Hidehiko Abe33e9adf2017-09-13 06:12:23290#include "components/arc/arc_prefs.h"
knn062cdbb2015-06-26 18:18:42291#include "components/invalidation/impl/invalidator_storage.h"
stevenjbf22f82e2016-10-26 21:47:38292#include "components/onc/onc_pref_names.h"
glevin5dd01a72016-03-23 23:08:12293#include "components/quirks/quirks_manager.h"
tbarzicd9a88fc92017-07-14 02:18:10294#include "extensions/browser/api/lock_screen_data/lock_screen_item_storage.h"
[email protected]86c6b9e32011-10-25 17:09:10295#else
296#include "chrome/browser/extensions/default_apps.h"
[email protected]9acc48602009-11-30 21:18:51297#endif
298
brettwd1bc9da2016-10-14 19:04:24299#if defined(OS_CHROMEOS) && BUILDFLAG(ENABLE_APP_LIST)
Dominick Ngbe35fdc2018-12-03 09:42:22300#include "chrome/browser/chromeos/apps/apk_web_app_service.h"
khmeld7c5a322015-12-04 16:24:47301#include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h"
skaref32ba96e2015-02-20 20:27:17302#endif
303
[email protected]ceafc462013-11-04 12:26:03304#if defined(OS_MACOSX)
[email protected]425f7a02014-04-29 01:51:44305#include "chrome/browser/ui/cocoa/apps/quit_with_apps_controller_mac.h"
Tom Anderson6a496032018-08-30 23:38:37306#include "chrome/browser/ui/cocoa/confirm_quit.h"
Tonko Sabolčec43615a92018-09-12 12:43:41307#include "components/os_crypt/os_crypt.h"
[email protected]2366a3a2012-10-02 20:41:14308#endif
309
[email protected]bdb8a1e2013-10-03 08:14:00310#if defined(OS_WIN)
[email protected]c5d4b1842014-06-20 21:19:50311#include "chrome/browser/component_updater/sw_reporter_installer_win.h"
Patrick Monettee7d84a12018-02-28 00:16:34312#if defined(GOOGLE_CHROME_BUILD)
Patrick Monettef8fd8b22018-05-10 20:58:04313#include "chrome/browser/conflicts/incompatible_applications_updater_win.h"
Patrick Monette6b7c475b2018-06-12 14:58:08314#include "chrome/browser/conflicts/module_database_win.h"
Patrick Monettee31f63e22018-06-06 00:10:34315#include "chrome/browser/conflicts/third_party_conflicts_manager_win.h"
Patrick Monettee7d84a12018-02-28 00:16:34316#endif // defined(GOOGLE_CHROME_BUILD)
ftirelo46b34222017-06-19 10:36:57317#include "chrome/browser/safe_browsing/chrome_cleaner/settings_resetter_win.h"
alito856526d2017-03-03 09:16:17318#include "chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_prefs_manager.h"
[email protected]bdb8a1e2013-10-03 08:14:00319#endif
320
Nicolas Ouellet-Payeurbdcab0092018-10-22 14:50:33321#if defined(OS_WIN) || defined(OS_MACOSX) || \
322 (defined(OS_LINUX) && !defined(OS_CHROMEOS))
Nicolas Ouellet-Payeur9a4a94d2018-09-17 15:26:11323#include "chrome/browser/browser_switcher/browser_switcher_prefs.h"
324#endif
325
thestigf2a0fa92016-09-07 09:37:29326#if !defined(OS_ANDROID) && !defined(OS_CHROMEOS)
327#include "chrome/browser/ui/startup/default_browser_prompt.h"
328#endif
329
[email protected]ceafc462013-11-04 12:26:03330#if defined(TOOLKIT_VIEWS)
331#include "chrome/browser/ui/browser_view_prefs.h"
[email protected]ceafc462013-11-04 12:26:03332#endif
333
kristiparkc0199772018-07-18 05:25:42334#if !defined(OS_ANDROID)
Becca Hughes7d2bbb82018-08-07 22:56:59335#include "chrome/browser/media/unified_autoplay_config.h"
kristiparkc0199772018-07-18 05:25:42336#include "components/ntp_tiles/custom_links_manager_impl.h"
337#endif
338
[email protected]572f40c9b2012-07-06 20:35:33339namespace {
340
Alexei Svitkine472ae5b2017-08-29 19:40:20341#if defined(OS_ANDROID)
Conley Owens31132ff92018-04-20 20:15:57342// Deprecated 4/2018.
343const char kDismissedPhysicalWebPageSuggestions[] =
344 "ntp_suggestions.physical_web.dismissed_ids";
Yafei Duan03bb7d12018-05-05 01:13:27345// Deprecated 5/2018.
346const char kDismissedRecentOfflineTabSuggestions[] =
347 "ntp_suggestions.offline_pages.recent_tabs.dismissed_ids";
Bret Sepulvedae795b2b2018-01-25 20:00:05348#else
349// Deprecated 1/2018.
350const char kShowFirstRunBubbleOption[] = "show-first-run-bubble-option";
Alexei Svitkine472ae5b2017-08-29 19:40:20351#endif // defined(OS_ANDROID)
352
Patrick Monette341426e2018-06-15 21:22:45353#if defined(OS_WIN)
354// Deprecated 6/2018.
355const char kResetHasSeenWin10PromoPage[] =
356 "browser.reset_has_seen_win10_promo_page";
357#endif
358
Alexandr Ilin273e20b2018-09-05 19:47:57359// Deprecated 8/2018.
360const char kDnsPrefetchingStartupList[] = "dns_prefetching.startup_list";
361const char kDnsPrefetchingHostReferralList[] =
362 "dns_prefetching.host_referral_list";
363
Ramin Halavati9057c112018-09-17 09:34:16364// Deprecated 9/2018
365const char kGeolocationAccessToken[] = "geolocation.access_token";
366const char kGoogleServicesPasswordHash[] = "google.services.password_hash";
367const char kModuleConflictBubbleShown[] = "module_conflict.bubble_shown";
368const char kOptionsWindowLastTabIndex[] = "options_window.last_tab_index";
369const char kTrustedDownloadSources[] = "trusted_download_sources";
370#if defined(OS_WIN)
371const char kLastWelcomedOSVersion[] = "browser.last_welcomed_os_version";
372#endif
Marc Treiba58d9962018-09-27 14:40:51373const char kSupervisedUserCreationAllowed[] =
374 "profile.managed_user_creation_allowed";
Ramin Halavati9057c112018-09-17 09:34:16375
Jaeyong Bae6e7d2262018-10-12 14:12:40376// Deprecated 10/2018
377const char kReverseAutologinEnabled[] = "reverse_autologin.enabled";
378
Tarun Bansal5f27ab972018-11-07 01:11:30379// Deprecated 11/2018.
380const char kNetworkQualities[] = "net.network_qualities";
Marc Treib81f6d602018-11-07 10:10:34381const char kForceSessionSync[] = "settings.history_recorded";
Hector Carmona523cf502018-11-19 19:51:40382const char kOnboardDuringNUX[] = "browser.onboard_during_nux";
Hector Carmona2ced80ec2018-11-29 21:35:01383const char kNuxOnboardGroup[] = "browser.onboard_group";
Matt Menke7f7caba2018-11-20 22:01:55384// This pref is particularly large, taking up 15+% of the prefs file, so should
385// perhaps be kept around longer than the others.
386const char kHttpServerProperties[] = "net.http_server_properties";
Tarun Bansal5f27ab972018-11-07 01:11:30387
Joshua Pawlicki009fb5f12019-01-18 21:44:47388// Deprecated 1/2019.
389const char kNextUpdateCheck[] = "extensions.autoupdate.next_check";
390const char kLastUpdateCheck[] = "extensions.autoupdate.last_check";
391
James Cook0ba192bf2017-12-01 20:53:11392// Register prefs used only for migration (clearing or moving to a new key).
393void RegisterProfilePrefsForMigration(
394 user_prefs::PrefRegistrySyncable* registry) {
Conley Owens31132ff92018-04-20 20:15:57395
396#if defined(OS_ANDROID)
397 registry->RegisterListPref(kDismissedPhysicalWebPageSuggestions);
Yafei Duan03bb7d12018-05-05 01:13:27398 registry->RegisterListPref(kDismissedRecentOfflineTabSuggestions);
Conley Owens31132ff92018-04-20 20:15:57399#endif
Alexandr Ilin273e20b2018-09-05 19:47:57400
401 registry->RegisterListPref(kDnsPrefetchingStartupList);
402 registry->RegisterListPref(kDnsPrefetchingHostReferralList);
Ramin Halavati9057c112018-09-17 09:34:16403
404 registry->RegisterStringPref(kGeolocationAccessToken, std::string());
405 registry->RegisterStringPref(kGoogleServicesPasswordHash, std::string());
406 registry->RegisterIntegerPref(kModuleConflictBubbleShown, 0);
407 registry->RegisterIntegerPref(kOptionsWindowLastTabIndex, 0);
408 registry->RegisterStringPref(kTrustedDownloadSources, std::string());
Marc Treiba58d9962018-09-27 14:40:51409 registry->RegisterBooleanPref(kSupervisedUserCreationAllowed, true);
Jaeyong Bae6e7d2262018-10-12 14:12:40410
411 registry->RegisterBooleanPref(kReverseAutologinEnabled, true);
Tarun Bansal5f27ab972018-11-07 01:11:30412
413 registry->RegisterDictionaryPref(kNetworkQualities, PrefRegistry::LOSSY_PREF);
Marc Treib81f6d602018-11-07 10:10:34414 registry->RegisterBooleanPref(kForceSessionSync, false);
Hector Carmona523cf502018-11-19 19:51:40415 registry->RegisterBooleanPref(kOnboardDuringNUX, false);
Hector Carmona2ced80ec2018-11-29 21:35:01416 registry->RegisterIntegerPref(kNuxOnboardGroup, 0);
Matt Menke7f7caba2018-11-20 22:01:55417 registry->RegisterDictionaryPref(kHttpServerProperties,
418 PrefRegistry::LOSSY_PREF);
Joshua Pawlicki009fb5f12019-01-18 21:44:47419 registry->RegisterIntegerPref(kLastUpdateCheck, 0);
420 registry->RegisterIntegerPref(kNextUpdateCheck, 0);
James Cook0ba192bf2017-12-01 20:53:11421}
422
[email protected]572f40c9b2012-07-06 20:35:33423} // namespace
424
[email protected]4082306d92013-02-21 14:51:01425void RegisterLocalState(PrefRegistrySimple* registry) {
[email protected]2a5f29632012-11-26 17:17:55426 // Please keep this list alphabetized.
[email protected]b1de2c72013-02-06 02:45:47427 browser_shutdown::RegisterPrefs(registry);
428 BrowserProcessImpl::RegisterPrefs(registry);
Chris Palmerac7d75642017-11-22 20:12:54429 ChromeContentBrowserClient::RegisterLocalStatePrefs(registry);
[email protected]4a55a712014-06-08 16:50:34430 ChromeMetricsServiceClient::RegisterPrefs(registry);
oysteinede6783b2016-05-25 18:08:43431 ChromeTracingDelegate::RegisterPrefs(registry);
sorinebcfc8dd2016-08-12 21:57:18432 component_updater::RegisterPrefs(registry);
[email protected]b1de2c72013-02-06 02:45:47433 ExternalProtocolHandler::RegisterPrefs(registry);
sdefresne8593e6432015-12-01 12:38:08434 flags_ui::PrefServiceFlagsStorage::RegisterPrefs(registry);
[email protected]e6933d2a2013-03-12 22:32:21435 GpuModeManager::RegisterPrefs(registry);
[email protected]b1de2c72013-02-06 02:45:47436 IntranetRedirectDetector::RegisterPrefs(registry);
[email protected]3c319eb2013-02-21 14:44:45437 IOThread::RegisterPrefs(registry);
Anthony Vallee-Dubois6f993122018-09-17 16:13:28438 language::GeoLanguageProvider::RegisterLocalStatePrefs(registry);
[email protected]d0ab865b2014-06-04 19:41:34439 network_time::NetworkTimeTracker::RegisterPrefs(registry);
iclelland27f4bcb2016-06-22 16:41:03440 OriginTrialPrefs::RegisterPrefs(registry);
Tonko Sabolčec6f271d32018-08-17 14:35:47441 password_manager::PasswordManager::RegisterLocalPrefs(registry);
[email protected]b1de2c72013-02-06 02:45:47442 PrefProxyConfigTrackerImpl::RegisterPrefs(registry);
443 ProfileInfoCache::RegisterPrefs(registry);
[email protected]de71ae992013-07-18 03:30:38444 profiles::RegisterPrefs(registry);
nzolghadrd87a308d2016-12-07 15:45:56445 rappor::RapporServiceImpl::RegisterPrefs(registry);
[email protected]ceafc462013-11-04 12:26:03446 RegisterScreenshotPrefs(registry);
Luke Zielinski63784cd2018-05-22 14:08:16447 safe_browsing::RegisterLocalStatePrefs(registry);
Mikel Astizf61f4ba02018-06-01 10:50:19448 sessions::SessionIdGenerator::RegisterPrefs(registry);
[email protected]b1de2c72013-02-06 02:45:47449 SigninManagerFactory::RegisterPrefs(registry);
Ryan Sleevi4689ad32018-04-16 19:09:05450 SSLConfigServiceManager::RegisterPrefs(registry);
fdoray44cd7812016-01-08 17:03:59451 startup_metric_utils::RegisterPrefs(registry);
Michael Giuffridab41fa5c42017-11-13 23:30:57452 subresource_filter::IndexedRulesetVersion::RegisterPrefs(registry);
Matt Menke4dfb375c2018-06-13 18:06:31453 SystemNetworkContextManager::RegisterPrefs(registry);
wafflesd2d9a332016-04-09 01:59:57454 update_client::RegisterPrefs(registry);
Michael Giuffridab41fa5c42017-11-13 23:30:57455 variations::VariationsService::RegisterPrefs(registry);
[email protected]cc36c2c2012-03-01 00:57:34456
[email protected]b1de2c72013-02-06 02:45:47457 policy::BrowserPolicyConnector::RegisterPrefs(registry);
458 policy::PolicyStatisticsCollector::RegisterPrefs(registry);
Owen Min54ddcd72017-08-16 20:10:58459 policy::RegisterPrefs(registry);
[email protected]27e96a972011-10-20 20:06:55460
Denis Kuznetsov32099f32017-12-15 14:04:57461#if BUILDFLAG(ENABLE_BACKGROUND_MODE)
Michael Giuffridab41fa5c42017-11-13 23:30:57462 BackgroundModeManager::RegisterPrefs(registry);
463#endif
464
James Hawkins1d1dc7e02018-03-02 22:11:54465#if BUILDFLAG(ENABLE_EXTENSIONS) and defined(OS_CHROMEOS)
James Hawkins5330caef2018-03-05 21:00:28466 chromeos::EasyUnlockService::RegisterPrefs(registry);
xiyuane4f1c4e02014-10-06 16:28:44467#endif
468
brettw4b461082016-11-19 18:55:16469#if BUILDFLAG(ENABLE_PLUGINS)
[email protected]ceafc462013-11-04 12:26:03470 PluginsResourceService::RegisterPrefs(registry);
471#endif
472
Mark Pearsonee17df912017-04-27 21:51:04473#if defined(OS_ANDROID)
474 ::android::RegisterPrefs(registry);
Michael Giuffridab41fa5c42017-11-13 23:30:57475#else
Derek Cheng34478382018-04-07 00:32:59476 media_router::RegisterLocalStatePrefs(registry);
jianli2dc910b02014-09-19 02:42:46477 // The native GCM is used on Android instead.
478 gcm::GCMChannelStatusSyncer::RegisterPrefs(registry);
johnme627dc8c72016-08-19 21:49:39479 gcm::RegisterPrefs(registry);
Michael Giuffridab41fa5c42017-11-13 23:30:57480 metrics::TabStatsTracker::RegisterPrefs(registry);
481 RegisterBrowserPrefs(registry);
482 StartupBrowserCreator::RegisterLocalStatePrefs(registry);
483 task_manager::TaskManagerInterface::RegisterPrefs(registry);
thestigd75ce5532015-10-05 22:08:34484 UpgradeDetector::RegisterPrefs(registry);
Bret Sepulvedae795b2b2018-01-25 20:00:05485 // Obsolete. See MigrateObsoleteBrowserPrefs().
486 registry->RegisterIntegerPref(kShowFirstRunBubbleOption, 0);
[email protected]e7f79872013-09-13 01:39:31487#if !defined(OS_CHROMEOS)
[email protected]abaca602013-03-29 01:31:29488 RegisterDefaultBrowserPromptPrefs(registry);
[email protected]e7f79872013-09-13 01:39:31489#endif // !defined(OS_CHROMEOS)
490#endif // !defined(OS_ANDROID)
[email protected]3954f332012-02-25 02:51:54491
[email protected]8f0d8ecd12010-04-20 11:51:30492#if defined(OS_CHROMEOS)
[email protected]8304f61a2014-05-24 12:17:33493 ChromeOSMetricsProvider::RegisterPrefs(registry);
peletskyif19358fd2016-11-08 16:21:29494 chromeos::ArcKioskAppManager::RegisterPrefs(registry);
jamescook928c5e82015-01-07 20:47:18495 chromeos::AudioDevicesPrefHandlerImpl::RegisterPrefs(registry);
[email protected]4d390782014-08-15 09:22:58496 chromeos::ChromeUserManagerImpl::RegisterPrefs(registry);
[email protected]219643f2014-07-16 17:54:00497 chromeos::DemoModeDetector::RegisterPrefs(registry);
Toni Barzic75610ae2018-08-17 20:33:07498 chromeos::DemoModeResourcesRemover::RegisterLocalStatePrefs(registry);
Wenzhao Zangc7402e82018-10-23 17:49:17499 chromeos::DemoSession::RegisterLocalStatePrefs(registry);
Aga Wronskad2535c42018-08-24 15:56:22500 chromeos::DemoSetupController::RegisterLocalStatePrefs(registry);
501 chromeos::DeviceOAuth2TokenService::RegisterPrefs(registry);
502 chromeos::device_settings_cache::RegisterPrefs(registry);
503 chromeos::echo_offer::RegisterPrefs(registry);
504 chromeos::EnableDebuggingScreenHandler::RegisterPrefs(registry);
Matthew Wang9e210652018-11-16 19:40:28505 chromeos::FastTransitionObserver::RegisterPrefs(registry);
Aga Wronskad2535c42018-08-24 15:56:22506 chromeos::HIDDetectionScreenHandler::RegisterPrefs(registry);
507 chromeos::KioskAppManager::RegisterPrefs(registry);
508 chromeos::language_prefs::RegisterPrefs(registry);
509 chromeos::MultiProfileUserController::RegisterPrefs(registry);
kirtika857eeac2016-11-05 00:24:26510 chromeos::NetworkThrottlingObserver::RegisterPrefs(registry);
Daniel Erat645c8652017-11-16 00:01:57511 chromeos::PowerMetricsReporter::RegisterLocalStatePrefs(registry);
Jia4a1a9842018-11-22 03:45:37512 chromeos::power::auto_screen_brightness::MetricsReporter::
513 RegisterLocalStatePrefs(registry);
[email protected]681958c2013-02-21 13:48:14514 chromeos::Preferences::RegisterPrefs(registry);
Mattias Nissler41b4a5d2017-09-22 15:37:55515 chromeos::ResetScreen::RegisterPrefs(registry);
afakhry5b2b3d92016-10-12 21:15:46516 chromeos::ResourceReporter::RegisterPrefs(registry);
[email protected]b1de2c72013-02-06 02:45:47517 chromeos::ServicesCustomizationDocument::RegisterPrefs(registry);
[email protected]daf4b542013-07-23 17:11:27518 chromeos::SigninScreenHandler::RegisterPrefs(registry);
[email protected]295ca1a72014-07-01 16:14:31519 chromeos::StartupUtils::RegisterPrefs(registry);
A Olsen5806d6552019-01-22 09:58:20520 chromeos::StatsReportingController::RegisterLocalStatePrefs(registry);
[email protected]c280dbf2013-03-19 12:17:44521 chromeos::system::AutomaticRebootManager::RegisterPrefs(registry);
glevin5dd01a72016-03-23 23:08:12522 chromeos::TimeZoneResolver::RegisterPrefs(registry);
[email protected]b1de2c72013-02-06 02:45:47523 chromeos::UserImageManager::RegisterPrefs(registry);
[email protected]295ca1a72014-07-01 16:14:31524 chromeos::UserSessionManager::RegisterPrefs(registry);
Xiaochu Liu48ab5932018-05-11 03:44:04525 component_updater::MetadataTable::RegisterPrefs(registry);
Kyle Horimoto776196a2018-04-03 17:29:17526 cryptauth::CryptAuthDeviceIdProviderImpl::RegisterLocalPrefs(registry);
[email protected]5a145e82014-05-29 22:19:07527 extensions::ExtensionAssetsManagerChromeOS::RegisterPrefs(registry);
tbarzicd9a88fc92017-07-14 02:18:10528 extensions::lock_screen_data::LockScreenItemStorage::RegisterLocalState(
529 registry);
[email protected]db8bf052014-06-25 11:53:10530 invalidation::InvalidatorStorage::RegisterPrefs(registry);
stevenjbf22f82e2016-10-26 21:47:38531 ::onc::RegisterPrefs(registry);
Pavol Marko35bcf1a2018-05-23 15:33:07532 policy::AutoEnrollmentClientImpl::RegisterPrefs(registry);
[email protected]97275822014-01-21 19:30:36533 policy::BrowserPolicyConnectorChromeOS::RegisterPrefs(registry);
[email protected]69a99822013-06-11 00:31:36534 policy::DeviceCloudPolicyManagerChromeOS::RegisterPrefs(registry);
[email protected]b1de2c72013-02-06 02:45:47535 policy::DeviceStatusCollector::RegisterPrefs(registry);
rsorokin3c13ece2017-01-16 15:58:41536 policy::DMTokenStorage::RegisterPrefs(registry);
[email protected]bcb94772013-12-19 14:28:58537 policy::PolicyCertServiceFactory::RegisterPrefs(registry);
glevin5dd01a72016-03-23 23:08:12538 quirks::QuirksManager::RegisterPrefs(registry);
[email protected]8f0d8ecd12010-04-20 11:51:30539#endif
[email protected]b6366ffa2012-02-29 17:12:26540
541#if defined(OS_MACOSX)
[email protected]b1de2c72013-02-06 02:45:47542 confirm_quit::RegisterLocalState(registry);
Tonko Sabolčec43615a92018-09-12 12:43:41543 OSCrypt::RegisterLocalPrefs(registry);
[email protected]425f7a02014-04-29 01:51:44544 QuitWithAppsController::RegisterPrefs(registry);
[email protected]b6366ffa2012-02-29 17:12:26545#endif
[email protected]bdb8a1e2013-10-03 08:14:00546
547#if defined(OS_WIN)
[email protected]c5d4b1842014-06-20 21:19:50548 component_updater::RegisterPrefsForSwReporter(registry);
Patrick Monettee7d84a12018-02-28 00:16:34549#if defined(GOOGLE_CHROME_BUILD)
Patrick Monettef8fd8b22018-05-10 20:58:04550 IncompatibleApplicationsUpdater::RegisterLocalStatePrefs(registry);
Patrick Monette6b7c475b2018-06-12 14:58:08551 ModuleDatabase::RegisterLocalStatePrefs(registry);
Patrick Monettee31f63e22018-06-06 00:10:34552 ThirdPartyConflictsManager::RegisterLocalStatePrefs(registry);
Patrick Monettee7d84a12018-02-28 00:16:34553#endif // defined(GOOGLE_CHROME_BUILD)
Patrick Monette341426e2018-06-15 21:22:45554
555 registry->RegisterBooleanPref(kResetHasSeenWin10PromoPage, false);
Ramin Halavati9057c112018-09-17 09:34:16556 registry->RegisterStringPref(kLastWelcomedOSVersion, std::string());
[email protected]bdb8a1e2013-10-03 08:14:00557#endif
[email protected]ceafc462013-11-04 12:26:03558
Alexei Svitkine7f42bf62018-12-05 19:33:01559 // Obsolete. See MigrateObsoleteBrowserPrefs().
560 registry->RegisterIntegerPref(metrics::prefs::kStabilityExecutionPhase, 0);
561
[email protected]ceafc462013-11-04 12:26:03562#if defined(TOOLKIT_VIEWS)
[email protected]af97be4c62014-02-13 14:43:34563 RegisterBrowserViewLocalPrefs(registry);
[email protected]ceafc462013-11-04 12:26:03564#endif
[email protected]9acc48602009-11-30 21:18:51565}
initial.commit09911bf2008-07-26 23:55:29566
[email protected]37ca3fe02013-07-05 15:32:44567// Register prefs applicable to all profiles.
568void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
rkaplow058da3132015-02-19 18:18:38569 TRACE_EVENT0("browser", "chrome::RegisterProfilePrefs");
570 SCOPED_UMA_HISTOGRAM_TIMER("Settings.RegisterProfilePrefsTime");
[email protected]2a5f29632012-11-26 17:17:55571 // User prefs. Please keep this list alphabetized.
Katie D93c943b62019-01-08 04:04:19572 accessibility_prefs::RegisterAccessibilityLabelsProfilePrefs(registry);
James Wallace-Lee25a1b05e2018-07-24 00:06:31573 AccessibilityUIMessageHandler::RegisterProfilePrefs(registry);
Moe Ahmadi173b0a2b2018-08-03 17:35:51574 autofill::prefs::RegisterProfilePrefs(registry);
Bernhard Bauer19190732017-09-28 09:03:33575 browsing_data::prefs::RegisterBrowserUserPrefs(registry);
Doug Turner9e79cf0c2018-04-05 21:32:30576 certificate_transparency::prefs::RegisterPrefs(registry);
Martin Kreichgauer0e1b15ef2018-06-20 02:59:50577 ChromeAuthenticatorRequestDelegate::RegisterProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:44578 ChromeContentBrowserClient::RegisterProfilePrefs(registry);
Emily Starkc657d45e2018-05-11 19:03:19579 ChromeSSLHostStateDelegate::RegisterProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:44580 ChromeVersionService::RegisterProfilePrefs(registry);
Eric Secklera5c24e12018-11-28 16:09:20581 chrome_browser_net::NetErrorTabHelper::RegisterProfilePrefs(registry);
[email protected]ba85a602014-06-28 20:37:12582 chrome_browser_net::RegisterPredictionOptionsProfilePrefs(registry);
[email protected]06690dc2014-03-07 08:44:00583 chrome_prefs::RegisterProfilePrefs(registry);
[email protected]6a5b0712014-07-16 00:30:10584 dom_distiller::DistilledPagePrefs::RegisterProfilePrefs(registry);
Travis Skare27cee15c2018-07-19 14:34:13585 DocumentProvider::RegisterProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:44586 DownloadPrefs::RegisterProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:44587 HostContentSettingsMap::RegisterProfilePrefs(registry);
Brandon Wylie6961a2e2018-09-19 23:03:37588 image_fetcher::ImageCache::RegisterProfilePrefs(registry);
dmurph93fa43b2017-02-07 23:45:16589 ImportantSitesUtil::RegisterProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:44590 IncognitoModePrefs::RegisterProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:44591 MediaCaptureDevicesDispatcher::RegisterProfilePrefs(registry);
[email protected]cd80cce2013-12-02 15:19:19592 MediaDeviceIDSalt::RegisterProfilePrefs(registry);
Becca Hughes6354b6b2017-08-31 22:01:55593 MediaEngagementService::RegisterProfilePrefs(registry);
John Rummelle5621c12017-09-05 23:52:10594 MediaStorageIdSalt::RegisterProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:44595 MediaStreamDevicesController::RegisterProfilePrefs(registry);
Michael Martis98cd8732017-07-14 03:26:19596 NavigationCorrectionTabObserver::RegisterProfilePrefs(registry);
brettw1f92eed2016-12-07 01:12:58597 NotifierStateTracker::RegisterProfilePrefs(registry);
jkrcal093410c2016-12-21 16:13:55598 ntp_snippets::ContentSuggestionsService::RegisterProfilePrefs(registry);
jkrcal093410c2016-12-21 16:13:55599 ntp_snippets::RemoteSuggestionsProviderImpl::RegisterProfilePrefs(registry);
jkrcalf9966462017-03-29 16:25:21600 ntp_snippets::RemoteSuggestionsSchedulerImpl::RegisterProfilePrefs(registry);
jkrcal505ea3a2016-07-22 10:19:22601 ntp_snippets::RequestThrottler::RegisterProfilePrefs(registry);
jkrcale13510e2016-09-08 17:56:20602 ntp_snippets::UserClassifier::RegisterProfilePrefs(registry);
treibbb0c5af52016-12-09 17:34:15603 ntp_tiles::MostVisitedSites::RegisterProfilePrefs(registry);
melandory444f85f2015-09-07 13:32:42604 password_bubble_experiment::RegisterPrefs(registry);
[email protected]a8564212014-04-09 16:16:51605 password_manager::PasswordManager::RegisterProfilePrefs(registry);
anthonyvd6a43b932017-05-11 18:39:27606 payments::RegisterProfilePrefs(registry);
Sharon Yangc6706902018-07-16 13:06:19607 PlatformNotificationServiceImpl::RegisterProfilePrefs(registry);
Pavol Markodebb0ff2018-05-07 18:35:41608 policy::DeveloperToolsPolicyHandler::RegisterProfilePrefs(registry);
Bernhard Bauer19190732017-09-28 09:03:33609 policy::URLBlacklistManager::RegisterProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:44610 PrefProxyConfigTrackerImpl::RegisterProfilePrefs(registry);
611 PrefsTabHelper::RegisterProfilePrefs(registry);
Robert Ogden22bd863372018-10-01 22:10:26612 PreviewsLitePageDecider::RegisterProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:44613 Profile::RegisterProfilePrefs(registry);
614 ProfileImpl::RegisterProfilePrefs(registry);
Matt Menkecfef87d2017-08-03 13:03:06615 ProfileNetworkContextService::RegisterProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:44616 ProtocolHandlerRegistry::RegisterProfilePrefs(registry);
johnmecf2da0c2015-10-28 19:42:12617 PushMessagingAppIdentifier::RegisterProfilePrefs(registry);
[email protected]c753f142013-02-10 13:14:04618 RegisterBrowserUserPrefs(registry);
Luke Zielinski12ef88552017-06-23 15:36:27619 safe_browsing::RegisterProfilePrefs(registry);
Daniel Vogelheim976f1c22017-11-22 16:26:03620 secure_origin_whitelist::RegisterProfilePrefs(registry);
Shivani Sharma343451382017-12-07 20:18:08621 SafeBrowsingTriggeredPopupBlocker::RegisterProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:44622 SessionStartupPref::RegisterProfilePrefs(registry);
Mikel Astiz0889b2be2018-09-25 16:20:41623 sync_sessions::SessionSyncPrefs::RegisterProfilePrefs(registry);
Bernhard Bauer19190732017-09-28 09:03:33624 syncer::SyncPrefs::RegisterProfilePrefs(registry);
Tatiana Gornaka4f3a922018-05-28 08:53:53625 syncer::PerUserTopicRegistrationManager::RegisterProfilePrefs(registry);
Tanja Gornak5c8b5d952018-10-12 14:39:54626 syncer::InvalidatorRegistrarWithMemory::RegisterProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:44627 TemplateURLPrepopulateData::RegisterProfilePrefs(registry);
[email protected]e5e72cc2014-07-22 19:06:49628 translate::TranslatePrefs::RegisterProfilePrefs(registry);
[email protected]855ebff2014-05-09 07:14:38629 ZeroSuggestProvider::RegisterProfilePrefs(registry);
[email protected]cc36c2c2012-03-01 00:57:34630
brettw00899e62016-11-12 02:10:17631#if BUILDFLAG(ENABLE_EXTENSIONS)
[email protected]17510602014-06-05 11:02:28632 ExtensionWebUI::RegisterProfilePrefs(registry);
je_julie.kim7fbb5a1a2015-02-09 17:26:05633 RegisterAnimationPolicyPrefs(registry);
mfoltz96f329c2016-01-13 18:16:58634 ToolbarActionsBar::RegisterProfilePrefs(registry);
Adam Langley4da8d112017-11-30 06:24:01635 extensions::api::CryptotokenRegisterProfilePrefs(registry);
mfoltz96f329c2016-01-13 18:16:58636 extensions::ActivityLog::RegisterProfilePrefs(registry);
tbarzicfa3c7ef62017-04-17 23:12:02637 extensions::AudioAPI::RegisterUserPrefs(registry);
mfoltz96f329c2016-01-13 18:16:58638 extensions::ExtensionPrefs::RegisterProfilePrefs(registry);
Devlin Cronin71f0f532018-04-26 16:35:06639 extensions::ExtensionsUI::RegisterProfilePrefs(registry);
mfoltz96f329c2016-01-13 18:16:58640 extensions::launch_util::RegisterProfilePrefs(registry);
rdevlin.cronin81d35162017-05-31 15:44:48641 extensions::NtpOverriddenBubbleDelegate::RegisterPrefs(registry);
afakhry2bd481832016-06-16 16:17:24642 extensions::RuntimeAPI::RegisterPrefs(registry);
Minh X. Nguyen3aa40692018-03-28 01:15:59643 update_client::RegisterProfilePrefs(registry);
Alexey Baskakov396edb92018-08-02 05:11:42644 web_app::WebAppProvider::RegisterProfilePrefs(registry);
brettw00899e62016-11-12 02:10:17645#endif // BUILDFLAG(ENABLE_EXTENSIONS)
[email protected]c2ac1dda2013-09-23 05:04:56646
Bettina Deaf3dac202017-09-16 20:53:22647#if BUILDFLAG(ENABLE_DESKTOP_IN_PRODUCT_HELP)
648 feature_engagement::SessionDurationUpdater::RegisterProfilePrefs(registry);
649#endif
650
Bernhard Bauer19190732017-09-28 09:03:33651#if BUILDFLAG(ENABLE_PLUGINS)
Nicholas Verned391eae2017-11-13 02:41:38652 PluginInfoHostImpl::RegisterUserPrefs(registry);
Bernhard Bauer19190732017-09-28 09:03:33653#endif
654
Brett Wilson65f951c2016-11-03 22:06:12655#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
Nicolas Ouellet-Payeur4dbdf1e52018-08-06 21:51:02656 printing::PolicySettings::RegisterProfilePrefs(registry);
bauerb4da36132014-12-26 19:53:13657 printing::StickySettings::RegisterProfilePrefs(registry);
658#endif
659
thestig4888f292016-10-07 23:57:55660#if BUILDFLAG(ENABLE_SERVICE_DISCOVERY)
[email protected]2188c8d2014-03-21 00:58:56661 LocalDiscoveryUI::RegisterProfilePrefs(registry);
662#endif
663
brettw9e85ef42016-11-01 21:01:24664#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
bauerb7f3b8542015-06-29 19:56:19665 ChildAccountService::RegisterProfilePrefs(registry);
666 SupervisedUserService::RegisterProfilePrefs(registry);
bauerb4da36132014-12-26 19:53:13667 SupervisedUserWhitelistService::RegisterProfilePrefs(registry);
668#endif
669
zpengdb4a58e2017-01-10 17:40:32670#if defined(OS_ANDROID)
mastiz78efbde2016-12-14 17:07:07671 ntp_tiles::PopularSitesImpl::RegisterProfilePrefs(registry);
mvanouwerkerkc1751e02017-01-06 12:16:43672 variations::VariationsService::RegisterProfilePrefs(registry);
benwells0b3748a2017-03-21 06:28:40673 GeolocationPermissionContextAndroid::RegisterProfilePrefs(registry);
[email protected]084f82b2013-11-01 00:09:59674 PartnerBookmarksShim::RegisterProfilePrefs(registry);
mvanouwerkerkc1751e02017-01-06 12:16:43675 RecentTabsPagePrefs::RegisterProfilePrefs(registry);
Patrick Noland87d9f842019-01-16 03:52:02676 usage_stats::UsageStatsBridge::RegisterProfilePrefs(registry);
Sky Malicedd28f282018-06-14 03:22:24677#if BUILDFLAG(ENABLE_FEED_IN_CHROME)
678 feed::FeedSchedulerHost::RegisterProfilePrefs(registry);
Sky Malice8ff643002018-07-31 21:06:07679 feed::RefreshThrottler::RegisterProfilePrefs(registry);
Sky Malice14f348282018-06-14 22:50:14680 feed::UserClassifier::RegisterProfilePrefs(registry);
Sky Malicedd28f282018-06-14 03:22:24681#endif // BUILDFLAG(ENABLE_FEED_IN_CHROME)
[email protected]ceafc462013-11-04 12:26:03682#else
683 AppShortcutManager::RegisterProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:44684 DeviceIDFetcher::RegisterProfilePrefs(registry);
685 DevToolsWindow::RegisterProfilePrefs(registry);
brettwd1bc9da2016-10-14 19:04:24686#if BUILDFLAG(ENABLE_APP_LIST)
khmeleca50572016-11-03 16:54:45687 app_list::AppListSyncableService::RegisterProfilePrefs(registry);
Sky Malicedd28f282018-06-14 03:22:24688#endif // BUILDFLAG(ENABLE_APP_LIST)
[email protected]37ca3fe02013-07-05 15:32:44689 extensions::CommandService::RegisterProfilePrefs(registry);
[email protected]d29f4e312013-08-07 05:28:31690 extensions::TabsCaptureVisibleTabFunction::RegisterProfilePrefs(registry);
[email protected]54b25a82014-04-30 21:47:05691 NewTabUI::RegisterProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:44692 PepperFlashSettingsManager::RegisterProfilePrefs(registry);
693 PinnedTabCodec::RegisterProfilePrefs(registry);
[email protected]3d27d272013-07-31 03:15:16694 signin::RegisterProfilePrefs(registry);
[email protected]cc36c2c2012-03-01 00:57:34695#endif
696
vitaliii2600e8e02016-12-09 17:23:36697#if defined(OS_ANDROID)
xhwang116acb92017-04-03 18:27:20698 cdm::MediaDrmStorageImpl::RegisterProfilePrefs(registry);
Becky Zhou5ea1b5b2018-04-13 01:48:10699 contextual_suggestions::ContextualSuggestionsPrefs::RegisterProfilePrefs(
700 registry);
sfierab0f63392017-01-05 14:24:47701 ContentSuggestionsNotifierService::RegisterProfilePrefs(registry);
vitaliii2600e8e02016-12-09 17:23:36702 DownloadSuggestionsProvider::RegisterProfilePrefs(registry);
Dmitry Titov5f6cfb42018-10-05 18:52:14703 explore_sites::HistoryStatisticsReporter::RegisterPrefs(registry);
Vitalii Iarkoe4f716e2017-08-04 06:58:55704 ntp_snippets::BreakingNewsGCMAppHandler::RegisterProfilePrefs(registry);
vitaliii9f8aa5f82016-12-22 09:26:35705 ntp_snippets::ClickBasedCategoryRanker::RegisterProfilePrefs(registry);
Vitalii Iarkoe4f716e2017-08-04 06:58:55706 ntp_snippets::SubscriptionManagerImpl::RegisterProfilePrefs(registry);
Kenichi Ishibashi35ac7132017-12-08 03:44:30707 OomInterventionDecider::RegisterProfilePrefs(registry);
vitaliii2600e8e02016-12-09 17:23:36708#endif // defined(OS_ANDROID)
709
mlliuee3a405c2016-10-28 22:34:52710#if !defined(OS_ANDROID)
johnme627dc8c72016-08-19 21:49:39711 browser_sync::ForeignSessionHandler::RegisterProfilePrefs(registry);
gabdac09c03b2017-03-22 20:00:11712 first_run::RegisterProfilePrefs(registry);
Kyle Milka64e205c2018-06-07 17:27:31713 InstantService::RegisterProfilePrefs(registry);
Kyle Milka779c9ce2019-01-18 16:39:22714 SearchSuggestService::RegisterProfilePrefs(registry);
johnme627dc8c72016-08-19 21:49:39715 gcm::GCMChannelStatusSyncer::RegisterProfilePrefs(registry);
716 gcm::RegisterProfilePrefs(registry);
Derek Cheng23a01402018-07-24 13:38:14717 media_router::RegisterProfilePrefs(registry);
kristiparkc0199772018-07-18 05:25:42718 ntp_tiles::CustomLinksManagerImpl::RegisterProfilePrefs(registry);
tmartino6254f472016-11-21 01:22:56719 StartupBrowserCreator::RegisterProfilePrefs(registry);
johnme627dc8c72016-08-19 21:49:39720#endif
721
722#if !defined(OS_ANDROID) && !defined(OS_CHROMEOS)
723 default_apps::RegisterProfilePrefs(registry);
mvanouwerkerk9f0f38a2016-06-08 14:11:44724#endif
725
[email protected]9acc48602009-11-30 21:18:51726#if defined(OS_CHROMEOS)
Hidehiko Abe33e9adf2017-09-13 06:12:23727 arc::prefs::RegisterProfilePrefs(registry);
David Valleauce0aedfa2018-03-30 18:46:16728 chromeos::CupsPrintersManager::RegisterProfilePrefs(registry);
[email protected]980d5f9e2013-12-17 17:47:08729 chromeos::first_run::RegisterProfilePrefs(registry);
[email protected]7de7aee2014-06-02 12:37:52730 chromeos::file_system_provider::RegisterProfilePrefs(registry);
pneubeckdabdfe912015-06-18 13:42:13731 chromeos::KeyPermissions::RegisterProfilePrefs(registry);
Jordy Greenblatt2265de702018-07-26 19:05:26732 chromeos::multidevice_setup::MultiDeviceSetupService::RegisterProfilePrefs(
733 registry);
[email protected]d6001872013-09-24 18:31:26734 chromeos::MultiProfileUserController::RegisterProfilePrefs(registry);
xiaoyinhb849e9c12017-04-21 21:40:33735 chromeos::quick_unlock::FingerprintStorage::RegisterProfilePrefs(registry);
Jacob Dufaultf7918c92018-04-04 20:56:28736 chromeos::quick_unlock::PinStoragePrefs::RegisterProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:44737 chromeos::Preferences::RegisterProfilePrefs(registry);
Justin Carlson45339ae2017-07-17 23:59:10738 chromeos::SyncedPrintersManager::RegisterProfilePrefs(registry);
sammiequon85feb872017-02-20 23:19:51739 chromeos::quick_unlock::RegisterProfilePrefs(registry);
[email protected]3b9deb402014-01-30 17:50:16740 chromeos::SAMLOfflineSigninLimiter::RegisterProfilePrefs(registry);
Sarah Hua0b666a2018-05-22 16:45:38741 chromeos::ScreenTimeController::RegisterProfilePrefs(registry);
[email protected]d0b28892014-03-05 18:56:31742 chromeos::ServicesCustomizationDocument::RegisterProfilePrefs(registry);
[email protected]de25c91f2013-09-06 06:51:58743 chromeos::UserImageSyncObserver::RegisterProfilePrefs(registry);
Renee Wrightc41d5432018-04-26 05:27:37744 crostini::prefs::RegisterProfilePrefs(registry);
dkrahn3f7776e2016-02-26 08:12:29745 extensions::EPKPChallengeUserKey::RegisterProfilePrefs(registry);
sdefresne8593e6432015-12-01 12:38:08746 flags_ui::PrefServiceFlagsStorage::RegisterProfilePrefs(registry);
Toni Barzic14329d02017-07-17 21:59:12747 lock_screen_apps::StateController::RegisterProfilePrefs(registry);
Olya Kalitovac869f962018-12-04 12:01:23748 plugin_vm::prefs::RegisterProfilePrefs(registry);
Bartosz Fabianowski79028ae2018-02-23 17:25:03749 policy::AppInstallEventLogger::RegisterProfilePrefs(registry);
Bartosz Fabianowskid4d93a72018-05-17 18:49:48750 policy::AppInstallEventLogManagerWrapper::RegisterProfilePrefs(registry);
pmarko0a957522017-02-21 19:00:57751 policy::DeviceStatusCollector::RegisterProfilePrefs(registry);
stevenjbf22f82e2016-10-26 21:47:38752 ::onc::RegisterProfilePrefs(registry);
[email protected]9acc48602009-11-30 21:18:51753#endif
[email protected]cc36c2c2012-03-01 00:57:34754
brettwd1bc9da2016-10-14 19:04:24755#if defined(OS_CHROMEOS) && BUILDFLAG(ENABLE_APP_LIST)
khmeld7c5a322015-12-04 16:24:47756 ArcAppListPrefs::RegisterProfilePrefs(registry);
Dominick Ngbe35fdc2018-12-03 09:42:22757 chromeos::ApkWebAppService::RegisterProfilePrefs(registry);
khmeld7c5a322015-12-04 16:24:47758#endif
759
gab3ca4a492017-03-02 00:19:41760#if BUILDFLAG(ENABLE_RLZ)
761 ChromeRLZTrackerDelegate::RegisterProfilePrefs(registry);
762#endif
763
[email protected]a4422802012-05-03 09:19:15764#if defined(OS_WIN)
mad2b3b6552014-09-25 00:44:49765 component_updater::RegisterProfilePrefsForSwReporter(registry);
[email protected]37ca3fe02013-07-05 15:32:44766 NetworkProfileBubble::RegisterProfilePrefs(registry);
alito856526d2017-03-03 09:16:17767 safe_browsing::SettingsResetPromptPrefsManager::RegisterProfilePrefs(
768 registry);
ftirelo46b34222017-06-19 10:36:57769 safe_browsing::PostCleanupSettingsResetter::RegisterProfilePrefs(registry);
[email protected]a4422802012-05-03 09:19:15770#endif
[email protected]eeec6ca2013-02-21 15:10:43771
Nicolas Ouellet-Payeurbdcab0092018-10-22 14:50:33772#if defined(OS_WIN) || defined(OS_MACOSX) || \
773 (defined(OS_LINUX) && !defined(OS_CHROMEOS))
Nicolas4b82a652019-01-04 17:42:38774 browser_switcher::BrowserSwitcherPrefs::RegisterProfilePrefs(registry);
Nicolas Ouellet-Payeur9a4a94d2018-09-17 15:26:11775#endif
776
[email protected]ceafc462013-11-04 12:26:03777#if defined(TOOLKIT_VIEWS)
Katie D93c943b62019-01-08 04:04:19778 accessibility_prefs::RegisterInvertBubbleUserPrefs(registry);
[email protected]af97be4c62014-02-13 14:43:34779 RegisterBrowserViewProfilePrefs(registry);
[email protected]ceafc462013-11-04 12:26:03780#endif
781
James Cookf9d34d22017-10-04 16:39:35782#if defined(OS_CHROMEOS)
msw19b1335d92017-05-05 23:21:13783 RegisterChromeLauncherUserPrefs(registry);
[email protected]e4bf6b7bb52013-07-15 16:49:40784#endif
dbeam72db0762015-05-20 20:37:12785
thestig0c55ee32017-06-20 22:17:51786#if !defined(OS_ANDROID)
dbeam7db5f5392016-09-21 17:33:24787 MdHistoryUI::RegisterProfilePrefs(registry);
dbeam0b1f71df2017-03-07 18:36:36788 settings::MdSettingsUI::RegisterProfilePrefs(registry);
dbeam7db5f5392016-09-21 17:33:24789#endif
790
jianliac940cb2017-06-07 05:13:08791#if BUILDFLAG(ENABLE_OFFLINE_PAGES)
Dmitry Titov4d2bde02017-06-30 05:29:52792 offline_pages::OfflineMetricsCollectorImpl::RegisterPrefs(registry);
Dan Harrington57be4a02018-09-14 17:50:19793 offline_pages::prefetch_prefs::RegisterPrefs(registry);
jianliac940cb2017-06-07 05:13:08794#endif
Anita Woodruffda0cdb642017-08-22 18:36:50795
796#if defined(OS_ANDROID)
797 NotificationChannelsProviderAndroid::RegisterProfilePrefs(registry);
798#endif
Marc Treib409320b2017-11-30 14:30:42799
Becca Hughes7d2bbb82018-08-07 22:56:59800#if !defined(OS_ANDROID)
801 UnifiedAutoplayConfig::RegisterProfilePrefs(registry);
802#endif
803
Nicolas Ouellet-Payeur7f9a63ef2018-08-28 17:26:06804#if !defined(OS_CHROMEOS) && BUILDFLAG(ENABLE_EXTENSIONS)
805 extensions::enterprise_reporting::RegisterProfilePrefs(registry);
806#endif
807
James Cook0ba192bf2017-12-01 20:53:11808 RegisterProfilePrefsForMigration(registry);
initial.commit09911bf2008-07-26 23:55:29809}
license.botbf09a502008-08-24 00:55:55810
[email protected]37ca3fe02013-07-05 15:32:44811void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
812 RegisterProfilePrefs(registry);
[email protected]2424cc52013-07-17 13:44:38813
mlliuee3a405c2016-10-28 22:34:52814#if defined(OS_ANDROID)
815 ::android::RegisterUserProfilePrefs(registry);
816#endif
[email protected]37ca3fe02013-07-05 15:32:44817}
818
[email protected]8eefe842014-01-17 06:42:40819void RegisterScreenshotPrefs(PrefRegistrySimple* registry) {
820 registry->RegisterBooleanPref(prefs::kDisableScreenshots, false);
821}
822
[email protected]37ca3fe02013-07-05 15:32:44823#if defined(OS_CHROMEOS)
824void RegisterLoginProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
825 RegisterProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:44826}
827#endif
828
rkaplowf216caf2015-03-02 22:37:45829// This method should be periodically pruned of year+ old migrations.
830void MigrateObsoleteBrowserPrefs(Profile* profile, PrefService* local_state) {
Alexei Svitkine7f42bf62018-12-05 19:33:01831 // Added 12/2018.
832 local_state->ClearPref(metrics::prefs::kStabilityExecutionPhase);
833
Peter Wen45025ea2018-09-17 15:16:27834#if defined(OS_ANDROID)
835 // Added 9/2018
836 local_state->ClearPref(
837 metrics::prefs::kStabilityCrashCountWithoutGmsCoreUpdateObsolete);
838#else
Bret Sepulvedae795b2b2018-01-25 20:00:05839 // Added 1/2018.
840 local_state->ClearPref(kShowFirstRunBubbleOption);
Peter Wen45025ea2018-09-17 15:16:27841#endif // defined(OS_ANDROID)
Patrick Monettef8fd8b22018-05-10 20:58:04842
843#if defined(OS_WIN) && defined(GOOGLE_CHROME_BUILD)
844 // Added 5/2018.
845 local_state->ClearPref(prefs::kProblematicPrograms);
846#endif
Patrick Monette341426e2018-06-15 21:22:45847
848#if defined(OS_WIN)
849 // Added 6/2018.
850 local_state->ClearPref(kResetHasSeenWin10PromoPage);
Ramin Halavati9057c112018-09-17 09:34:16851
852 // Added 9/2018
853 local_state->ClearPref(kLastWelcomedOSVersion);
Patrick Monette341426e2018-06-15 21:22:45854#endif
Tony de Lunae29d4592018-12-10 19:39:53855#if defined(OS_CHROMEOS)
856 // Added 12/2018
857 local_state->ClearPref(prefs::kCarrierDealPromoShown);
858#endif
rkaplowf216caf2015-03-02 22:37:45859}
860
861// This method should be periodically pruned of year+ old migrations.
862void MigrateObsoleteProfilePrefs(Profile* profile) {
863 PrefService* profile_prefs = profile->GetPrefs();
864
Conley Owens31132ff92018-04-20 20:15:57865#if defined(OS_ANDROID)
866 // Added 4/2018
867 profile_prefs->ClearPref(kDismissedPhysicalWebPageSuggestions);
Yafei Duan03bb7d12018-05-05 01:13:27868
869 // Added 5/2018
870 profile_prefs->ClearPref(kDismissedRecentOfflineTabSuggestions);
Moe Ahmadi6c1b8f512018-09-07 17:32:44871#endif // defined(OS_ANDROID)
Moe Ahmadic3061bd2018-08-30 16:25:32872
873 // Added 8/2018.
874 autofill::prefs::MigrateDeprecatedAutofillPrefs(profile_prefs);
Alexandr Ilin273e20b2018-09-05 19:47:57875
876 // Added 8/2018
877 profile_prefs->ClearPref(kDnsPrefetchingStartupList);
878 profile_prefs->ClearPref(kDnsPrefetchingHostReferralList);
Ramin Halavati9057c112018-09-17 09:34:16879
880 // Added 9/2018
881 profile_prefs->ClearPref(kGeolocationAccessToken);
882 profile_prefs->ClearPref(kGoogleServicesPasswordHash);
883 profile_prefs->ClearPref(kModuleConflictBubbleShown);
884 profile_prefs->ClearPref(kOptionsWindowLastTabIndex);
885 profile_prefs->ClearPref(kTrustedDownloadSources);
Marc Treiba58d9962018-09-27 14:40:51886 profile_prefs->ClearPref(kSupervisedUserCreationAllowed);
Jaeyong Bae6e7d2262018-10-12 14:12:40887
888 // Added 10/2018
889 profile_prefs->ClearPref(kReverseAutologinEnabled);
Tarun Bansal5f27ab972018-11-07 01:11:30890
891 // Added 11/2018.
892 profile_prefs->ClearPref(kNetworkQualities);
Marc Treib81f6d602018-11-07 10:10:34893 profile_prefs->ClearPref(kForceSessionSync);
Hector Carmona523cf502018-11-19 19:51:40894 profile_prefs->ClearPref(kOnboardDuringNUX);
Hector Carmona2ced80ec2018-11-29 21:35:01895 profile_prefs->ClearPref(kNuxOnboardGroup);
Matt Menke7f7caba2018-11-20 22:01:55896 profile_prefs->ClearPref(kHttpServerProperties);
Joshua Pawlickibc79f3902019-01-03 18:00:23897
898#if defined(OS_CHROMEOS)
899 // Added 12/2018.
900 profile_prefs->ClearPref(prefs::kDataSaverPromptsShown);
901#endif
Joshua Pawlicki009fb5f12019-01-18 21:44:47902
903 // Added 1/2019.
904 profile_prefs->ClearPref(kLastUpdateCheck);
905 profile_prefs->ClearPref(kNextUpdateCheck);
Maksim Moskvitin0e57c1cf2019-01-25 17:36:31906 syncer::MigrateSessionsToProxyTabsPrefs(profile_prefs);
[email protected]102253f2012-12-14 17:00:58907}