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