blob: 0035f4b03bc16242c121a18b39f53957c0b815f3 [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
hbosfaf3baf2016-07-01 13:43:169#include "base/files/file_util.h"
rkaplow058da3132015-02-19 18:18:3810#include "base/metrics/histogram_macros.h"
primiano6221e572015-01-28 12:14:3411#include "base/trace_event/trace_event.h"
avib896c712015-12-26 02:10:4312#include "build/build_config.h"
[email protected]1a47d7e2010-10-15 00:37:2413#include "chrome/browser/about_flags.h"
[email protected]7a25d872012-05-21 19:14:1314#include "chrome/browser/accessibility/invert_bubble_prefs.h"
[email protected]b1de2c72013-02-06 02:45:4715#include "chrome/browser/browser_process_impl.h"
[email protected]c5cf01032009-02-16 07:00:3716#include "chrome/browser/browser_shutdown.h"
harknessbea56c22016-08-16 07:23:0017#include "chrome/browser/budget_service/budget_manager.h"
[email protected]bca18382012-06-25 19:15:2318#include "chrome/browser/chrome_content_browser_client.h"
sorinebcfc8dd2016-08-12 21:57:1819#include "chrome/browser/component_updater/component_updater_prefs.h"
[email protected]a6d36cc2011-02-23 00:39:4820#include "chrome/browser/custom_handlers/protocol_handler_registry.h"
[email protected]70019152012-12-19 11:44:1921#include "chrome/browser/devtools/devtools_window.h"
[email protected]e5dc4222010-08-30 22:16:3222#include "chrome/browser/download/download_prefs.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]4e48d772010-02-18 12:11:1425#include "chrome/browser/geolocation/geolocation_prefs.h"
[email protected]e6933d2a2013-03-12 22:32:2126#include "chrome/browser/gpu/gpu_mode_manager.h"
qinmin9899e492016-08-05 19:03:2627#include "chrome/browser/gpu/gpu_profile_cache.h"
[email protected]5e9d1f72011-01-19 14:15:2328#include "chrome/browser/intranet_redirect_detector.h"
[email protected]3c319eb2013-02-21 14:44:4529#include "chrome/browser/io_thread.h"
[email protected]cd80cce2013-12-02 15:19:1930#include "chrome/browser/media/media_device_id_salt.h"
mcasasa2023ab2016-09-08 01:06:3631#include "chrome/browser/media/webrtc/media_capture_devices_dispatcher.h"
32#include "chrome/browser/media/webrtc/media_stream_devices_controller.h"
[email protected]4a55a712014-06-08 16:50:3433#include "chrome/browser/metrics/chrome_metrics_service_client.h"
[email protected]ad66db12014-07-10 12:43:4734#include "chrome/browser/net/http_server_properties_manager_factory.h"
[email protected]ba85a602014-06-28 20:37:1235#include "chrome/browser/net/prediction_options.h"
[email protected]67372ecf2011-09-10 01:30:4636#include "chrome/browser/net/predictor.h"
peter70152812014-09-24 19:56:2537#include "chrome/browser/notifications/extension_welcome_notification.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"
[email protected]cb166d4e3f2012-11-01 06:36:0840#include "chrome/browser/plugins/plugin_finder.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"
[email protected]a7b8e43d2013-03-18 18:52:4352#include "chrome/browser/search/search.h"
[email protected]8a120892012-06-08 01:18:5053#include "chrome/browser/signin/signin_manager_factory.h"
avi24d693f2016-08-06 18:03:5254#include "chrome/browser/task_manager/task_manager_interface.h"
oysteine386fc9e2015-06-07 18:45:4155#include "chrome/browser/tracing/chrome_tracing_delegate.h"
calamity5ec7ec72014-10-03 03:57:4656#include "chrome/browser/ui/app_list/app_list_prefs.h"
[email protected]f0ee7912013-02-27 06:02:5557#include "chrome/browser/ui/app_list/app_list_service.h"
[email protected]2cd4fde2012-06-26 03:10:2658#include "chrome/browser/ui/browser_ui_prefs.h"
[email protected]26bd3893c2014-04-15 18:59:5859#include "chrome/browser/ui/navigation_correction_tab_observer.h"
[email protected]297fb7c22012-06-26 12:37:4960#include "chrome/browser/ui/network_profile_bubble.h"
[email protected]9ce7cb42011-12-07 18:53:0761#include "chrome/browser/ui/prefs/prefs_tab_helper.h"
[email protected]62f77772011-02-23 19:45:4262#include "chrome/browser/ui/search_engines/keyword_editor_controller.h"
[email protected]b56e2e32012-05-11 21:18:0463#include "chrome/browser/ui/tabs/pinned_tab_codec.h"
[email protected]265a1492011-02-27 05:58:0764#include "chrome/browser/ui/webui/flags_ui.h"
[email protected]213723212012-09-21 22:28:4665#include "chrome/browser/ui/webui/instant_ui.h"
[email protected]7c5c6f3a2011-04-28 19:56:4966#include "chrome/browser/ui/webui/ntp/new_tab_ui.h"
dpapadd15fb692016-01-06 18:27:1767#include "chrome/browser/ui/webui/plugins/plugins_ui.h"
[email protected]0209b442012-07-18 00:38:0568#include "chrome/browser/ui/webui/print_preview/sticky_settings.h"
sievers2f1e8112015-12-04 18:43:5669#include "chrome/common/features.h"
[email protected]f87919d72011-02-02 18:46:1670#include "chrome/common/pref_names.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"
sdefresne8593e6432015-12-01 12:38:0876#include "components/flags_ui/pref_service_flags_storage.h"
jianli2dc910b02014-09-19 02:42:4677#include "components/gcm_driver/gcm_channel_status_syncer.h"
grta872c102016-04-12 17:20:5778#include "components/metrics/metrics_service.h"
[email protected]d0ab865b2014-06-04 19:41:3479#include "components/network_time/network_time_tracker.h"
pkedc5e1eb2016-08-19 18:34:5980#include "components/ntp_snippets/bookmarks/bookmark_suggestions_provider.h"
treib720f3a212016-02-29 18:24:2981#include "components/ntp_snippets/ntp_snippets_service.h"
jkrcal505ea3a2016-07-22 10:19:2282#include "components/ntp_snippets/request_throttler.h"
jkrcale13510e2016-09-08 17:56:2083#include "components/ntp_snippets/user_classifier.h"
blundell2102f7c2015-07-09 10:00:5384#include "components/omnibox/browser/zero_suggest_provider.h"
melandory444f85f2015-09-07 13:32:4285#include "components/password_manager/core/browser/password_bubble_experiment.h"
[email protected]1f730bd2014-02-28 15:11:3286#include "components/password_manager/core/browser/password_manager.h"
brettw03e61962016-03-15 06:27:0487#include "components/policy/core/browser/browser_policy_connector.h"
88#include "components/policy/core/browser/url_blacklist_manager.h"
89#include "components/policy/core/common/policy_statistics_collector.h"
[email protected]f0c8c4992014-05-15 17:37:2690#include "components/pref_registry/pref_registry_syncable.h"
brettwb1fc1b82016-02-02 00:19:0891#include "components/prefs/pref_registry_simple.h"
92#include "components/prefs/pref_service.h"
abhishek.a2171c612852015-08-31 10:48:1993#include "components/proxy_config/pref_proxy_config_tracker_impl.h"
[email protected]2a172e42014-02-21 04:06:1094#include "components/rappor/rappor_service.h"
[email protected]0915b352014-06-25 19:58:1495#include "components/search_engines/template_url_prepopulate_data.h"
abhishek.a212849cee2015-10-20 11:27:2996#include "components/ssl_config/ssl_config_service_manager.h"
fdoray44cd7812016-01-08 17:03:5997#include "components/startup_metric_utils/browser/startup_metric_utils.h"
engedyc5ef21ad2016-06-17 20:22:2798#include "components/subresource_filter/core/browser/ruleset_service.h"
maxbogue455a57e32016-08-14 00:08:3299#include "components/sync/driver/sync_prefs.h"
sdefresne875d0782015-09-16 12:01:28100#include "components/syncable_prefs/pref_service_syncable.h"
[email protected]81135072014-02-14 14:11:02101#include "components/translate/core/browser/translate_prefs.h"
wafflesd2d9a332016-04-09 01:59:57102#include "components/update_client/update_client.h"
blundell0300cdea2015-09-03 12:47:44103#include "components/variations/service/variations_service.h"
droger259fdd62015-09-02 09:22:05104#include "components/web_resource/promo_resource_service.h"
hbosfaf3baf2016-07-01 13:43:16105#include "content/public/browser/browser_thread.h"
[email protected]f3b1a082011-11-18 00:34:30106#include "content/public/browser/render_process_host.h"
[email protected]ad66db12014-07-10 12:43:47107#include "net/http/http_server_properties_manager.h"
[email protected]a814d8632009-01-31 20:18:52108
thestigf2a0fa92016-09-07 09:37:29109#if defined(ENABLE_APP_LIST)
110#include "chrome/browser/apps/drive/drive_app_mapping.h"
111#endif
112
brettw3224f3c2016-02-25 20:07:45113#if BUILDFLAG(ENABLE_BACKGROUND)
thestige4155842014-10-20 18:58:02114#include "chrome/browser/background/background_mode_manager.h"
115#endif
116
[email protected]17510602014-06-05 11:02:28117#if defined(ENABLE_EXTENSIONS)
je_julie.kim7fbb5a1a2015-02-09 17:26:05118#include "chrome/browser/accessibility/animation_policy_prefs.h"
thestige4155842014-10-20 18:58:02119#include "chrome/browser/apps/shortcut_manager.h"
[email protected]17510602014-06-05 11:02:28120#include "chrome/browser/extensions/activity_log/activity_log.h"
121#include "chrome/browser/extensions/api/commands/command_service.h"
[email protected]17510602014-06-05 11:02:28122#include "chrome/browser/extensions/api/tabs/tabs_api.h"
mfoltz96f329c2016-01-13 18:16:58123#include "chrome/browser/extensions/component_migration_helper.h"
[email protected]d5a74be2014-08-08 01:01:27124#include "chrome/browser/extensions/extension_web_ui.h"
[email protected]17510602014-06-05 11:02:28125#include "chrome/browser/extensions/launch_util.h"
[email protected]deba96a2014-08-03 05:48:54126#include "chrome/browser/signin/easy_unlock_service.h"
avib896c712015-12-26 02:10:43127#include "chrome/browser/ui/toolbar/toolbar_actions_bar.h"
thestig428c2ca2014-09-07 06:17:51128#include "chrome/browser/ui/webui/extensions/extension_settings_handler.h"
afakhry2bd481832016-06-16 16:17:24129#include "extensions/browser/api/runtime/runtime_api.h"
[email protected]d5a74be2014-08-08 01:01:27130#include "extensions/browser/extension_prefs.h"
ckehoef2e12d02015-01-09 23:32:59131#endif // defined(ENABLE_EXTENSIONS)
[email protected]17510602014-06-05 11:02:28132
bauerb4da36132014-12-26 19:53:13133#if defined(ENABLE_PLUGIN_INSTALLATION)
134#include "chrome/browser/plugins/plugins_resource_service.h"
135#endif
136
treib87bb89cbb2014-12-01 16:01:47137#if defined(ENABLE_SUPERVISED_USERS)
kotenkov8695455122015-04-16 16:40:07138#include "chrome/browser/supervised_user/child_accounts/child_account_service.h"
treibb473df22015-01-08 18:08:26139#include "chrome/browser/supervised_user/legacy/supervised_user_shared_settings_service.h"
140#include "chrome/browser/supervised_user/legacy/supervised_user_sync_service.h"
[email protected]cce15bb2014-06-17 13:43:51141#include "chrome/browser/supervised_user/supervised_user_service.h"
bauerb4da36132014-12-26 19:53:13142#include "chrome/browser/supervised_user/supervised_user_whitelist_service.h"
[email protected]a0795592013-05-25 14:19:02143#endif
144
[email protected]2188c8d2014-03-21 00:58:56145#if defined(ENABLE_SERVICE_DISCOVERY)
[email protected]9544e562013-09-21 04:20:55146#include "chrome/browser/ui/webui/local_discovery/local_discovery_ui.h"
147#endif
148
sievers2f1e8112015-12-04 18:43:56149#if BUILDFLAG(ANDROID_JAVA_UI)
[email protected]53a946f62013-11-07 19:09:13150#include "chrome/browser/android/bookmarks/partner_bookmarks_shim.h"
markusheintzea5c4992016-03-18 17:27:13151#include "chrome/browser/android/ntp/new_tab_page_prefs.h"
sfiera3ff01c0d2016-06-13 15:33:38152#include "components/ntp_tiles/most_visited_sites.h"
153#include "components/ntp_tiles/popular_sites.h"
[email protected]ceafc462013-11-04 12:26:03154#else
grtf14398c2015-07-14 15:11:44155#include "chrome/browser/ui/startup/startup_browser_creator.h"
thestigd75ce5532015-10-05 22:08:34156#include "chrome/browser/upgrade_detector.h"
[email protected]fc7611b32009-07-31 21:52:44157#endif
158
thestigf2a0fa92016-09-07 09:37:29159#if defined(OS_ANDROID)
160#include "chrome/browser/notifications/notification_platform_bridge_android.h"
161#include "components/ntp_snippets/offline_pages/offline_page_suggestions_provider.h"
162#else
johnme627dc8c72016-08-19 21:49:39163#include "chrome/browser/services/gcm/gcm_product_util.h"
thestigc91176f42014-10-28 20:16:35164#include "chrome/browser/signin/signin_promo.h"
dbeam72db0762015-05-20 20:37:12165#include "chrome/browser/ui/webui/foreign_session_handler.h"
thestigc91176f42014-10-28 20:16:35166#endif
167
[email protected]9acc48602009-11-30 21:18:51168#if defined(OS_CHROMEOS)
[email protected]1637c192013-02-16 04:00:13169#include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h"
khmel1dc479132016-02-01 21:09:55170#include "chrome/browser/chromeos/arc/arc_auth_service.h"
Satoru Takabayashi876d4e62014-12-03 04:52:24171#include "chrome/browser/chromeos/customization/customization_document.h"
[email protected]658124652012-10-11 00:49:33172#include "chrome/browser/chromeos/display/display_preferences.h"
[email protected]a5058a22013-08-29 20:49:51173#include "chrome/browser/chromeos/extensions/echo_private_api.h"
mtomaszbd1170f2014-10-21 05:34:18174#include "chrome/browser/chromeos/file_system_provider/registry.h"
[email protected]980d5f9e2013-12-17 17:47:08175#include "chrome/browser/chromeos/first_run/first_run.h"
jdufault489f4302016-05-20 20:34:28176#include "chrome/browser/chromeos/login/quick_unlock/pin_storage.h"
[email protected]3b9deb402014-01-30 17:50:16177#include "chrome/browser/chromeos/login/saml/saml_offline_signin_limiter.h"
[email protected]295ca1a72014-07-01 16:14:31178#include "chrome/browser/chromeos/login/session/user_session_manager.h"
[email protected]aa8328fb2013-04-19 15:09:06179#include "chrome/browser/chromeos/login/startup_utils.h"
[email protected]83d82d42014-05-16 02:04:42180#include "chrome/browser/chromeos/login/users/avatar/user_image_manager.h"
181#include "chrome/browser/chromeos/login/users/avatar/user_image_sync_observer.h"
[email protected]4d390782014-08-15 09:22:58182#include "chrome/browser/chromeos/login/users/chrome_user_manager_impl.h"
[email protected]83d82d42014-05-16 02:04:42183#include "chrome/browser/chromeos/login/users/multi_profile_user_controller.h"
pkotwiczafd6d922015-01-16 00:32:33184#include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h"
[email protected]e2930d0902013-07-17 05:25:42185#include "chrome/browser/chromeos/net/proxy_config_handler.h"
pneubeckdabdfe912015-06-18 13:42:13186#include "chrome/browser/chromeos/platform_keys/key_permissions.h"
[email protected]b39d25712013-03-14 09:53:40187#include "chrome/browser/chromeos/policy/auto_enrollment_client.h"
[email protected]97275822014-01-21 19:30:36188#include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
[email protected]69a99822013-06-11 00:31:36189#include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h"
[email protected]b39d25712013-03-14 09:53:40190#include "chrome/browser/chromeos/policy/device_status_collector.h"
[email protected]bcb94772013-12-19 14:28:58191#include "chrome/browser/chromeos/policy/policy_cert_service_factory.h"
[email protected]2424cc52013-07-17 13:44:38192#include "chrome/browser/chromeos/power/power_prefs.h"
[email protected]9acc48602009-11-30 21:18:51193#include "chrome/browser/chromeos/preferences.h"
skau65455b5a02016-08-03 20:16:38194#include "chrome/browser/chromeos/printing/printer_pref_manager.h"
[email protected]a28c45a2013-04-18 06:02:18195#include "chrome/browser/chromeos/settings/device_oauth2_token_service.h"
[email protected]0c4d97c2012-09-01 20:47:20196#include "chrome/browser/chromeos/settings/device_settings_cache.h"
[email protected]4801879e2012-04-11 17:53:33197#include "chrome/browser/chromeos/status/data_promo_notification.h"
[email protected]c280dbf2013-03-19 12:17:44198#include "chrome/browser/chromeos/system/automatic_reboot_manager.h"
afakhrye8eac602015-11-10 02:31:22199#include "chrome/browser/chromeos/system/input_device_settings.h"
[email protected]a0e44ccf2013-04-19 01:48:22200#include "chrome/browser/extensions/api/enterprise_platform_keys_private/enterprise_platform_keys_private_api.h"
[email protected]5a145e82014-05-29 22:19:07201#include "chrome/browser/extensions/extension_assets_manager_chromeos.h"
xhwangc84739e2015-03-14 01:02:46202#include "chrome/browser/media/protected_media_identifier_permission_context.h"
[email protected]8304f61a2014-05-24 12:17:33203#include "chrome/browser/metrics/chromeos_metrics_provider.h"
[email protected]219643f2014-07-16 17:54:00204#include "chrome/browser/ui/webui/chromeos/login/demo_mode_detector.h"
zelidrag459b11b12014-11-14 04:05:53205#include "chrome/browser/ui/webui/chromeos/login/enable_debugging_screen_handler.h"
[email protected]8e6742a52014-05-23 14:56:22206#include "chrome/browser/ui/webui/chromeos/login/hid_detection_screen_handler.h"
[email protected]bb9c5d72014-06-14 19:21:21207#include "chrome/browser/ui/webui/chromeos/login/reset_screen_handler.h"
[email protected]daf4b542013-07-23 17:11:27208#include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h"
jamescook9439c7392014-12-18 01:47:25209#include "chromeos/audio/audio_devices_pref_handler_impl.h"
alemate48255f3d2015-01-30 18:11:41210#include "chromeos/timezone/timezone_resolver.h"
knn062cdbb2015-06-26 18:18:42211#include "components/invalidation/impl/invalidator_storage.h"
glevin5dd01a72016-03-23 23:08:12212#include "components/quirks/quirks_manager.h"
[email protected]86c6b9e32011-10-25 17:09:10213#else
214#include "chrome/browser/extensions/default_apps.h"
[email protected]9acc48602009-11-30 21:18:51215#endif
216
skaref32ba96e2015-02-20 20:27:17217#if defined(OS_CHROMEOS) && defined(ENABLE_APP_LIST)
khmeld7c5a322015-12-04 16:24:47218#include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h"
skaref32ba96e2015-02-20 20:27:17219#endif
220
[email protected]ceafc462013-11-04 12:26:03221#if defined(OS_MACOSX)
[email protected]425f7a02014-04-29 01:51:44222#include "chrome/browser/ui/cocoa/apps/quit_with_apps_controller_mac.h"
[email protected]ceafc462013-11-04 12:26:03223#include "chrome/browser/ui/cocoa/confirm_quit.h"
[email protected]2366a3a2012-10-02 20:41:14224#endif
225
[email protected]bdb8a1e2013-10-03 08:14:00226#if defined(OS_WIN)
227#include "chrome/browser/apps/app_launch_for_metro_restart_win.h"
[email protected]c5d4b1842014-06-20 21:19:50228#include "chrome/browser/component_updater/sw_reporter_installer_win.h"
[email protected]bdb8a1e2013-10-03 08:14:00229#endif
230
thestigf2a0fa92016-09-07 09:37:29231#if !defined(OS_ANDROID) && !defined(OS_CHROMEOS)
232#include "chrome/browser/ui/startup/default_browser_prompt.h"
233#endif
234
[email protected]ceafc462013-11-04 12:26:03235#if defined(TOOLKIT_VIEWS)
236#include "chrome/browser/ui/browser_view_prefs.h"
[email protected]ceafc462013-11-04 12:26:03237#endif
238
[email protected]ceafc462013-11-04 12:26:03239#if defined(USE_ASH)
240#include "chrome/browser/ui/ash/chrome_launcher_prefs.h"
241#endif
242
[email protected]572f40c9b2012-07-06 20:35:33243namespace {
244
gabf2901f62015-11-12 10:36:49245#if defined(OS_WIN)
246// Deprecated 11/2015 (M48). TODO(gab): delete in M52+.
247const char kShownAutoLaunchInfobarDeprecated[] =
248 "browser.shown_autolaunch_infobar";
249#endif // defined(OS_WIN)
[email protected]126a87642013-08-07 16:44:45250
sdefresne39dc3a1f2015-12-03 15:06:17251// The SessionStartupPref used this pref to store the list of URLs to restore
252// on startup, and then renamed it to "sessions.startup_urls" in M31. Migration
253// code was added and the timestamp of when the migration happened was tracked
254// by "session.startup_urls_migration_time". Both are obsolete now (12/2015) and
255// should be removed once a few releases have happened.
256const char kURLsToRestoreOnStartupOld[] = "session.urls_to_restore_on_startup";
257const char kRestoreStartupURLsMigrationTime[] =
258 "session.startup_urls_migration_time";
259
sdefresne245bbd42015-12-09 20:20:28260// Deprecated 12/2015.
261const char kRestoreOnStartupMigrated[] = "session.restore_on_startup_migrated";
262
tdresserd8208c42016-01-13 14:25:55263#if defined(USE_AURA)
264// Deprecated 1/2016.
265const char kMaxSeparationForGestureTouchesInPixels[] =
266 "gesture.max_separation_for_gesture_touches_in_pixels";
267const char kSemiLongPressTimeInMs[] = "gesture.semi_long_press_time_in_ms";
268const char kTabScrubActivationDelayInMs[] =
269 "gesture.tab_scrub_activation_delay_in_ms";
270const char kFlingMaxCancelToDownTimeInMs[] =
271 "gesture.fling_max_cancel_to_down_time_in_ms";
272const char kFlingMaxTapGapTimeInMs[] = "gesture.fling_max_tap_gap_time_in_ms";
273const char kOverscrollHorizontalThresholdComplete[] =
274 "overscroll.horizontal_threshold_complete";
275const char kOverscrollVerticalThresholdComplete[] =
276 "overscroll.vertical_threshold_complete";
277const char kOverscrollMinimumThresholdStart[] =
278 "overscroll.minimum_threshold_start";
279const char kOverscrollMinimumThresholdStartTouchpad[] =
280 "overscroll.minimum_threshold_start_touchpad";
281const char kOverscrollVerticalThresholdStart[] =
282 "overscroll.vertical_threshold_start";
283const char kOverscrollHorizontalResistThreshold[] =
284 "overscroll.horizontal_resist_threshold";
285const char kOverscrollVerticalResistThreshold[] =
286 "overscroll.vertical_resist_threshold";
287#endif // defined(USE_AURA)
288
rdevlin.cronin76ea1092016-03-15 19:20:06289#if BUILDFLAG(ENABLE_GOOGLE_NOW)
290// Deprecated 3/2016
291const char kGoogleGeolocationAccessEnabled[] =
292 "googlegeolocationaccess.enabled";
293#endif
294
grta872c102016-04-12 17:20:57295// Deprecated 4/2016.
296const char kCheckDefaultBrowser[] = "browser.check_default_browser";
297
fdorayc2315a22016-05-24 19:18:14298// Deprecated 5/2016.
299const char kDesktopSearchRedirectionInfobarShownPref[] =
300 "desktop_search_redirection_infobar_shown";
301
bnca376ed52016-07-23 00:20:32302// Deprecated 7/2016.
303const char kNetworkPredictionEnabled[] = "dns_prefetching.enabled";
304const char kDisableSpdy[] = "spdy.disabled";
305
thestigf2a0fa92016-09-07 09:37:29306// Deprecated 8/2016.
307const char kRecentlySelectedEncoding[] = "profile.recently_selected_encodings";
308const char kStaticEncodings[] = "intl.static_encodings";
309
310// Deprecated 9/2016.
311const char kWebKitUsesUniversalDetector[] =
312 "webkit.webprefs.uses_universal_detector";
carlosk5f1c5172016-09-08 18:59:31313const char kWebKitAllowDisplayingInsecureContent[] =
314 "webkit.webprefs.allow_displaying_insecure_content";
thestigf2a0fa92016-09-07 09:37:29315
316void DeleteWebRTCIdentityStoreDBOnFileThread(
317 const base::FilePath& profile_path) {
hbosfaf3baf2016-07-01 13:43:16318 base::DeleteFile(profile_path.Append(
319 FILE_PATH_LITERAL("WebRTCIdentityStore")), false);
320 base::DeleteFile(profile_path.Append(
321 FILE_PATH_LITERAL("WebRTCIdentityStore-journal")), false);
322}
323
thestigf2a0fa92016-09-07 09:37:29324void DeleteWebRTCIdentityStoreDB(const Profile& profile) {
hbosfaf3baf2016-07-01 13:43:16325 content::BrowserThread::PostDelayedTask(
326 content::BrowserThread::FILE,
327 FROM_HERE,
thestigf2a0fa92016-09-07 09:37:29328 base::Bind(&DeleteWebRTCIdentityStoreDBOnFileThread, profile.GetPath()),
hbosfaf3baf2016-07-01 13:43:16329 base::TimeDelta::FromSeconds(120));
330}
331
[email protected]572f40c9b2012-07-06 20:35:33332} // namespace
333
334namespace chrome {
initial.commit09911bf2008-07-26 23:55:29335
[email protected]4082306d92013-02-21 14:51:01336void RegisterLocalState(PrefRegistrySimple* registry) {
[email protected]2a5f29632012-11-26 17:17:55337 // Please keep this list alphabetized.
[email protected]f0ee7912013-02-27 06:02:55338 AppListService::RegisterPrefs(registry);
[email protected]b1de2c72013-02-06 02:45:47339 browser_shutdown::RegisterPrefs(registry);
340 BrowserProcessImpl::RegisterPrefs(registry);
[email protected]4a55a712014-06-08 16:50:34341 ChromeMetricsServiceClient::RegisterPrefs(registry);
oysteinede6783b2016-05-25 18:08:43342 ChromeTracingDelegate::RegisterPrefs(registry);
blundell57bcfed2015-09-04 08:44:45343 variations::VariationsService::RegisterPrefs(registry);
sorinebcfc8dd2016-08-12 21:57:18344 component_updater::RegisterPrefs(registry);
[email protected]b1de2c72013-02-06 02:45:47345 ExternalProtocolHandler::RegisterPrefs(registry);
sdefresne8593e6432015-12-01 12:38:08346 flags_ui::PrefServiceFlagsStorage::RegisterPrefs(registry);
[email protected]b1de2c72013-02-06 02:45:47347 geolocation::RegisterPrefs(registry);
[email protected]e6933d2a2013-03-12 22:32:21348 GpuModeManager::RegisterPrefs(registry);
qinmin9899e492016-08-05 19:03:26349 GpuProfileCache::RegisterPrefs(registry);
[email protected]b1de2c72013-02-06 02:45:47350 IntranetRedirectDetector::RegisterPrefs(registry);
[email protected]3c319eb2013-02-21 14:44:45351 IOThread::RegisterPrefs(registry);
[email protected]d0ab865b2014-06-04 19:41:34352 network_time::NetworkTimeTracker::RegisterPrefs(registry);
iclelland27f4bcb2016-06-22 16:41:03353 OriginTrialPrefs::RegisterPrefs(registry);
[email protected]b1de2c72013-02-06 02:45:47354 PrefProxyConfigTrackerImpl::RegisterPrefs(registry);
355 ProfileInfoCache::RegisterPrefs(registry);
[email protected]de71ae992013-07-18 03:30:38356 profiles::RegisterPrefs(registry);
[email protected]2a172e42014-02-21 04:06:10357 rappor::RapporService::RegisterPrefs(registry);
[email protected]ceafc462013-11-04 12:26:03358 RegisterScreenshotPrefs(registry);
[email protected]b1de2c72013-02-06 02:45:47359 SigninManagerFactory::RegisterPrefs(registry);
abhishek.a212849cee2015-10-20 11:27:29360 ssl_config::SSLConfigServiceManager::RegisterPrefs(registry);
engedy6cfa34f2016-07-29 11:18:09361 subresource_filter::IndexedRulesetVersion::RegisterPrefs(registry);
fdoray44cd7812016-01-08 17:03:59362 startup_metric_utils::RegisterPrefs(registry);
wafflesd2d9a332016-04-09 01:59:57363 update_client::RegisterPrefs(registry);
droger259fdd62015-09-02 09:22:05364 web_resource::PromoResourceService::RegisterPrefs(registry);
[email protected]cc36c2c2012-03-01 00:57:34365
[email protected]b1de2c72013-02-06 02:45:47366 policy::BrowserPolicyConnector::RegisterPrefs(registry);
367 policy::PolicyStatisticsCollector::RegisterPrefs(registry);
[email protected]27e96a972011-10-20 20:06:55368
xiyuane4f1c4e02014-10-06 16:28:44369#if defined(ENABLE_EXTENSIONS)
370 EasyUnlockService::RegisterPrefs(registry);
371#endif
372
[email protected]ceafc462013-11-04 12:26:03373#if defined(ENABLE_PLUGINS)
374 PluginFinder::RegisterPrefs(registry);
375#endif
376
377#if defined(ENABLE_PLUGIN_INSTALLATION)
378 PluginsResourceService::RegisterPrefs(registry);
379#endif
380
[email protected]44879ed2012-04-06 01:11:02381#if defined(ENABLE_TASK_MANAGER)
avi24d693f2016-08-06 18:03:52382 task_manager::TaskManagerInterface::RegisterPrefs(registry);
[email protected]44879ed2012-04-06 01:11:02383#endif // defined(ENABLE_TASK_MANAGER)
384
brettw3224f3c2016-02-25 20:07:45385#if BUILDFLAG(ENABLE_BACKGROUND)
[email protected]b1de2c72013-02-06 02:45:47386 BackgroundModeManager::RegisterPrefs(registry);
bshe1cffacd82015-12-04 16:54:23387#endif
388
bshe1cffacd82015-12-04 16:54:23389#if !defined(OS_ANDROID)
bshef78bbfd2016-01-05 18:44:03390 RegisterBrowserPrefs(registry);
grtf14398c2015-07-14 15:11:44391 StartupBrowserCreator::RegisterLocalStatePrefs(registry);
jianli2dc910b02014-09-19 02:42:46392 // The native GCM is used on Android instead.
393 gcm::GCMChannelStatusSyncer::RegisterPrefs(registry);
johnme627dc8c72016-08-19 21:49:39394 gcm::RegisterPrefs(registry);
thestigd75ce5532015-10-05 22:08:34395 UpgradeDetector::RegisterPrefs(registry);
[email protected]e7f79872013-09-13 01:39:31396#if !defined(OS_CHROMEOS)
[email protected]abaca602013-03-29 01:31:29397 RegisterDefaultBrowserPromptPrefs(registry);
[email protected]e7f79872013-09-13 01:39:31398#endif // !defined(OS_CHROMEOS)
399#endif // !defined(OS_ANDROID)
[email protected]3954f332012-02-25 02:51:54400
[email protected]8f0d8ecd12010-04-20 11:51:30401#if defined(OS_CHROMEOS)
[email protected]8304f61a2014-05-24 12:17:33402 ChromeOSMetricsProvider::RegisterPrefs(registry);
jamescook928c5e82015-01-07 20:47:18403 chromeos::AudioDevicesPrefHandlerImpl::RegisterPrefs(registry);
[email protected]4d390782014-08-15 09:22:58404 chromeos::ChromeUserManagerImpl::RegisterPrefs(registry);
[email protected]b1de2c72013-02-06 02:45:47405 chromeos::DataPromoNotification::RegisterPrefs(registry);
[email protected]a28c45a2013-04-18 06:02:18406 chromeos::DeviceOAuth2TokenService::RegisterPrefs(registry);
[email protected]b1de2c72013-02-06 02:45:47407 chromeos::device_settings_cache::RegisterPrefs(registry);
zelidrag459b11b12014-11-14 04:05:53408 chromeos::EnableDebuggingScreenHandler::RegisterPrefs(registry);
[email protected]b1de2c72013-02-06 02:45:47409 chromeos::language_prefs::RegisterPrefs(registry);
[email protected]1637c192013-02-16 04:00:13410 chromeos::KioskAppManager::RegisterPrefs(registry);
[email protected]d6001872013-09-24 18:31:26411 chromeos::MultiProfileUserController::RegisterPrefs(registry);
[email protected]8e6742a52014-05-23 14:56:22412 chromeos::HIDDetectionScreenHandler::RegisterPrefs(registry);
[email protected]219643f2014-07-16 17:54:00413 chromeos::DemoModeDetector::RegisterPrefs(registry);
[email protected]681958c2013-02-21 13:48:14414 chromeos::Preferences::RegisterPrefs(registry);
[email protected]1faaab72013-07-22 11:52:24415 chromeos::proxy_config::RegisterPrefs(registry);
[email protected]b1de2c72013-02-06 02:45:47416 chromeos::RegisterDisplayLocalStatePrefs(registry);
[email protected]bb9c5d72014-06-14 19:21:21417 chromeos::ResetScreenHandler::RegisterPrefs(registry);
[email protected]b1de2c72013-02-06 02:45:47418 chromeos::ServicesCustomizationDocument::RegisterPrefs(registry);
[email protected]daf4b542013-07-23 17:11:27419 chromeos::SigninScreenHandler::RegisterPrefs(registry);
[email protected]295ca1a72014-07-01 16:14:31420 chromeos::StartupUtils::RegisterPrefs(registry);
[email protected]c280dbf2013-03-19 12:17:44421 chromeos::system::AutomaticRebootManager::RegisterPrefs(registry);
afakhrye8eac602015-11-10 02:31:22422 chromeos::system::InputDeviceSettings::RegisterPrefs(registry);
glevin5dd01a72016-03-23 23:08:12423 chromeos::TimeZoneResolver::RegisterPrefs(registry);
[email protected]b1de2c72013-02-06 02:45:47424 chromeos::UserImageManager::RegisterPrefs(registry);
[email protected]295ca1a72014-07-01 16:14:31425 chromeos::UserSessionManager::RegisterPrefs(registry);
[email protected]b1de2c72013-02-06 02:45:47426 chromeos::WallpaperManager::RegisterPrefs(registry);
[email protected]a5058a22013-08-29 20:49:51427 chromeos::echo_offer::RegisterPrefs(registry);
[email protected]5a145e82014-05-29 22:19:07428 extensions::ExtensionAssetsManagerChromeOS::RegisterPrefs(registry);
[email protected]db8bf052014-06-25 11:53:10429 invalidation::InvalidatorStorage::RegisterPrefs(registry);
[email protected]b1de2c72013-02-06 02:45:47430 policy::AutoEnrollmentClient::RegisterPrefs(registry);
[email protected]97275822014-01-21 19:30:36431 policy::BrowserPolicyConnectorChromeOS::RegisterPrefs(registry);
[email protected]69a99822013-06-11 00:31:36432 policy::DeviceCloudPolicyManagerChromeOS::RegisterPrefs(registry);
[email protected]b1de2c72013-02-06 02:45:47433 policy::DeviceStatusCollector::RegisterPrefs(registry);
[email protected]bcb94772013-12-19 14:28:58434 policy::PolicyCertServiceFactory::RegisterPrefs(registry);
glevin5dd01a72016-03-23 23:08:12435 quirks::QuirksManager::RegisterPrefs(registry);
[email protected]8f0d8ecd12010-04-20 11:51:30436#endif
[email protected]b6366ffa2012-02-29 17:12:26437
438#if defined(OS_MACOSX)
[email protected]b1de2c72013-02-06 02:45:47439 confirm_quit::RegisterLocalState(registry);
[email protected]425f7a02014-04-29 01:51:44440 QuitWithAppsController::RegisterPrefs(registry);
[email protected]b6366ffa2012-02-29 17:12:26441#endif
[email protected]bdb8a1e2013-10-03 08:14:00442
443#if defined(OS_WIN)
444 app_metro_launch::RegisterPrefs(registry);
[email protected]c5d4b1842014-06-20 21:19:50445 component_updater::RegisterPrefsForSwReporter(registry);
[email protected]a8564212014-04-09 16:16:51446 password_manager::PasswordManager::RegisterLocalPrefs(registry);
[email protected]bdb8a1e2013-10-03 08:14:00447#endif
[email protected]ceafc462013-11-04 12:26:03448
449#if defined(TOOLKIT_VIEWS)
[email protected]af97be4c62014-02-13 14:43:34450 RegisterBrowserViewLocalPrefs(registry);
[email protected]ceafc462013-11-04 12:26:03451#endif
[email protected]9acc48602009-11-30 21:18:51452}
initial.commit09911bf2008-07-26 23:55:29453
[email protected]37ca3fe02013-07-05 15:32:44454// Register prefs applicable to all profiles.
455void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
rkaplow058da3132015-02-19 18:18:38456 TRACE_EVENT0("browser", "chrome::RegisterProfilePrefs");
457 SCOPED_UMA_HISTOGRAM_TIMER("Settings.RegisterProfilePrefsTime");
[email protected]2a5f29632012-11-26 17:17:55458 // User prefs. Please keep this list alphabetized.
[email protected]37ca3fe02013-07-05 15:32:44459 autofill::AutofillManager::RegisterProfilePrefs(registry);
harknessbea56c22016-08-16 07:23:00460 BudgetManager::RegisterProfilePrefs(registry);
[email protected]34f54052014-03-20 21:33:40461 sync_driver::SyncPrefs::RegisterProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:44462 ChromeContentBrowserClient::RegisterProfilePrefs(registry);
463 ChromeVersionService::RegisterProfilePrefs(registry);
[email protected]ad66db12014-07-10 12:43:47464 chrome_browser_net::HttpServerPropertiesManagerFactory::RegisterProfilePrefs(
[email protected]c753f142013-02-10 13:14:04465 registry);
[email protected]37ca3fe02013-07-05 15:32:44466 chrome_browser_net::Predictor::RegisterProfilePrefs(registry);
[email protected]ba85a602014-06-28 20:37:12467 chrome_browser_net::RegisterPredictionOptionsProfilePrefs(registry);
[email protected]06690dc2014-03-07 08:44:00468 chrome_prefs::RegisterProfilePrefs(registry);
[email protected]6a5b0712014-07-16 00:30:10469 dom_distiller::DistilledPagePrefs::RegisterProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:44470 DownloadPrefs::RegisterProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:44471 HostContentSettingsMap::RegisterProfilePrefs(registry);
472 IncognitoModePrefs::RegisterProfilePrefs(registry);
473 InstantUI::RegisterProfilePrefs(registry);
[email protected]26bd3893c2014-04-15 18:59:58474 NavigationCorrectionTabObserver::RegisterProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:44475 MediaCaptureDevicesDispatcher::RegisterProfilePrefs(registry);
[email protected]cd80cce2013-12-02 15:19:19476 MediaDeviceIDSalt::RegisterProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:44477 MediaStreamDevicesController::RegisterProfilePrefs(registry);
pkedc5e1eb2016-08-19 18:34:59478 ntp_snippets::BookmarkSuggestionsProvider::RegisterProfilePrefs(registry);
treib720f3a212016-02-29 18:24:29479 ntp_snippets::NTPSnippetsService::RegisterProfilePrefs(registry);
jkrcal505ea3a2016-07-22 10:19:22480 ntp_snippets::RequestThrottler::RegisterProfilePrefs(registry);
jkrcale13510e2016-09-08 17:56:20481 ntp_snippets::UserClassifier::RegisterProfilePrefs(registry);
melandory444f85f2015-09-07 13:32:42482 password_bubble_experiment::RegisterPrefs(registry);
[email protected]a8564212014-04-09 16:16:51483 password_manager::PasswordManager::RegisterProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:44484 PrefProxyConfigTrackerImpl::RegisterProfilePrefs(registry);
485 PrefsTabHelper::RegisterProfilePrefs(registry);
486 Profile::RegisterProfilePrefs(registry);
487 ProfileImpl::RegisterProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:44488 ProtocolHandlerRegistry::RegisterProfilePrefs(registry);
johnmecf2da0c2015-10-28 19:42:12489 PushMessagingAppIdentifier::RegisterProfilePrefs(registry);
[email protected]c753f142013-02-10 13:14:04490 RegisterBrowserUserPrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:44491 SessionStartupPref::RegisterProfilePrefs(registry);
492 TemplateURLPrepopulateData::RegisterProfilePrefs(registry);
[email protected]e5e72cc2014-07-22 19:06:49493 translate::TranslatePrefs::RegisterProfilePrefs(registry);
[email protected]855ebff2014-05-09 07:14:38494 ZeroSuggestProvider::RegisterProfilePrefs(registry);
ioanapa8bfbc72016-09-07 16:09:05495 browsing_data::prefs::RegisterBrowserUserPrefs(registry);
[email protected]cc36c2c2012-03-01 00:57:34496
bauerb4da36132014-12-26 19:53:13497#if defined(ENABLE_APP_LIST)
498 app_list::AppListPrefs::RegisterProfilePrefs(registry);
499#endif
500
[email protected]37ca3fe02013-07-05 15:32:44501 policy::URLBlacklistManager::RegisterProfilePrefs(registry);
rsleevi96356f82016-06-30 09:01:20502 certificate_transparency::CTPolicyManager::RegisterPrefs(registry);
[email protected]cc36c2c2012-03-01 00:57:34503
[email protected]c2ac1dda2013-09-23 05:04:56504#if defined(ENABLE_EXTENSIONS)
[email protected]deba96a2014-08-03 05:48:54505 EasyUnlockService::RegisterProfilePrefs(registry);
[email protected]17510602014-06-05 11:02:28506 ExtensionWebUI::RegisterProfilePrefs(registry);
je_julie.kim7fbb5a1a2015-02-09 17:26:05507 RegisterAnimationPolicyPrefs(registry);
mfoltz96f329c2016-01-13 18:16:58508 ToolbarActionsBar::RegisterProfilePrefs(registry);
509 extensions::ActivityLog::RegisterProfilePrefs(registry);
510 extensions::ComponentMigrationHelper::RegisterPrefs(registry);
mfoltz96f329c2016-01-13 18:16:58511 extensions::ExtensionPrefs::RegisterProfilePrefs(registry);
512 extensions::launch_util::RegisterProfilePrefs(registry);
afakhry2bd481832016-06-16 16:17:24513 extensions::RuntimeAPI::RegisterPrefs(registry);
ckehoef2e12d02015-01-09 23:32:59514#endif // defined(ENABLE_EXTENSIONS)
[email protected]c2ac1dda2013-09-23 05:04:56515
[email protected]ceafc462013-11-04 12:26:03516#if defined(ENABLE_NOTIFICATIONS)
peterc4007912015-07-31 21:13:37517 NotifierStateTracker::RegisterProfilePrefs(registry);
[email protected]ceafc462013-11-04 12:26:03518#endif
519
peter70152812014-09-24 19:56:25520#if defined(ENABLE_NOTIFICATIONS) && defined(ENABLE_EXTENSIONS) && \
521 !defined(OS_ANDROID)
522 // The extension welcome notification requires a build that enables extensions
523 // and notifications, and uses the UI message center.
524 ExtensionWelcomeNotification::RegisterProfilePrefs(registry);
525#endif
526
hshi11e97112015-08-29 00:14:36527#if defined(ENABLE_PLUGINS)
528 PluginsUI::RegisterProfilePrefs(registry);
529#endif
530
bauerb4da36132014-12-26 19:53:13531#if defined(ENABLE_PRINT_PREVIEW)
bauerb4da36132014-12-26 19:53:13532 printing::StickySettings::RegisterProfilePrefs(registry);
533#endif
534
[email protected]2188c8d2014-03-21 00:58:56535#if defined(ENABLE_SERVICE_DISCOVERY)
536 LocalDiscoveryUI::RegisterProfilePrefs(registry);
537#endif
538
bauerb4da36132014-12-26 19:53:13539#if defined(ENABLE_SUPERVISED_USERS)
jam1c5a91492016-02-24 20:47:53540#if !defined(OS_ANDROID)
bauerb4da36132014-12-26 19:53:13541 SupervisedUserSharedSettingsService::RegisterProfilePrefs(registry);
542 SupervisedUserSyncService::RegisterProfilePrefs(registry);
bauerb7f3b8542015-06-29 19:56:19543#endif
544 ChildAccountService::RegisterProfilePrefs(registry);
545 SupervisedUserService::RegisterProfilePrefs(registry);
bauerb4da36132014-12-26 19:53:13546 SupervisedUserWhitelistService::RegisterProfilePrefs(registry);
547#endif
548
sievers2f1e8112015-12-04 18:43:56549#if BUILDFLAG(ANDROID_JAVA_UI)
blundell57bcfed2015-09-04 08:44:45550 variations::VariationsService::RegisterProfilePrefs(registry);
sfiera08009fe2016-06-15 17:07:26551 ntp_tiles::MostVisitedSites::RegisterProfilePrefs(registry);
552 ntp_tiles::PopularSites::RegisterProfilePrefs(registry);
[email protected]784d0b42013-11-05 01:33:00553 NewTabPagePrefs::RegisterProfilePrefs(registry);
[email protected]084f82b2013-11-01 00:09:59554 PartnerBookmarksShim::RegisterProfilePrefs(registry);
[email protected]ceafc462013-11-04 12:26:03555#else
556 AppShortcutManager::RegisterProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:44557 DeviceIDFetcher::RegisterProfilePrefs(registry);
558 DevToolsWindow::RegisterProfilePrefs(registry);
taptedd13e0cd2016-05-13 08:26:56559#if defined(ENABLE_APP_LIST)
[email protected]c30bda262014-06-19 04:10:13560 DriveAppMapping::RegisterProfilePrefs(registry);
taptedd13e0cd2016-05-13 08:26:56561#endif
[email protected]37ca3fe02013-07-05 15:32:44562 extensions::CommandService::RegisterProfilePrefs(registry);
[email protected]1c9bf752013-08-01 00:10:52563 extensions::ExtensionSettingsHandler::RegisterProfilePrefs(registry);
[email protected]d29f4e312013-08-07 05:28:31564 extensions::TabsCaptureVisibleTabFunction::RegisterProfilePrefs(registry);
565 first_run::RegisterProfilePrefs(registry);
[email protected]54b25a82014-04-30 21:47:05566 NewTabUI::RegisterProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:44567 PepperFlashSettingsManager::RegisterProfilePrefs(registry);
568 PinnedTabCodec::RegisterProfilePrefs(registry);
[email protected]3d27d272013-07-31 03:15:16569 signin::RegisterProfilePrefs(registry);
[email protected]cc36c2c2012-03-01 00:57:34570#endif
571
mvanouwerkerk9f0f38a2016-06-08 14:11:44572#if defined(OS_ANDROID)
573 NotificationPlatformBridgeAndroid::RegisterProfilePrefs(registry);
pkec7c00472016-08-12 08:24:11574 ntp_snippets::OfflinePageSuggestionsProvider::RegisterProfilePrefs(registry);
johnme627dc8c72016-08-19 21:49:39575#else
576 browser_sync::ForeignSessionHandler::RegisterProfilePrefs(registry);
577 gcm::GCMChannelStatusSyncer::RegisterProfilePrefs(registry);
578 gcm::RegisterProfilePrefs(registry);
579#endif
580
581#if !defined(OS_ANDROID) && !defined(OS_CHROMEOS)
582 default_apps::RegisterProfilePrefs(registry);
mvanouwerkerk9f0f38a2016-06-08 14:11:44583#endif
584
[email protected]9acc48602009-11-30 21:18:51585#if defined(OS_CHROMEOS)
khmel1dc479132016-02-01 21:09:55586 arc::ArcAuthService::RegisterProfilePrefs(registry);
[email protected]980d5f9e2013-12-17 17:47:08587 chromeos::first_run::RegisterProfilePrefs(registry);
[email protected]7de7aee2014-06-02 12:37:52588 chromeos::file_system_provider::RegisterProfilePrefs(registry);
pneubeckdabdfe912015-06-18 13:42:13589 chromeos::KeyPermissions::RegisterProfilePrefs(registry);
[email protected]d6001872013-09-24 18:31:26590 chromeos::MultiProfileUserController::RegisterProfilePrefs(registry);
jdufault489f4302016-05-20 20:34:28591 chromeos::PinStorage::RegisterProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:44592 chromeos::Preferences::RegisterProfilePrefs(registry);
skau65455b5a02016-08-03 20:16:38593 chromeos::PrinterPrefManager::RegisterProfilePrefs(registry);
[email protected]e2930d0902013-07-17 05:25:42594 chromeos::proxy_config::RegisterProfilePrefs(registry);
[email protected]3b9deb402014-01-30 17:50:16595 chromeos::SAMLOfflineSigninLimiter::RegisterProfilePrefs(registry);
[email protected]d0b28892014-03-05 18:56:31596 chromeos::ServicesCustomizationDocument::RegisterProfilePrefs(registry);
[email protected]de25c91f2013-09-06 06:51:58597 chromeos::UserImageSyncObserver::RegisterProfilePrefs(registry);
dkrahn3f7776e2016-02-26 08:12:29598 extensions::EPKPChallengeUserKey::RegisterProfilePrefs(registry);
sdefresne8593e6432015-12-01 12:38:08599 flags_ui::PrefServiceFlagsStorage::RegisterProfilePrefs(registry);
[email protected]9acc48602009-11-30 21:18:51600#endif
[email protected]cc36c2c2012-03-01 00:57:34601
khmeld7c5a322015-12-04 16:24:47602#if defined(OS_CHROMEOS) && defined(ENABLE_APP_LIST)
603 ArcAppListPrefs::RegisterProfilePrefs(registry);
604#endif
605
[email protected]a4422802012-05-03 09:19:15606#if defined(OS_WIN)
mad2b3b6552014-09-25 00:44:49607 component_updater::RegisterProfilePrefsForSwReporter(registry);
[email protected]37ca3fe02013-07-05 15:32:44608 NetworkProfileBubble::RegisterProfilePrefs(registry);
[email protected]a4422802012-05-03 09:19:15609#endif
[email protected]eeec6ca2013-02-21 15:10:43610
[email protected]ceafc462013-11-04 12:26:03611#if defined(TOOLKIT_VIEWS)
[email protected]af97be4c62014-02-13 14:43:34612 RegisterBrowserViewProfilePrefs(registry);
[email protected]ceafc462013-11-04 12:26:03613 RegisterInvertBubbleUserPrefs(registry);
[email protected]ceafc462013-11-04 12:26:03614#endif
615
616#if defined(USE_ASH)
khmel3b43aaa2016-06-21 02:39:46617 ash::launcher::RegisterChromeLauncherUserPrefs(registry);
[email protected]e4bf6b7bb52013-07-15 16:49:40618#endif
dbeam72db0762015-05-20 20:37:12619
gabf2901f62015-11-12 10:36:49620 // Preferences registered only for migration (clearing or moving to a new key)
621 // go here.
622
623#if defined(OS_WIN)
624 registry->RegisterIntegerPref(kShownAutoLaunchInfobarDeprecated, 0);
625#endif // defined(OS_WIN)
sdefresne39dc3a1f2015-12-03 15:06:17626
tdresserd8208c42016-01-13 14:25:55627#if defined(USE_AURA)
628 registry->RegisterIntegerPref(kFlingMaxCancelToDownTimeInMs, 0);
629 registry->RegisterIntegerPref(kFlingMaxTapGapTimeInMs, 0);
630 registry->RegisterIntegerPref(kTabScrubActivationDelayInMs, 0);
631 registry->RegisterIntegerPref(kSemiLongPressTimeInMs, 0);
632 registry->RegisterDoublePref(kMaxSeparationForGestureTouchesInPixels, 0);
633
634 registry->RegisterDoublePref(kOverscrollHorizontalThresholdComplete, 0);
635 registry->RegisterDoublePref(kOverscrollVerticalThresholdComplete, 0);
636 registry->RegisterDoublePref(kOverscrollMinimumThresholdStart, 0);
637 registry->RegisterDoublePref(kOverscrollMinimumThresholdStartTouchpad, 0);
638 registry->RegisterDoublePref(kOverscrollVerticalThresholdStart, 0);
639 registry->RegisterDoublePref(kOverscrollHorizontalResistThreshold, 0);
640 registry->RegisterDoublePref(kOverscrollVerticalResistThreshold, 0);
641#endif // defined(USE_AURA)
642
sdefresne39dc3a1f2015-12-03 15:06:17643 registry->RegisterListPref(kURLsToRestoreOnStartupOld);
644 registry->RegisterInt64Pref(kRestoreStartupURLsMigrationTime, 0);
sdefresne245bbd42015-12-09 20:20:28645 registry->RegisterBooleanPref(kRestoreOnStartupMigrated, false);
rdevlin.cronin76ea1092016-03-15 19:20:06646
647#if BUILDFLAG(ENABLE_GOOGLE_NOW)
648 registry->RegisterBooleanPref(kGoogleGeolocationAccessEnabled, false);
649#endif
grta872c102016-04-12 17:20:57650
651 registry->RegisterBooleanPref(kCheckDefaultBrowser, true);
fdorayc2315a22016-05-24 19:18:14652
653 registry->RegisterBooleanPref(kDesktopSearchRedirectionInfobarShownPref,
654 false);
bnca376ed52016-07-23 00:20:32655
656 registry->RegisterBooleanPref(kNetworkPredictionEnabled, true);
657 registry->RegisterBooleanPref(kDisableSpdy, false);
thestigf2a0fa92016-09-07 09:37:29658 registry->RegisterStringPref(kStaticEncodings, std::string());
659 registry->RegisterStringPref(kRecentlySelectedEncoding, std::string());
660 registry->RegisterBooleanPref(kWebKitUsesUniversalDetector, true);
carlosk5f1c5172016-09-08 18:59:31661
662 registry->RegisterBooleanPref(kWebKitAllowDisplayingInsecureContent, true);
initial.commit09911bf2008-07-26 23:55:29663}
license.botbf09a502008-08-24 00:55:55664
[email protected]37ca3fe02013-07-05 15:32:44665void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
666 RegisterProfilePrefs(registry);
[email protected]2424cc52013-07-17 13:44:38667
668#if defined(OS_CHROMEOS)
669 chromeos::PowerPrefs::RegisterUserProfilePrefs(registry);
670#endif
[email protected]37ca3fe02013-07-05 15:32:44671}
672
[email protected]8eefe842014-01-17 06:42:40673void RegisterScreenshotPrefs(PrefRegistrySimple* registry) {
674 registry->RegisterBooleanPref(prefs::kDisableScreenshots, false);
675}
676
[email protected]37ca3fe02013-07-05 15:32:44677#if defined(OS_CHROMEOS)
678void RegisterLoginProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
679 RegisterProfilePrefs(registry);
[email protected]2424cc52013-07-17 13:44:38680
681 chromeos::PowerPrefs::RegisterLoginProfilePrefs(registry);
[email protected]37ca3fe02013-07-05 15:32:44682}
683#endif
684
rkaplowf216caf2015-03-02 22:37:45685// This method should be periodically pruned of year+ old migrations.
686void MigrateObsoleteBrowserPrefs(Profile* profile, PrefService* local_state) {
rsesek08ebd2d2016-05-11 00:16:01687 // Added 05/2016.
688 web_resource::PromoResourceService::ClearLocalState(local_state);
rkaplowf216caf2015-03-02 22:37:45689}
690
691// This method should be periodically pruned of year+ old migrations.
692void MigrateObsoleteProfilePrefs(Profile* profile) {
693 PrefService* profile_prefs = profile->GetPrefs();
694
gabf2901f62015-11-12 10:36:49695#if defined(OS_WIN)
696 // Added 11/2015.
697 profile_prefs->ClearPref(kShownAutoLaunchInfobarDeprecated);
698#endif
sdefresne39dc3a1f2015-12-03 15:06:17699
spqchana04af1f2016-03-02 17:43:08700#if defined(OS_MACOSX)
701 // Migrate the value of kHideFullscreenToolbar to kShowFullscreenToolbar if
702 // it was set by the user. See crbug.com/590827.
703 // Added 03/2016.
704 const PrefService::Preference* hide_pref =
705 profile_prefs->FindPreference(prefs::kHideFullscreenToolbar);
706 if (!hide_pref->IsDefaultValue()) {
707 bool hide_pref_value =
708 profile_prefs->GetBoolean(prefs::kHideFullscreenToolbar);
709 profile_prefs->SetBoolean(prefs::kShowFullscreenToolbar, !hide_pref_value);
710 profile_prefs->ClearPref(prefs::kHideFullscreenToolbar);
711 }
712#endif
713
sdefresne39dc3a1f2015-12-03 15:06:17714 // Added 12/1015.
715 profile_prefs->ClearPref(kURLsToRestoreOnStartupOld);
716 profile_prefs->ClearPref(kRestoreStartupURLsMigrationTime);
sdefresne245bbd42015-12-09 20:20:28717
718 // Added 12/2015.
719 profile_prefs->ClearPref(kRestoreOnStartupMigrated);
tdresserd8208c42016-01-13 14:25:55720
721#if defined(USE_AURA)
722 // Added 1/2016
723 profile_prefs->ClearPref(kFlingMaxCancelToDownTimeInMs);
724 profile_prefs->ClearPref(kFlingMaxTapGapTimeInMs);
725 profile_prefs->ClearPref(kTabScrubActivationDelayInMs);
726 profile_prefs->ClearPref(kMaxSeparationForGestureTouchesInPixels);
727 profile_prefs->ClearPref(kSemiLongPressTimeInMs);
728 profile_prefs->ClearPref(kOverscrollHorizontalThresholdComplete);
729 profile_prefs->ClearPref(kOverscrollVerticalThresholdComplete);
730 profile_prefs->ClearPref(kOverscrollMinimumThresholdStart);
731 profile_prefs->ClearPref(kOverscrollMinimumThresholdStartTouchpad);
732 profile_prefs->ClearPref(kOverscrollVerticalThresholdStart);
733 profile_prefs->ClearPref(kOverscrollHorizontalResistThreshold);
734 profile_prefs->ClearPref(kOverscrollVerticalResistThreshold);
735#endif // defined(USE_AURA)
rdevlin.cronin76ea1092016-03-15 19:20:06736
737#if BUILDFLAG(ENABLE_GOOGLE_NOW)
738 // Added 3/2016.
739 profile_prefs->ClearPref(kGoogleGeolocationAccessEnabled);
740#endif
grta872c102016-04-12 17:20:57741
742 // Added 4/2016.
743 if (!profile_prefs->GetBoolean(kCheckDefaultBrowser)) {
744 // Seed kDefaultBrowserLastDeclined with the install date.
745 metrics::MetricsService* metrics_service =
746 g_browser_process->metrics_service();
747 base::Time install_time =
748 metrics_service
749 ? base::Time::FromTimeT(metrics_service->GetInstallDate())
750 : base::Time::Now();
751 profile_prefs->SetInt64(prefs::kDefaultBrowserLastDeclined,
752 install_time.ToInternalValue());
753 }
754 profile_prefs->ClearPref(kCheckDefaultBrowser);
fdorayc2315a22016-05-24 19:18:14755
756 // Added 5/2016.
757 profile_prefs->ClearPref(kDesktopSearchRedirectionInfobarShownPref);
hbosfaf3baf2016-07-01 13:43:16758
759 // Added 7/2016.
thestigf2a0fa92016-09-07 09:37:29760 DeleteWebRTCIdentityStoreDB(*profile);
bnca376ed52016-07-23 00:20:32761 profile_prefs->ClearPref(kNetworkPredictionEnabled);
762 profile_prefs->ClearPref(kDisableSpdy);
jinsukkim72125e22016-08-30 23:51:48763
764 // Added 8/2016.
thestigf2a0fa92016-09-07 09:37:29765 profile_prefs->ClearPref(kStaticEncodings);
766 profile_prefs->ClearPref(kRecentlySelectedEncoding);
jinsukkimc07e01372016-09-07 02:33:43767
768 // Added 9/2016.
thestigf2a0fa92016-09-07 09:37:29769 profile_prefs->ClearPref(kWebKitUsesUniversalDetector);
carlosk5f1c5172016-09-08 18:59:31770 profile_prefs->ClearPref(kWebKitAllowDisplayingInsecureContent);
[email protected]102253f2012-12-14 17:00:58771}
772
[email protected]572f40c9b2012-07-06 20:35:33773} // namespace chrome