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

Issue 18153007: Add policies to control power management on the Chrome OS login screen (Closed)

Created:
7 years, 5 months ago by bartfab (slow)
Modified:
7 years, 5 months ago
CC:
chromium-reviews, nkostylev+watch_chromium.org, derat+watch_chromium.org, joaodasilva+watch_chromium.org, rginda+watch_chromium.org, oshima+watch_chromium.org, stevenjb+watch_chromium.org, davemoore+watch_chromium.org
Visibility:
Public.

Description

Add policies to control power management on the Chrome OS login screen This CL adds a device policy that controls power management on the login screen. Before this CL, powerd controlled power policy on the login screen, always using built-in defaults. After this CL, Chrome contols power policy by explicitly sending it to powerd whenever the login screen is shown. The built-in defaults match those that powerd used to have but they can now be overridden through device policy. BUG=241794 TEST=Full coverage with new unit and broweser tests Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=212024

Patch Set 1 #

Total comments: 18

Patch Set 2 : Comments addressed. #

Patch Set 3 : Removed some very verbose comments. #

Total comments: 2

Patch Set 4 : Nit addressed. #

Total comments: 24

Patch Set 5 : Comments addressed. Rebased. #

Total comments: 4

Patch Set 6 : Nits addressed. #

Patch Set 7 : Replaced the 10 new policies with a single new JSON policy. #

Patch Set 8 : Style improvements. #

Total comments: 16

Patch Set 9 : Comments addressed. #

Total comments: 6

Patch Set 10 : Comments addressed and rebased. #

Patch Set 11 : Removed spurious blank line. #

Patch Set 12 : Correct example in policy_templates.json. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1866 lines, -382 lines) Patch
M chrome/app/generated_resources.grd View 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/app/policy/policy_templates.json View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +101 lines, -1 line 0 comments Download
M chrome/browser/chromeos/chrome_browser_main_chromeos.h View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/chrome_browser_main_chromeos.cc View 1 2 3 4 5 6 7 8 9 4 chunks +6 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/policy/configuration_policy_handler_chromeos.h View 1 2 3 4 5 6 1 chunk +19 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/policy/configuration_policy_handler_chromeos.cc View 1 2 3 4 5 6 7 8 9 2 chunks +31 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/policy/configuration_policy_handler_chromeos_unittest.cc View 1 2 3 4 5 6 7 8 9 2 chunks +76 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/policy/device_policy_decoder_chromeos.cc View 1 2 3 4 5 6 7 8 9 1 chunk +13 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/policy/login_profile_policy_provider.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/chromeos/policy/login_profile_policy_provider.cc View 1 2 3 4 5 6 7 8 9 4 chunks +81 lines, -16 lines 0 comments Download
A chrome/browser/chromeos/policy/login_screen_power_management_policy.h View 1 2 3 4 5 6 7 8 1 chunk +61 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/policy/login_screen_power_management_policy.cc View 1 2 3 4 5 6 7 8 9 1 chunk +196 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/policy/login_screen_power_management_policy_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +187 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/policy/power_policy_browsertest.cc View 1 2 3 4 5 6 7 8 9 3 chunks +317 lines, -138 lines 0 comments Download
A chrome/browser/chromeos/power/power_prefs.h View 1 2 3 4 1 chunk +68 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/power/power_prefs.cc View 1 2 3 4 5 6 7 8 9 1 chunk +267 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/power/power_prefs_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +250 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/preferences.h View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -22 lines 0 comments Download
M chrome/browser/chromeos/preferences.cc View 1 2 3 4 5 6 7 8 9 5 chunks +0 lines, -171 lines 0 comments Download
M chrome/browser/policy/configuration_policy_handler.h View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/browser/policy/configuration_policy_handler.cc View 1 2 3 4 5 6 7 8 9 3 chunks +17 lines, -17 lines 0 comments Download
M chrome/browser/policy/configuration_policy_handler_list.cc View 1 2 3 4 5 6 3 chunks +11 lines, -3 lines 0 comments Download
M chrome/browser/policy/mock_policy_service.h View 1 2 3 4 1 chunk +12 lines, -1 line 0 comments Download
M chrome/browser/policy/mock_policy_service.cc View 1 2 3 4 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/browser/policy/policy_service_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 2 chunks +1 line, -9 lines 0 comments Download
M chrome/browser/policy/proto/chromeos/chrome_device_policy.proto View 1 2 3 4 5 6 7 8 9 10 2 chunks +96 lines, -0 lines 0 comments Download
M chrome/browser/prefs/browser_prefs.cc View 1 2 3 4 5 6 7 8 9 2 chunks +7 lines, -0 lines 0 comments Download
M chrome/chrome_browser_chromeos.gypi View 1 2 3 4 5 6 7 8 9 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/test/base/testing_profile_manager.h View 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/test/base/testing_profile_manager.cc View 2 chunks +5 lines, -1 line 0 comments Download
M chrome/test/data/policy/policy_test_cases.json View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -0 lines 0 comments Download
M chromeos/dbus/power_policy_controller.h View 2 chunks +5 lines, -0 lines 0 comments Download
M chromeos/dbus/power_policy_controller.cc View 3 chunks +11 lines, -2 lines 0 comments Download

