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

Issue 12186010: chromeos: Add power management policy prefs. (Closed)

Created:
7 years, 10 months ago by Daniel Erat
Modified:
7 years, 10 months ago
CC:
chromium-reviews, oshima+watch_chromium.org, stevenjb+watch_chromium.org, nkostylev+watch_chromium.org, davemoore+watch_chromium.org
Visibility:
Public.

Description

chromeos: Add power management policy prefs. This adds various prefs related to power management. A new PowerPolicyController class is responsible for sending them to powerd. BUG=173849, chromium-os:38281 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=181070

Patch Set 1 #

Total comments: 27

Patch Set 2 : pass prefs directly to PowerPolicyController #

Total comments: 10

Patch Set 3 : update comments and add missing include #

Patch Set 4 : fix compilation :-/ #

Patch Set 5 : merge #

Patch Set 6 : fix compilation of mocks, i think #

Total comments: 8

Patch Set 7 : merge #

Patch Set 8 : resend policy if power manager restarts #

Patch Set 9 : fix embarrassing precedence issue in macro #

Patch Set 10 : fix crash at shutdown, hopefully #

Patch Set 11 : fix observer registration and bool prefs #

Unified diffs Side-by-side diffs Delta from patch set Stats (+495 lines, -5 lines) Patch
M chrome/browser/chromeos/preferences.h View 1 1 chunk +15 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/preferences.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +103 lines, -0 lines 0 comments Download
M chrome/common/pref_names.h View 1 2 3 4 1 chunk +13 lines, -0 lines 0 comments Download
M chrome/common/pref_names.cc View 1 2 3 4 1 chunk +36 lines, -0 lines 0 comments Download
M chromeos/chromeos.gyp View 1 2 3 4 5 3 chunks +4 lines, -0 lines 0 comments Download
M chromeos/dbus/dbus_thread_manager.h View 2 chunks +2 lines, -0 lines 0 comments Download
M chromeos/dbus/dbus_thread_manager.cc View 1 2 3 4 5 6 7 8 9 10 5 chunks +15 lines, -2 lines 0 comments Download
M chromeos/dbus/mock_dbus_thread_manager.h View 1 2 3 4 5 6 7 8 9 10 4 chunks +7 lines, -2 lines 0 comments Download
M chromeos/dbus/mock_dbus_thread_manager.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +6 lines, -1 line 0 comments Download
M chromeos/dbus/mock_dbus_thread_manager_without_gmock.h View 1 chunk +1 line, -0 lines 0 comments Download
M chromeos/dbus/mock_dbus_thread_manager_without_gmock.cc View 1 chunk +6 lines, -0 lines 0 comments Download
M chromeos/dbus/mock_power_manager_client.h View 1 chunk +1 line, -0 lines 0 comments Download
M chromeos/dbus/mock_power_manager_client.cc View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M chromeos/dbus/power_manager_client.h View 1 2 3 4 5 6 2 chunks +8 lines, -0 lines 0 comments Download
M chromeos/dbus/power_manager_client.cc View 1 2 3 4 5 6 4 chunks +20 lines, -0 lines 0 comments Download
A chromeos/dbus/power_policy_controller.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +79 lines, -0 lines 0 comments Download
A chromeos/dbus/power_policy_controller.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +178 lines, -0 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
Daniel Erat
I haven't tested this at all yet, but I figured I'd send it your way ...
7 years, 10 months ago (2013-02-04 03:10:07 UTC) #1
bartfab (slow)
https://codereview.chromium.org/12186010/diff/1/chrome/browser/chromeos/preferences.cc File chrome/browser/chromeos/preferences.cc (right): https://codereview.chromium.org/12186010/diff/1/chrome/browser/chromeos/preferences.cc#newcode303 chrome/browser/chromeos/preferences.cc:303: chromeos::PowerPolicyController::kUnsetDelayMs, You do not need magic value constants such ...
7 years, 10 months ago (2013-02-04 10:04:35 UTC) #2
Daniel Erat
https://codereview.chromium.org/12186010/diff/1/chrome/browser/chromeos/preferences.cc File chrome/browser/chromeos/preferences.cc (right): https://codereview.chromium.org/12186010/diff/1/chrome/browser/chromeos/preferences.cc#newcode303 chrome/browser/chromeos/preferences.cc:303: chromeos::PowerPolicyController::kUnsetDelayMs, On 2013/02/04 10:04:35, bartfab wrote: > You do ...
7 years, 10 months ago (2013-02-04 13:35:45 UTC) #3
bartfab (slow)
https://codereview.chromium.org/12186010/diff/1/chrome/browser/chromeos/preferences.cc File chrome/browser/chromeos/preferences.cc (right): https://codereview.chromium.org/12186010/diff/1/chrome/browser/chromeos/preferences.cc#newcode303 chrome/browser/chromeos/preferences.cc:303: chromeos::PowerPolicyController::kUnsetDelayMs, On 2013/02/04 13:35:45, Daniel Erat wrote: > On ...
7 years, 10 months ago (2013-02-04 14:43:51 UTC) #4
Daniel Erat
Thanks, uploaded a new version.
7 years, 10 months ago (2013-02-04 16:30:23 UTC) #5
bartfab (slow)
https://codereview.chromium.org/12186010/diff/18/chrome/common/pref_names.cc File chrome/common/pref_names.cc (right): https://codereview.chromium.org/12186010/diff/18/chrome/common/pref_names.cc#newcode832 chrome/common/pref_names.cc:832: // kPowerAcIdleDelayMs); -1 instructs the power manager to use ...
7 years, 10 months ago (2013-02-04 17:20:05 UTC) #6
Daniel Erat
Thanks (and sorry for missing all those comments). https://codereview.chromium.org/12186010/diff/18/chrome/common/pref_names.cc File chrome/common/pref_names.cc (right): https://codereview.chromium.org/12186010/diff/18/chrome/common/pref_names.cc#newcode832 chrome/common/pref_names.cc:832: // ...
7 years, 10 months ago (2013-02-04 17:31:59 UTC) #7
bartfab (slow)
Loking pretty good. I am adding Mattias to get another opinion on whether we need ...
7 years, 10 months ago (2013-02-04 17:46:36 UTC) #8
Mattias Nissler (ping if slow)
Looks reasonable to me too. I'm actually not too concerned about the "policy" name clash ...
7 years, 10 months ago (2013-02-05 13:16:18 UTC) #9
Daniel Erat
https://codereview.chromium.org/12186010/diff/17001/chromeos/dbus/mock_power_manager_client.cc File chromeos/dbus/mock_power_manager_client.cc (right): https://codereview.chromium.org/12186010/diff/17001/chromeos/dbus/mock_power_manager_client.cc#newcode6 chromeos/dbus/mock_power_manager_client.cc:6: #include "chromeos/dbus/power_manager/policy.pb.h" On 2013/02/05 13:16:18, Mattias Nissler wrote: > ...
7 years, 10 months ago (2013-02-05 14:05:58 UTC) #10
Daniel Erat
So... is your hope still to use this for Public Accounts in 26? <looking anxiously ...
7 years, 10 months ago (2013-02-05 20:41:35 UTC) #11
bartfab (slow)
Yes, the hope still is to get this into M26. If your CL successfully lands ...
7 years, 10 months ago (2013-02-05 21:13:26 UTC) #12
Daniel Erat
Thanks. I'm probably going to hold off on checking this in until I can do ...
7 years, 10 months ago (2013-02-06 00:43:36 UTC) #13
bartfab (slow)
Actually, things work the other way around. First, you add prefs (which the user can ...
7 years, 10 months ago (2013-02-06 15:32:20 UTC) #14
Daniel Erat
On 2013/02/06 15:32:20, bartfab wrote: > Actually, things work the other way around. First, you ...
7 years, 10 months ago (2013-02-06 16:12:11 UTC) #15
bartfab (slow)
On 2013/02/06 16:12:11, Daniel Erat wrote: > On 2013/02/06 15:32:20, bartfab wrote: > > Actually, ...
7 years, 10 months ago (2013-02-06 16:14:19 UTC) #16
commit-bot: I haz the power
7 years, 10 months ago (2013-02-06 20:36:35 UTC) #17

Powered by Google App Engine
This is Rietveld 408576698