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

Issue 14134004: chromeos: Move default power management policy into Chrome. (Closed)

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

Description

chromeos: Move default power management policy into Chrome. This updates PowerPolicyController to always send the power management policy contained in Chrome's preferences to the power manager, rather than only sending prefs that have been changed from their defaults. Note that this currently only takes effect once the user has logged in. It also makes the screen get locked at the same time as when it's turned off when the "Require password to wake from sleep" setting is enabled. BUG=225730, 225969 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=195376

Patch Set 1 #

Patch Set 2 : add tests #

Patch Set 3 : change char pointers in PrefNames to std::strings #

Total comments: 12

Patch Set 4 : move pref-watching back out of PowerPolicyController #

Total comments: 4

Patch Set 5 : apply review feedback #

Patch Set 6 : move constructor to .cc file #

Patch Set 7 : update policy tests #

Total comments: 1

Patch Set 8 : include reason in debug string #

Total comments: 2

Patch Set 9 : apply review feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+370 lines, -313 lines) Patch
M chrome/browser/chromeos/policy/power_policy_browsertest.cc View 1 2 3 4 5 6 7 8 4 chunks +125 lines, -137 lines 0 comments Download
M chrome/browser/chromeos/preferences.cc View 1 2 3 4 5 chunks +33 lines, -28 lines 0 comments Download
M chromeos/dbus/power_policy_controller.h View 1 2 3 4 5 6 3 chunks +33 lines, -25 lines 0 comments Download
M chromeos/dbus/power_policy_controller.cc View 1 2 3 4 5 6 7 4 chunks +101 lines, -110 lines 0 comments Download
M chromeos/dbus/power_policy_controller_unittest.cc View 1 2 3 4 5 6 4 chunks +78 lines, -13 lines 0 comments Download

Messages

Total messages: 23 (0 generated)
Daniel Erat
7 years, 8 months ago (2013-04-16 16:17:31 UTC) #1
bartfab (slow)
https://codereview.chromium.org/14134004/diff/3007/chromeos/dbus/power_policy_controller.cc File chromeos/dbus/power_policy_controller.cc (right): https://codereview.chromium.org/14134004/diff/3007/chromeos/dbus/power_policy_controller.cc#newcode145 chromeos/dbus/power_policy_controller.cc:145: if (enable_screen_lock_pref_.GetValue() && delays->screen_off_ms() > 0 && Nit: Add ...
7 years, 8 months ago (2013-04-17 11:51:12 UTC) #2
Daniel Erat
https://codereview.chromium.org/14134004/diff/3007/chromeos/dbus/power_policy_controller.h File chromeos/dbus/power_policy_controller.h (right): https://codereview.chromium.org/14134004/diff/3007/chromeos/dbus/power_policy_controller.h#newcode100 chromeos/dbus/power_policy_controller.h:100: PrefNames pref_names_; On 2013/04/17 11:51:12, bartfab wrote: > I ...
7 years, 8 months ago (2013-04-17 13:52:13 UTC) #3
Daniel Erat
PTAL https://codereview.chromium.org/14134004/diff/3007/chromeos/dbus/power_policy_controller.cc File chromeos/dbus/power_policy_controller.cc (right): https://codereview.chromium.org/14134004/diff/3007/chromeos/dbus/power_policy_controller.cc#newcode145 chromeos/dbus/power_policy_controller.cc:145: if (enable_screen_lock_pref_.GetValue() && delays->screen_off_ms() > 0 && On ...
7 years, 8 months ago (2013-04-18 03:59:15 UTC) #4
bartfab (slow)
Thanks for moving the pref management back to chrome. I think this is a lot ...
7 years, 8 months ago (2013-04-18 14:17:22 UTC) #5
Daniel Erat
https://codereview.chromium.org/14134004/diff/12001/chromeos/dbus/power_policy_controller.cc File chromeos/dbus/power_policy_controller.cc (right): https://codereview.chromium.org/14134004/diff/12001/chromeos/dbus/power_policy_controller.cc#newcode8 chromeos/dbus/power_policy_controller.cc:8: #include "base/values.h" On 2013/04/18 14:17:22, bartfab wrote: > Nit: ...
7 years, 8 months ago (2013-04-18 14:37:10 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/derat@chromium.org/14134004/18001
7 years, 8 months ago (2013-04-18 18:37:02 UTC) #7
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 8 months ago (2013-04-18 19:09:00 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/derat@chromium.org/14134004/37001
7 years, 8 months ago (2013-04-18 19:13:08 UTC) #9
Daniel Erat
I'm having a miserable time trying to update PowerPolicyBrowserTest for this change. It makes the ...
7 years, 8 months ago (2013-04-18 21:09:40 UTC) #10
commit-bot: I haz the power
Retried try job too often on linux_chromeos for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_chromeos&number=104368
7 years, 8 months ago (2013-04-18 21:15:17 UTC) #11
Daniel Erat
PTAL https://codereview.chromium.org/14134004/diff/44001/chrome/browser/chromeos/policy/power_policy_browsertest.cc File chrome/browser/chromeos/policy/power_policy_browsertest.cc (right): https://codereview.chromium.org/14134004/diff/44001/chrome/browser/chromeos/policy/power_policy_browsertest.cc#newcode125 chrome/browser/chromeos/policy/power_policy_browsertest.cc:125: power_management_policy.mutable_ac_delays()->set_idle_ms(9000); Changing these to different values for each ...
7 years, 8 months ago (2013-04-19 14:22:36 UTC) #12
bartfab (slow)
lgtm https://codereview.chromium.org/14134004/diff/51002/chrome/browser/chromeos/policy/power_policy_browsertest.cc File chrome/browser/chromeos/policy/power_policy_browsertest.cc (right): https://codereview.chromium.org/14134004/diff/51002/chrome/browser/chromeos/policy/power_policy_browsertest.cc#newcode73 chrome/browser/chromeos/policy/power_policy_browsertest.cc:73: .WillRepeatedly(Return()); Nit: It should be sufficient to say ...
7 years, 8 months ago (2013-04-19 16:28:48 UTC) #13
Daniel Erat
https://codereview.chromium.org/14134004/diff/51002/chrome/browser/chromeos/policy/power_policy_browsertest.cc File chrome/browser/chromeos/policy/power_policy_browsertest.cc (right): https://codereview.chromium.org/14134004/diff/51002/chrome/browser/chromeos/policy/power_policy_browsertest.cc#newcode73 chrome/browser/chromeos/policy/power_policy_browsertest.cc:73: .WillRepeatedly(Return()); On 2013/04/19 16:28:48, bartfab wrote: > Nit: It ...
7 years, 8 months ago (2013-04-20 01:46:21 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/derat@chromium.org/14134004/56001
7 years, 8 months ago (2013-04-20 01:46:56 UTC) #15
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 8 months ago (2013-04-20 02:06:38 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/derat@chromium.org/14134004/56001
7 years, 8 months ago (2013-04-20 02:08:41 UTC) #17
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 8 months ago (2013-04-20 02:14:10 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/derat@chromium.org/14134004/56001
7 years, 8 months ago (2013-04-20 02:35:28 UTC) #19
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 8 months ago (2013-04-20 02:45:16 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/derat@chromium.org/14134004/56001
7 years, 8 months ago (2013-04-20 03:15:24 UTC) #21
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 8 months ago (2013-04-20 03:21:12 UTC) #22
Daniel Erat
7 years, 8 months ago (2013-04-20 04:03:02 UTC) #23
Message was sent while issue was closed.
Committed patchset #9 manually as r195376 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698