| 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 "apps/prefs.h" | 7 #include "apps/prefs.h" |
| 8 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
| 9 #include "base/prefs/pref_registry_simple.h" | 9 #include "base/prefs/pref_registry_simple.h" |
| 10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 #include "chrome/browser/chromeos/login/default_pinned_apps_field_trial.h" | 130 #include "chrome/browser/chromeos/login/default_pinned_apps_field_trial.h" |
| 131 #include "chrome/browser/chromeos/login/login_utils.h" | 131 #include "chrome/browser/chromeos/login/login_utils.h" |
| 132 #include "chrome/browser/chromeos/login/oauth2_login_manager.h" | 132 #include "chrome/browser/chromeos/login/oauth2_login_manager.h" |
| 133 #include "chrome/browser/chromeos/login/startup_utils.h" | 133 #include "chrome/browser/chromeos/login/startup_utils.h" |
| 134 #include "chrome/browser/chromeos/login/user_image_manager.h" | 134 #include "chrome/browser/chromeos/login/user_image_manager.h" |
| 135 #include "chrome/browser/chromeos/login/user_manager.h" | 135 #include "chrome/browser/chromeos/login/user_manager.h" |
| 136 #include "chrome/browser/chromeos/login/wallpaper_manager.h" | 136 #include "chrome/browser/chromeos/login/wallpaper_manager.h" |
| 137 #include "chrome/browser/chromeos/policy/auto_enrollment_client.h" | 137 #include "chrome/browser/chromeos/policy/auto_enrollment_client.h" |
| 138 #include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h" | 138 #include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h" |
| 139 #include "chrome/browser/chromeos/policy/device_status_collector.h" | 139 #include "chrome/browser/chromeos/policy/device_status_collector.h" |
| 140 #include "chrome/browser/chromeos/power/power_prefs.h" |
| 140 #include "chrome/browser/chromeos/preferences.h" | 141 #include "chrome/browser/chromeos/preferences.h" |
| 141 #include "chrome/browser/chromeos/proxy_config_service_impl.h" | 142 #include "chrome/browser/chromeos/proxy_config_service_impl.h" |
| 142 #include "chrome/browser/chromeos/settings/device_oauth2_token_service.h" | 143 #include "chrome/browser/chromeos/settings/device_oauth2_token_service.h" |
| 143 #include "chrome/browser/chromeos/settings/device_settings_cache.h" | 144 #include "chrome/browser/chromeos/settings/device_settings_cache.h" |
| 144 #include "chrome/browser/chromeos/status/data_promo_notification.h" | 145 #include "chrome/browser/chromeos/status/data_promo_notification.h" |
| 145 #include "chrome/browser/chromeos/system/automatic_reboot_manager.h" | 146 #include "chrome/browser/chromeos/system/automatic_reboot_manager.h" |
| 146 #include "chrome/browser/extensions/api/enterprise_platform_keys_private/enterpr
ise_platform_keys_private_api.h" | 147 #include "chrome/browser/extensions/api/enterprise_platform_keys_private/enterpr
ise_platform_keys_private_api.h" |
| 147 #else | 148 #else |
| 148 #include "chrome/browser/extensions/default_apps.h" | 149 #include "chrome/browser/extensions/default_apps.h" |
| 149 #endif | 150 #endif |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 // Prefs registered only for migration (clearing or moving to a new | 391 // Prefs registered only for migration (clearing or moving to a new |
| 391 // key) go here. | 392 // key) go here. |
| 392 registry->RegisterDictionaryPref( | 393 registry->RegisterDictionaryPref( |
| 393 kBackupPref, | 394 kBackupPref, |
| 394 new DictionaryValue(), | 395 new DictionaryValue(), |
| 395 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 396 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 396 } | 397 } |
| 397 | 398 |
| 398 void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { | 399 void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { |
| 399 RegisterProfilePrefs(registry); | 400 RegisterProfilePrefs(registry); |
| 401 |
| 402 #if defined(OS_CHROMEOS) |
| 403 chromeos::PowerPrefs::RegisterUserProfilePrefs(registry); |
| 404 #endif |
| 400 } | 405 } |
| 401 | 406 |
| 402 #if defined(OS_CHROMEOS) | 407 #if defined(OS_CHROMEOS) |
| 403 void RegisterLoginProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { | 408 void RegisterLoginProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { |
| 404 RegisterProfilePrefs(registry); | 409 RegisterProfilePrefs(registry); |
| 410 |
| 411 chromeos::PowerPrefs::RegisterLoginProfilePrefs(registry); |
| 405 } | 412 } |
| 406 #endif | 413 #endif |
| 407 | 414 |
| 408 void MigrateUserPrefs(Profile* profile) { | 415 void MigrateUserPrefs(Profile* profile) { |
| 409 PrefService* prefs = profile->GetPrefs(); | 416 PrefService* prefs = profile->GetPrefs(); |
| 410 | 417 |
| 411 // Cleanup prefs from now-removed protector feature. | 418 // Cleanup prefs from now-removed protector feature. |
| 412 prefs->ClearPref(kBackupPref); | 419 prefs->ClearPref(kBackupPref); |
| 413 | 420 |
| 414 PrefsTabHelper::MigrateUserPrefs(prefs); | 421 PrefsTabHelper::MigrateUserPrefs(prefs); |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 481 } | 488 } |
| 482 local_state->ClearPref(prefs::kLastPromptedGoogleURL); | 489 local_state->ClearPref(prefs::kLastPromptedGoogleURL); |
| 483 | 490 |
| 484 current_version |= GOOGLE_URL_TRACKER_PREFS; | 491 current_version |= GOOGLE_URL_TRACKER_PREFS; |
| 485 local_state->SetInteger(prefs::kMultipleProfilePrefMigration, | 492 local_state->SetInteger(prefs::kMultipleProfilePrefMigration, |
| 486 current_version); | 493 current_version); |
| 487 } | 494 } |
| 488 } | 495 } |
| 489 | 496 |
| 490 } // namespace chrome | 497 } // namespace chrome |
| OLD | NEW |