OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/prefs/browser_prefs.h" | 5 #include "chrome/browser/prefs/browser_prefs.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
10 #include "base/metrics/histogram_macros.h" | 10 #include "base/metrics/histogram_macros.h" |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 #include "components/startup_metric_utils/browser/startup_metric_utils.h" | 99 #include "components/startup_metric_utils/browser/startup_metric_utils.h" |
100 #include "components/subresource_filter/core/browser/ruleset_service.h" | 100 #include "components/subresource_filter/core/browser/ruleset_service.h" |
101 #include "components/sync/base/sync_prefs.h" | 101 #include "components/sync/base/sync_prefs.h" |
102 #include "components/sync_preferences/pref_service_syncable.h" | 102 #include "components/sync_preferences/pref_service_syncable.h" |
103 #include "components/translate/core/browser/language_model.h" | 103 #include "components/translate/core/browser/language_model.h" |
104 #include "components/translate/core/browser/translate_prefs.h" | 104 #include "components/translate/core/browser/translate_prefs.h" |
105 #include "components/update_client/update_client.h" | 105 #include "components/update_client/update_client.h" |
106 #include "components/variations/service/variations_service.h" | 106 #include "components/variations/service/variations_service.h" |
107 #include "content/public/browser/browser_thread.h" | 107 #include "content/public/browser/browser_thread.h" |
108 #include "content/public/browser/render_process_host.h" | 108 #include "content/public/browser/render_process_host.h" |
| 109 #include "extensions/features/features.h" |
109 #include "net/http/http_server_properties_manager.h" | 110 #include "net/http/http_server_properties_manager.h" |
110 #include "printing/features/features.h" | 111 #include "printing/features/features.h" |
111 | 112 |
112 #if BUILDFLAG(ENABLE_APP_LIST) | 113 #if BUILDFLAG(ENABLE_APP_LIST) |
113 #include "chrome/browser/apps/drive/drive_app_mapping.h" | 114 #include "chrome/browser/apps/drive/drive_app_mapping.h" |
114 #include "chrome/browser/ui/app_list/app_list_syncable_service.h" | 115 #include "chrome/browser/ui/app_list/app_list_syncable_service.h" |
115 #endif | 116 #endif |
116 | 117 |
117 #if BUILDFLAG(ENABLE_BACKGROUND) | 118 #if BUILDFLAG(ENABLE_BACKGROUND) |
118 #include "chrome/browser/background/background_mode_manager.h" | 119 #include "chrome/browser/background/background_mode_manager.h" |
119 #endif | 120 #endif |
120 | 121 |
121 #if defined(ENABLE_EXTENSIONS) | 122 #if BUILDFLAG(ENABLE_EXTENSIONS) |
122 #include "chrome/browser/accessibility/animation_policy_prefs.h" | 123 #include "chrome/browser/accessibility/animation_policy_prefs.h" |
123 #include "chrome/browser/apps/shortcut_manager.h" | 124 #include "chrome/browser/apps/shortcut_manager.h" |
124 #include "chrome/browser/extensions/activity_log/activity_log.h" | 125 #include "chrome/browser/extensions/activity_log/activity_log.h" |
125 #include "chrome/browser/extensions/api/commands/command_service.h" | 126 #include "chrome/browser/extensions/api/commands/command_service.h" |
126 #include "chrome/browser/extensions/api/tabs/tabs_api.h" | 127 #include "chrome/browser/extensions/api/tabs/tabs_api.h" |
127 #include "chrome/browser/extensions/component_migration_helper.h" | 128 #include "chrome/browser/extensions/component_migration_helper.h" |
128 #include "chrome/browser/extensions/extension_web_ui.h" | 129 #include "chrome/browser/extensions/extension_web_ui.h" |
129 #include "chrome/browser/extensions/launch_util.h" | 130 #include "chrome/browser/extensions/launch_util.h" |
130 #include "chrome/browser/signin/easy_unlock_service.h" | 131 #include "chrome/browser/signin/easy_unlock_service.h" |
131 #include "chrome/browser/ui/toolbar/toolbar_actions_bar.h" | 132 #include "chrome/browser/ui/toolbar/toolbar_actions_bar.h" |
132 #include "chrome/browser/ui/webui/extensions/extension_settings_handler.h" | 133 #include "chrome/browser/ui/webui/extensions/extension_settings_handler.h" |
133 #include "extensions/browser/api/runtime/runtime_api.h" | 134 #include "extensions/browser/api/runtime/runtime_api.h" |
134 #include "extensions/browser/extension_prefs.h" | 135 #include "extensions/browser/extension_prefs.h" |
135 #endif // defined(ENABLE_EXTENSIONS) | 136 #endif // BUILDFLAG(ENABLE_EXTENSIONS) |
136 | 137 |
137 #if BUILDFLAG(ENABLE_PLUGIN_INSTALLATION) | 138 #if BUILDFLAG(ENABLE_PLUGIN_INSTALLATION) |
138 #include "chrome/browser/plugins/plugins_resource_service.h" | 139 #include "chrome/browser/plugins/plugins_resource_service.h" |
139 #endif | 140 #endif |
140 | 141 |
141 #if BUILDFLAG(ENABLE_SUPERVISED_USERS) | 142 #if BUILDFLAG(ENABLE_SUPERVISED_USERS) |
142 #include "chrome/browser/supervised_user/child_accounts/child_account_service.h" | 143 #include "chrome/browser/supervised_user/child_accounts/child_account_service.h" |
143 #include "chrome/browser/supervised_user/legacy/supervised_user_shared_settings_
service.h" | 144 #include "chrome/browser/supervised_user/legacy/supervised_user_shared_settings_
service.h" |
144 #include "chrome/browser/supervised_user/legacy/supervised_user_sync_service.h" | 145 #include "chrome/browser/supervised_user/legacy/supervised_user_sync_service.h" |
145 #include "chrome/browser/supervised_user/supervised_user_service.h" | 146 #include "chrome/browser/supervised_user/supervised_user_service.h" |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 RegisterScreenshotPrefs(registry); | 365 RegisterScreenshotPrefs(registry); |
365 SigninManagerFactory::RegisterPrefs(registry); | 366 SigninManagerFactory::RegisterPrefs(registry); |
366 ssl_config::SSLConfigServiceManager::RegisterPrefs(registry); | 367 ssl_config::SSLConfigServiceManager::RegisterPrefs(registry); |
367 subresource_filter::IndexedRulesetVersion::RegisterPrefs(registry); | 368 subresource_filter::IndexedRulesetVersion::RegisterPrefs(registry); |
368 startup_metric_utils::RegisterPrefs(registry); | 369 startup_metric_utils::RegisterPrefs(registry); |
369 update_client::RegisterPrefs(registry); | 370 update_client::RegisterPrefs(registry); |
370 | 371 |
371 policy::BrowserPolicyConnector::RegisterPrefs(registry); | 372 policy::BrowserPolicyConnector::RegisterPrefs(registry); |
372 policy::PolicyStatisticsCollector::RegisterPrefs(registry); | 373 policy::PolicyStatisticsCollector::RegisterPrefs(registry); |
373 | 374 |
374 #if defined(ENABLE_EXTENSIONS) | 375 #if BUILDFLAG(ENABLE_EXTENSIONS) |
375 EasyUnlockService::RegisterPrefs(registry); | 376 EasyUnlockService::RegisterPrefs(registry); |
376 #endif | 377 #endif |
377 | 378 |
378 #if defined(ENABLE_PLUGINS) | 379 #if defined(ENABLE_PLUGINS) |
379 PluginFinder::RegisterPrefs(registry); | 380 PluginFinder::RegisterPrefs(registry); |
380 #endif | 381 #endif |
381 | 382 |
382 #if BUILDFLAG(ENABLE_PLUGIN_INSTALLATION) | 383 #if BUILDFLAG(ENABLE_PLUGIN_INSTALLATION) |
383 PluginsResourceService::RegisterPrefs(registry); | 384 PluginsResourceService::RegisterPrefs(registry); |
384 #endif | 385 #endif |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
506 TemplateURLPrepopulateData::RegisterProfilePrefs(registry); | 507 TemplateURLPrepopulateData::RegisterProfilePrefs(registry); |
507 translate::LanguageModel::RegisterProfilePrefs(registry); | 508 translate::LanguageModel::RegisterProfilePrefs(registry); |
508 translate::TranslatePrefs::RegisterProfilePrefs(registry); | 509 translate::TranslatePrefs::RegisterProfilePrefs(registry); |
509 UINetworkQualityEstimatorService::RegisterProfilePrefs(registry); | 510 UINetworkQualityEstimatorService::RegisterProfilePrefs(registry); |
510 ZeroSuggestProvider::RegisterProfilePrefs(registry); | 511 ZeroSuggestProvider::RegisterProfilePrefs(registry); |
511 browsing_data::prefs::RegisterBrowserUserPrefs(registry); | 512 browsing_data::prefs::RegisterBrowserUserPrefs(registry); |
512 | 513 |
513 policy::URLBlacklistManager::RegisterProfilePrefs(registry); | 514 policy::URLBlacklistManager::RegisterProfilePrefs(registry); |
514 certificate_transparency::CTPolicyManager::RegisterPrefs(registry); | 515 certificate_transparency::CTPolicyManager::RegisterPrefs(registry); |
515 | 516 |
516 #if defined(ENABLE_EXTENSIONS) | 517 #if BUILDFLAG(ENABLE_EXTENSIONS) |
517 EasyUnlockService::RegisterProfilePrefs(registry); | 518 EasyUnlockService::RegisterProfilePrefs(registry); |
518 ExtensionWebUI::RegisterProfilePrefs(registry); | 519 ExtensionWebUI::RegisterProfilePrefs(registry); |
519 RegisterAnimationPolicyPrefs(registry); | 520 RegisterAnimationPolicyPrefs(registry); |
520 ToolbarActionsBar::RegisterProfilePrefs(registry); | 521 ToolbarActionsBar::RegisterProfilePrefs(registry); |
521 extensions::ActivityLog::RegisterProfilePrefs(registry); | 522 extensions::ActivityLog::RegisterProfilePrefs(registry); |
522 extensions::ComponentMigrationHelper::RegisterPrefs(registry); | 523 extensions::ComponentMigrationHelper::RegisterPrefs(registry); |
523 extensions::ExtensionPrefs::RegisterProfilePrefs(registry); | 524 extensions::ExtensionPrefs::RegisterProfilePrefs(registry); |
524 extensions::launch_util::RegisterProfilePrefs(registry); | 525 extensions::launch_util::RegisterProfilePrefs(registry); |
525 extensions::RuntimeAPI::RegisterPrefs(registry); | 526 extensions::RuntimeAPI::RegisterPrefs(registry); |
526 #endif // defined(ENABLE_EXTENSIONS) | 527 #endif // BUILDFLAG(ENABLE_EXTENSIONS) |
527 | 528 |
528 #if defined(ENABLE_NOTIFICATIONS) | 529 #if defined(ENABLE_NOTIFICATIONS) |
529 NotifierStateTracker::RegisterProfilePrefs(registry); | 530 NotifierStateTracker::RegisterProfilePrefs(registry); |
530 #endif | 531 #endif |
531 | 532 |
532 #if defined(ENABLE_NOTIFICATIONS) && defined(ENABLE_EXTENSIONS) && \ | 533 #if defined(ENABLE_NOTIFICATIONS) && BUILDFLAG(ENABLE_EXTENSIONS) && \ |
533 !defined(OS_ANDROID) | 534 !defined(OS_ANDROID) |
534 // The extension welcome notification requires a build that enables extensions | 535 // The extension welcome notification requires a build that enables extensions |
535 // and notifications, and uses the UI message center. | 536 // and notifications, and uses the UI message center. |
536 ExtensionWelcomeNotification::RegisterProfilePrefs(registry); | 537 ExtensionWelcomeNotification::RegisterProfilePrefs(registry); |
537 #endif | 538 #endif |
538 | 539 |
539 #if defined(ENABLE_PLUGINS) | 540 #if defined(ENABLE_PLUGINS) |
540 PluginsUI::RegisterProfilePrefs(registry); | 541 PluginsUI::RegisterProfilePrefs(registry); |
541 #endif | 542 #endif |
542 | 543 |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
778 // Added 8/2016. | 779 // Added 8/2016. |
779 profile_prefs->ClearPref(kStaticEncodings); | 780 profile_prefs->ClearPref(kStaticEncodings); |
780 profile_prefs->ClearPref(kRecentlySelectedEncoding); | 781 profile_prefs->ClearPref(kRecentlySelectedEncoding); |
781 | 782 |
782 // Added 9/2016. | 783 // Added 9/2016. |
783 profile_prefs->ClearPref(kWebKitUsesUniversalDetector); | 784 profile_prefs->ClearPref(kWebKitUsesUniversalDetector); |
784 profile_prefs->ClearPref(kWebKitAllowDisplayingInsecureContent); | 785 profile_prefs->ClearPref(kWebKitAllowDisplayingInsecureContent); |
785 } | 786 } |
786 | 787 |
787 } // namespace chrome | 788 } // namespace chrome |
OLD | NEW |