| 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/metrics/histogram_macros.h" | 9 #include "base/metrics/histogram_macros.h" |
| 10 #include "base/prefs/pref_registry_simple.h" | 10 #include "base/prefs/pref_registry_simple.h" |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 #include "chrome/browser/apps/drive/drive_app_mapping.h" | 109 #include "chrome/browser/apps/drive/drive_app_mapping.h" |
| 110 #include "chrome/browser/apps/shortcut_manager.h" | 110 #include "chrome/browser/apps/shortcut_manager.h" |
| 111 #include "chrome/browser/extensions/activity_log/activity_log.h" | 111 #include "chrome/browser/extensions/activity_log/activity_log.h" |
| 112 #include "chrome/browser/extensions/api/commands/command_service.h" | 112 #include "chrome/browser/extensions/api/commands/command_service.h" |
| 113 #include "chrome/browser/extensions/api/tabs/tabs_api.h" | 113 #include "chrome/browser/extensions/api/tabs/tabs_api.h" |
| 114 #include "chrome/browser/extensions/extension_web_ui.h" | 114 #include "chrome/browser/extensions/extension_web_ui.h" |
| 115 #include "chrome/browser/extensions/launch_util.h" | 115 #include "chrome/browser/extensions/launch_util.h" |
| 116 #include "chrome/browser/signin/easy_unlock_service.h" | 116 #include "chrome/browser/signin/easy_unlock_service.h" |
| 117 #include "chrome/browser/ui/webui/extensions/extension_settings_handler.h" | 117 #include "chrome/browser/ui/webui/extensions/extension_settings_handler.h" |
| 118 #include "extensions/browser/extension_prefs.h" | 118 #include "extensions/browser/extension_prefs.h" |
| 119 #if !defined(OS_ANDROID) && !defined(OS_IOS) | |
| 120 #include "chrome/browser/extensions/api/copresence/copresence_api.h" | 119 #include "chrome/browser/extensions/api/copresence/copresence_api.h" |
| 121 #include "chrome/browser/ui/toolbar/toolbar_actions_bar.h" | 120 #include "chrome/browser/ui/toolbar/toolbar_actions_bar.h" |
| 122 #endif | |
| 123 #endif // defined(ENABLE_EXTENSIONS) | 121 #endif // defined(ENABLE_EXTENSIONS) |
| 124 | 122 |
| 125 #if defined(ENABLE_PLUGIN_INSTALLATION) | 123 #if defined(ENABLE_PLUGIN_INSTALLATION) |
| 126 #include "chrome/browser/plugins/plugins_resource_service.h" | 124 #include "chrome/browser/plugins/plugins_resource_service.h" |
| 127 #endif | 125 #endif |
| 128 | 126 |
| 129 #if defined(ENABLE_SUPERVISED_USERS) | 127 #if defined(ENABLE_SUPERVISED_USERS) |
| 130 #include "chrome/browser/supervised_user/child_accounts/child_account_service.h" | 128 #include "chrome/browser/supervised_user/child_accounts/child_account_service.h" |
| 131 #include "chrome/browser/supervised_user/legacy/supervised_user_shared_settings_
service.h" | 129 #include "chrome/browser/supervised_user/legacy/supervised_user_shared_settings_
service.h" |
| 132 #include "chrome/browser/supervised_user/legacy/supervised_user_sync_service.h" | 130 #include "chrome/browser/supervised_user/legacy/supervised_user_sync_service.h" |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 #endif | 289 #endif |
| 292 | 290 |
| 293 #if defined(ENABLE_PLUGIN_INSTALLATION) | 291 #if defined(ENABLE_PLUGIN_INSTALLATION) |
| 294 PluginsResourceService::RegisterPrefs(registry); | 292 PluginsResourceService::RegisterPrefs(registry); |
| 295 #endif | 293 #endif |
| 296 | 294 |
| 297 #if defined(ENABLE_TASK_MANAGER) | 295 #if defined(ENABLE_TASK_MANAGER) |
| 298 TaskManager::RegisterPrefs(registry); | 296 TaskManager::RegisterPrefs(registry); |
| 299 #endif // defined(ENABLE_TASK_MANAGER) | 297 #endif // defined(ENABLE_TASK_MANAGER) |
| 300 | 298 |
| 299 #if defined(ENABLE_BACKGROUND) |
| 300 BackgroundModeManager::RegisterPrefs(registry); |
| 301 #endif |
| 302 |
| 303 // TODO(bshe): Use !defined(ANDROID_JAVA_UI) once |
| 304 // codereview.chromium.org/1459793002 landed. |
| 305 #if !defined(OS_ANDROID) || defined(USE_AURA) |
| 306 RegisterBrowserPrefs(registry); |
| 307 #endif |
| 308 |
| 301 #if !defined(OS_ANDROID) | 309 #if !defined(OS_ANDROID) |
| 302 BackgroundModeManager::RegisterPrefs(registry); | |
| 303 ChromeTracingDelegate::RegisterPrefs(registry); | 310 ChromeTracingDelegate::RegisterPrefs(registry); |
| 304 RegisterBrowserPrefs(registry); | |
| 305 StartupBrowserCreator::RegisterLocalStatePrefs(registry); | 311 StartupBrowserCreator::RegisterLocalStatePrefs(registry); |
| 306 // The native GCM is used on Android instead. | 312 // The native GCM is used on Android instead. |
| 307 gcm::GCMChannelStatusSyncer::RegisterPrefs(registry); | 313 gcm::GCMChannelStatusSyncer::RegisterPrefs(registry); |
| 308 UpgradeDetector::RegisterPrefs(registry); | 314 UpgradeDetector::RegisterPrefs(registry); |
| 309 #if !defined(OS_CHROMEOS) | 315 #if !defined(OS_CHROMEOS) |
| 310 RegisterDefaultBrowserPromptPrefs(registry); | 316 RegisterDefaultBrowserPromptPrefs(registry); |
| 311 #endif // !defined(OS_CHROMEOS) | 317 #endif // !defined(OS_CHROMEOS) |
| 312 #endif // !defined(OS_ANDROID) | 318 #endif // !defined(OS_ANDROID) |
| 313 | 319 |
| 314 #if defined(OS_CHROMEOS) | 320 #if defined(OS_CHROMEOS) |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 415 #if defined(ENABLE_CONFIGURATION_POLICY) | 421 #if defined(ENABLE_CONFIGURATION_POLICY) |
| 416 policy::URLBlacklistManager::RegisterProfilePrefs(registry); | 422 policy::URLBlacklistManager::RegisterProfilePrefs(registry); |
| 417 #endif | 423 #endif |
| 418 | 424 |
| 419 #if defined(ENABLE_EXTENSIONS) | 425 #if defined(ENABLE_EXTENSIONS) |
| 420 EasyUnlockService::RegisterProfilePrefs(registry); | 426 EasyUnlockService::RegisterProfilePrefs(registry); |
| 421 extensions::ActivityLog::RegisterProfilePrefs(registry); | 427 extensions::ActivityLog::RegisterProfilePrefs(registry); |
| 422 extensions::launch_util::RegisterProfilePrefs(registry); | 428 extensions::launch_util::RegisterProfilePrefs(registry); |
| 423 ExtensionWebUI::RegisterProfilePrefs(registry); | 429 ExtensionWebUI::RegisterProfilePrefs(registry); |
| 424 extensions::ExtensionPrefs::RegisterProfilePrefs(registry); | 430 extensions::ExtensionPrefs::RegisterProfilePrefs(registry); |
| 425 #if !defined(OS_ANDROID) && !defined(OS_IOS) | |
| 426 ToolbarActionsBar::RegisterProfilePrefs(registry); | 431 ToolbarActionsBar::RegisterProfilePrefs(registry); |
| 427 extensions::CopresenceService::RegisterProfilePrefs(registry); | 432 extensions::CopresenceService::RegisterProfilePrefs(registry); |
| 428 #endif | |
| 429 RegisterAnimationPolicyPrefs(registry); | 433 RegisterAnimationPolicyPrefs(registry); |
| 430 #endif // defined(ENABLE_EXTENSIONS) | 434 #endif // defined(ENABLE_EXTENSIONS) |
| 431 | 435 |
| 432 #if defined(ENABLE_NOTIFICATIONS) | 436 #if defined(ENABLE_NOTIFICATIONS) |
| 433 NotifierStateTracker::RegisterProfilePrefs(registry); | 437 NotifierStateTracker::RegisterProfilePrefs(registry); |
| 434 #endif | 438 #endif |
| 435 | 439 |
| 436 #if defined(ENABLE_NOTIFICATIONS) && defined(ENABLE_EXTENSIONS) && \ | 440 #if defined(ENABLE_NOTIFICATIONS) && defined(ENABLE_EXTENSIONS) && \ |
| 437 !defined(OS_ANDROID) | 441 !defined(OS_ANDROID) |
| 438 // The extension welcome notification requires a build that enables extensions | 442 // The extension welcome notification requires a build that enables extensions |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 477 extensions::ExtensionSettingsHandler::RegisterProfilePrefs(registry); | 481 extensions::ExtensionSettingsHandler::RegisterProfilePrefs(registry); |
| 478 extensions::TabsCaptureVisibleTabFunction::RegisterProfilePrefs(registry); | 482 extensions::TabsCaptureVisibleTabFunction::RegisterProfilePrefs(registry); |
| 479 first_run::RegisterProfilePrefs(registry); | 483 first_run::RegisterProfilePrefs(registry); |
| 480 gcm::GCMChannelStatusSyncer::RegisterProfilePrefs(registry); | 484 gcm::GCMChannelStatusSyncer::RegisterProfilePrefs(registry); |
| 481 NewTabUI::RegisterProfilePrefs(registry); | 485 NewTabUI::RegisterProfilePrefs(registry); |
| 482 PepperFlashSettingsManager::RegisterProfilePrefs(registry); | 486 PepperFlashSettingsManager::RegisterProfilePrefs(registry); |
| 483 PinnedTabCodec::RegisterProfilePrefs(registry); | 487 PinnedTabCodec::RegisterProfilePrefs(registry); |
| 484 signin::RegisterProfilePrefs(registry); | 488 signin::RegisterProfilePrefs(registry); |
| 485 #endif | 489 #endif |
| 486 | 490 |
| 487 #if !defined(OS_ANDROID) && !defined(OS_CHROMEOS) | 491 // TODO(bshe): Revisit this once it is more clear on what should we do with |
| 492 // default apps on Aura Android. See crbug.com/564738 |
| 493 #if (!defined(OS_ANDROID) || defined(USE_AURA)) && !defined(OS_CHROMEOS) |
| 488 default_apps::RegisterProfilePrefs(registry); | 494 default_apps::RegisterProfilePrefs(registry); |
| 489 #endif | 495 #endif |
| 490 | 496 |
| 491 #if defined(OS_CHROMEOS) | 497 #if defined(OS_CHROMEOS) |
| 492 chromeos::first_run::RegisterProfilePrefs(registry); | 498 chromeos::first_run::RegisterProfilePrefs(registry); |
| 493 chromeos::file_system_provider::RegisterProfilePrefs(registry); | 499 chromeos::file_system_provider::RegisterProfilePrefs(registry); |
| 494 chromeos::KeyPermissions::RegisterProfilePrefs(registry); | 500 chromeos::KeyPermissions::RegisterProfilePrefs(registry); |
| 495 chromeos::MultiProfileUserController::RegisterProfilePrefs(registry); | 501 chromeos::MultiProfileUserController::RegisterProfilePrefs(registry); |
| 496 chromeos::Preferences::RegisterProfilePrefs(registry); | 502 chromeos::Preferences::RegisterProfilePrefs(registry); |
| 497 chromeos::proxy_config::RegisterProfilePrefs(registry); | 503 chromeos::proxy_config::RegisterProfilePrefs(registry); |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 577 // Added 11/2015. | 583 // Added 11/2015. |
| 578 profile_prefs->ClearPref(kShownAutoLaunchInfobarDeprecated); | 584 profile_prefs->ClearPref(kShownAutoLaunchInfobarDeprecated); |
| 579 #endif | 585 #endif |
| 580 | 586 |
| 581 // Added 12/1015. | 587 // Added 12/1015. |
| 582 profile_prefs->ClearPref(kURLsToRestoreOnStartupOld); | 588 profile_prefs->ClearPref(kURLsToRestoreOnStartupOld); |
| 583 profile_prefs->ClearPref(kRestoreStartupURLsMigrationTime); | 589 profile_prefs->ClearPref(kRestoreStartupURLsMigrationTime); |
| 584 } | 590 } |
| 585 | 591 |
| 586 } // namespace chrome | 592 } // namespace chrome |
| OLD | NEW |