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

Unified Diff: chrome/browser/policy/configuration_policy_handler_list.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: Correct example in policy_templates.json. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/policy/configuration_policy_handler.cc ('k') | chrome/browser/policy/mock_policy_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/policy/configuration_policy_handler_list.cc
diff --git a/chrome/browser/policy/configuration_policy_handler_list.cc b/chrome/browser/policy/configuration_policy_handler_list.cc
index c0b3fc5f99e508035988c97f426f8438acaabb5f..582e076dc81f0ab65875c1372412dccdfbdb72fb 100644
--- a/chrome/browser/policy/configuration_policy_handler_list.cc
+++ b/chrome/browser/policy/configuration_policy_handler_list.cc
@@ -20,6 +20,7 @@
#if defined(OS_CHROMEOS)
#include "ash/magnifier/magnifier_constants.h"
#include "chrome/browser/chromeos/policy/configuration_policy_handler_chromeos.h"
+#include "chromeos/dbus/power_policy_controller.h"
#endif // defined(OS_CHROMEOS)
namespace policy {
@@ -477,6 +478,7 @@ ConfigurationPolicyHandlerList::ConfigurationPolicyHandlerList() {
handlers_.push_back(NetworkConfigurationPolicyHandler::CreateForUserPolicy());
handlers_.push_back(new PinnedLauncherAppsPolicyHandler());
handlers_.push_back(new ScreenMagnifierPolicyHandler());
+ handlers_.push_back(new LoginScreenPowerManagementPolicyHandler);
handlers_.push_back(
new IntRangePolicyHandler(
@@ -532,17 +534,23 @@ ConfigurationPolicyHandlerList::ConfigurationPolicyHandlerList() {
new IntRangePolicyHandler(
key::kIdleActionAC,
prefs::kPowerAcIdleAction,
- 0, 3, false));
+ chromeos::PowerPolicyController::ACTION_SUSPEND,
+ chromeos::PowerPolicyController::ACTION_DO_NOTHING,
+ false));
handlers_.push_back(
new IntRangePolicyHandler(
key::kIdleActionBattery,
prefs::kPowerBatteryIdleAction,
- 0, 3, false));
+ chromeos::PowerPolicyController::ACTION_SUSPEND,
+ chromeos::PowerPolicyController::ACTION_DO_NOTHING,
+ false));
handlers_.push_back(
new IntRangePolicyHandler(
key::kLidCloseAction,
prefs::kPowerLidClosedAction,
- 0, 3, false));
+ chromeos::PowerPolicyController::ACTION_SUSPEND,
+ chromeos::PowerPolicyController::ACTION_DO_NOTHING,
+ false));
handlers_.push_back(
new IntPercentageToDoublePolicyHandler(
key::kPresentationScreenDimDelayScale,
« no previous file with comments | « chrome/browser/policy/configuration_policy_handler.cc ('k') | chrome/browser/policy/mock_policy_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698