Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(763)

Side by Side Diff: chrome/browser/prefs/browser_prefs.cc

Issue 18153007: Add policies to control power management on the Chrome OS login screen (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments addressed. Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 // Prefs registered only for migration (clearing or moving to a new 384 // Prefs registered only for migration (clearing or moving to a new
384 // key) go here. 385 // key) go here.
385 registry->RegisterDictionaryPref( 386 registry->RegisterDictionaryPref(
386 kBackupPref, 387 kBackupPref,
387 new DictionaryValue(), 388 new DictionaryValue(),
388 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 389 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
389 } 390 }
390 391
391 void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { 392 void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
392 RegisterProfilePrefs(registry); 393 RegisterProfilePrefs(registry);
394
395 #if defined(OS_CHROMEOS)
396 chromeos::PowerPrefs::RegisterUserProfilePrefs(registry);
397 #endif
393 } 398 }
394 399
395 #if defined(OS_CHROMEOS) 400 #if defined(OS_CHROMEOS)
396 void RegisterLoginProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { 401 void RegisterLoginProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
397 RegisterProfilePrefs(registry); 402 RegisterProfilePrefs(registry);
403
404 chromeos::PowerPrefs::RegisterLoginProfilePrefs(registry);
398 } 405 }
399 #endif 406 #endif
400 407
401 void MigrateUserPrefs(Profile* profile) { 408 void MigrateUserPrefs(Profile* profile) {
402 PrefService* prefs = profile->GetPrefs(); 409 PrefService* prefs = profile->GetPrefs();
403 410
404 // Cleanup prefs from now-removed protector feature. 411 // Cleanup prefs from now-removed protector feature.
405 prefs->ClearPref(kBackupPref); 412 prefs->ClearPref(kBackupPref);
406 413
407 PrefsTabHelper::MigrateUserPrefs(prefs); 414 PrefsTabHelper::MigrateUserPrefs(prefs);
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 } 481 }
475 local_state->ClearPref(prefs::kLastPromptedGoogleURL); 482 local_state->ClearPref(prefs::kLastPromptedGoogleURL);
476 483
477 current_version |= GOOGLE_URL_TRACKER_PREFS; 484 current_version |= GOOGLE_URL_TRACKER_PREFS;
478 local_state->SetInteger(prefs::kMultipleProfilePrefMigration, 485 local_state->SetInteger(prefs::kMultipleProfilePrefMigration,
479 current_version); 486 current_version);
480 } 487 }
481 } 488 }
482 489
483 } // namespace chrome 490 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698