Messages

Total messages: 27 (0 generated)
bartfab (slow)
Hi Daniel, Could you please review the */chromeos/* parts of this CL? Hi Mattias, Could ...
7 years, 5 months ago (2013-06-28 16:14:16 UTC) #1
Daniel Erat
LGTM with some comments for the chrome os parts https://codereview.chromium.org/18153007/diff/1/chrome/browser/chromeos/power/power_prefs.cc File chrome/browser/chromeos/power/power_prefs.cc (right): https://codereview.chromium.org/18153007/diff/1/chrome/browser/chromeos/power/power_prefs.cc#newcode92 chrome/browser/chromeos/power/power_prefs.cc:92: ...
7 years, 5 months ago (2013-06-28 17:05:09 UTC) #2
sky
LGTM
7 years, 5 months ago (2013-06-28 18:06:20 UTC) #3
bartfab (slow)
https://codereview.chromium.org/18153007/diff/1/chrome/browser/chromeos/power/power_prefs.cc File chrome/browser/chromeos/power/power_prefs.cc (right): https://codereview.chromium.org/18153007/diff/1/chrome/browser/chromeos/power/power_prefs.cc#newcode92 chrome/browser/chromeos/power/power_prefs.cc:92: for_signin_profile ? PowerPolicyController::ACTION_SHUT_DOWN : On 2013/06/28 17:05:09, Daniel Erat ...
7 years, 5 months ago (2013-07-01 12:32:58 UTC) #4
Daniel Erat
lgtm https://codereview.chromium.org/18153007/diff/1/chrome/browser/chromeos/power/power_prefs.cc File chrome/browser/chromeos/power/power_prefs.cc (right): https://codereview.chromium.org/18153007/diff/1/chrome/browser/chromeos/power/power_prefs.cc#newcode113 chrome/browser/chromeos/power/power_prefs.cc:113: prefs::kEnableScreenLock, On 2013/07/01 12:32:59, bartfab wrote: > On ...
7 years, 5 months ago (2013-07-01 14:29:05 UTC) #5
bartfab (slow)
https://chromiumcodereview.appspot.com/18153007/diff/1/chromeos/dbus/power_policy_controller.cc File chromeos/dbus/power_policy_controller.cc (right): https://chromiumcodereview.appspot.com/18153007/diff/1/chromeos/dbus/power_policy_controller.cc#newcode160 chromeos/dbus/power_policy_controller.cc:160: lock_ms < delays->idle_ms()) { On 2013/07/01 14:29:05, Daniel Erat ...
7 years, 5 months ago (2013-07-01 14:53:07 UTC) #6
Daniel Erat
https://chromiumcodereview.appspot.com/18153007/diff/1/chromeos/dbus/power_policy_controller.cc File chromeos/dbus/power_policy_controller.cc (right): https://chromiumcodereview.appspot.com/18153007/diff/1/chromeos/dbus/power_policy_controller.cc#newcode160 chromeos/dbus/power_policy_controller.cc:160: lock_ms < delays->idle_ms()) { On 2013/07/01 14:53:08, bartfab wrote: ...
7 years, 5 months ago (2013-07-01 14:53:52 UTC) #7
Mattias Nissler (ping if slow)
https://codereview.chromium.org/18153007/diff/26002/chrome/browser/chromeos/policy/power_policy_browsertest.cc File chrome/browser/chromeos/policy/power_policy_browsertest.cc (right): https://codereview.chromium.org/18153007/diff/26002/chrome/browser/chromeos/policy/power_policy_browsertest.cc#newcode66 chrome/browser/chromeos/policy/power_policy_browsertest.cc:66: class MockPolicyServiceObserver : public PolicyService::Observer { There's a copy ...
7 years, 5 months ago (2013-07-03 16:52:17 UTC) #8
bartfab (slow)
https://chromiumcodereview.appspot.com/18153007/diff/26002/chrome/browser/chromeos/policy/power_policy_browsertest.cc File chrome/browser/chromeos/policy/power_policy_browsertest.cc (right): https://chromiumcodereview.appspot.com/18153007/diff/26002/chrome/browser/chromeos/policy/power_policy_browsertest.cc#newcode66 chrome/browser/chromeos/policy/power_policy_browsertest.cc:66: class MockPolicyServiceObserver : public PolicyService::Observer { On 2013/07/03 16:52:18, ...
7 years, 5 months ago (2013-07-03 19:11:03 UTC) #9
Mattias Nissler (ping if slow)
LGTM w/ nits and after addressing the RefreshPolicies comment. https://codereview.chromium.org/18153007/diff/26002/chrome/browser/chromeos/policy/power_policy_browsertest.cc File chrome/browser/chromeos/policy/power_policy_browsertest.cc (right): https://codereview.chromium.org/18153007/diff/26002/chrome/browser/chromeos/policy/power_policy_browsertest.cc#newcode182 chrome/browser/chromeos/policy/power_policy_browsertest.cc:182: ...
7 years, 5 months ago (2013-07-04 11:53:04 UTC) #10
bartfab (slow)
https://codereview.chromium.org/18153007/diff/26002/chrome/browser/chromeos/policy/power_policy_browsertest.cc File chrome/browser/chromeos/policy/power_policy_browsertest.cc (right): https://codereview.chromium.org/18153007/diff/26002/chrome/browser/chromeos/policy/power_policy_browsertest.cc#newcode182 chrome/browser/chromeos/policy/power_policy_browsertest.cc:182: MockPolicyServiceObserver observer; On 2013/07/04 11:53:04, Mattias Nissler wrote: > ...
7 years, 5 months ago (2013-07-05 13:52:57 UTC) #11
Mattias Nissler (ping if slow)
LGTM
7 years, 5 months ago (2013-07-05 14:26:05 UTC) #12
bartfab (slow)
Hi Mattias, Could you take another look? I replaced the 10 new policies with a ...
7 years, 5 months ago (2013-07-08 14:04:24 UTC) #13
Mattias Nissler (ping if slow)
Reading the code, I felt that we'd be better off if we had just a ...
7 years, 5 months ago (2013-07-08 17:36:57 UTC) #14
bartfab (slow)
Hi Mattias, Please take another look. https://codereview.chromium.org/18153007/diff/79001/chrome/app/policy/policy_templates.json File chrome/app/policy/policy_templates.json (right): https://codereview.chromium.org/18153007/diff/79001/chrome/app/policy/policy_templates.json#newcode4509 chrome/app/policy/policy_templates.json:4509: This policy lets ...
7 years, 5 months ago (2013-07-09 10:02:33 UTC) #15
Mattias Nissler (ping if slow)
LGTM w/ nits. https://codereview.chromium.org/18153007/diff/88001/chrome/browser/chromeos/policy/login_screen_power_management_policy.cc File chrome/browser/chromeos/policy/login_screen_power_management_policy.cc (right): https://codereview.chromium.org/18153007/diff/88001/chrome/browser/chromeos/policy/login_screen_power_management_policy.cc#newcode19 chrome/browser/chromeos/policy/login_screen_power_management_policy.cc:19: const char kScreenDimDelayAC[] = "AC.Delays.ScreenDim"; nit: ...
7 years, 5 months ago (2013-07-10 09:45:13 UTC) #16
bartfab (slow)
https://chromiumcodereview.appspot.com/18153007/diff/88001/chrome/browser/chromeos/policy/login_screen_power_management_policy.cc File chrome/browser/chromeos/policy/login_screen_power_management_policy.cc (right): https://chromiumcodereview.appspot.com/18153007/diff/88001/chrome/browser/chromeos/policy/login_screen_power_management_policy.cc#newcode19 chrome/browser/chromeos/policy/login_screen_power_management_policy.cc:19: const char kScreenDimDelayAC[] = "AC.Delays.ScreenDim"; On 2013/07/10 09:45:13, Mattias ...
7 years, 5 months ago (2013-07-16 11:07:34 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bartfab@chromium.org/18153007/128002
7 years, 5 months ago (2013-07-16 11:10:18 UTC) #18
commit-bot: I haz the power
Retried try job too often on linux_aura for step(s) unit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_aura&number=60101
7 years, 5 months ago (2013-07-16 12:59:53 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bartfab@chromium.org/18153007/128002
7 years, 5 months ago (2013-07-16 13:06:24 UTC) #20
commit-bot: I haz the power
Retried try job too often on linux_aura for step(s) content_browsertests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_aura&number=60178
7 years, 5 months ago (2013-07-16 14:52:36 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bartfab@chromium.org/18153007/128002
7 years, 5 months ago (2013-07-16 14:59:34 UTC) #22
commit-bot: I haz the power
Retried try job too often on linux_aura for step(s) unit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_aura&number=60248
7 years, 5 months ago (2013-07-16 15:34:36 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bartfab@chromium.org/18153007/128002
7 years, 5 months ago (2013-07-16 21:22:45 UTC) #24
commit-bot: I haz the power
Retried try job too often on win7_aura for step(s) content_browsertests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win7_aura&number=59957
7 years, 5 months ago (2013-07-17 00:53:31 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bartfab@chromium.org/18153007/128002
7 years, 5 months ago (2013-07-17 08:10:03 UTC) #26
commit-bot: I haz the power
7 years, 5 months ago (2013-07-17 13:44:45 UTC) #27
Message was sent while issue was closed.
Change committed as 212024

Powered by Google App Engine
This is Rietveld 408576698