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

Issue 12217068: Add policies to control Chrome OS power management (Closed)

Created:
7 years, 10 months ago by bartfab (slow)
Modified:
7 years, 10 months ago
CC:
chromium-reviews
Visibility:
Public.

Description

Add policies to control Chrome OS power management This CL adds policies that set the newly added prefs for configuring Chrome OS power management. BUG=161267 TEST=Manual Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=181504

Patch Set 1 #

Total comments: 11

Patch Set 2 : Fixed typos in policy_test_cases.json #

Patch Set 3 : Comments addressed. #

Patch Set 4 : Fix copy&paste mistake. #

Total comments: 2

Patch Set 5 : Allow clamping of values. Add unit tests. #

Patch Set 6 : Add missing include. #

Patch Set 7 : Rebased. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1074 lines, -1 line) Patch
M chrome/app/policy/policy_templates.json View 1 2 3 4 5 6 2 chunks +333 lines, -1 line 0 comments Download
M chrome/browser/policy/configuration_policy_handler.h View 1 2 3 4 2 chunks +82 lines, -0 lines 0 comments Download
M chrome/browser/policy/configuration_policy_handler.cc View 1 2 3 4 5 3 chunks +104 lines, -0 lines 0 comments Download
M chrome/browser/policy/configuration_policy_handler_list.cc View 1 2 3 4 5 6 3 chunks +64 lines, -0 lines 0 comments Download
M chrome/browser/policy/configuration_policy_handler_unittest.cc View 1 2 3 4 3 chunks +387 lines, -0 lines 0 comments Download
M chrome/test/data/policy/policy_test_cases.json View 1 2 3 4 5 6 1 chunk +104 lines, -0 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
bartfab (slow)
Hi Mattias, Could you please review? Hi Daniel, Could you please quickly look over the ...
7 years, 10 months ago (2013-02-07 16:28:56 UTC) #1
Mattias Nissler (ping if slow)
Mostly good. https://codereview.chromium.org/12217068/diff/1/chrome/app/policy/policy_templates.json File chrome/app/policy/policy_templates.json (right): https://codereview.chromium.org/12217068/diff/1/chrome/app/policy/policy_templates.json#newcode3940 chrome/app/policy/policy_templates.json:3940: 'caption': '''Screen lock delay when running on ...
7 years, 10 months ago (2013-02-07 16:52:01 UTC) #2
bartfab (slow)
https://chromiumcodereview.appspot.com/12217068/diff/1/chrome/app/policy/policy_templates.json File chrome/app/policy/policy_templates.json (right): https://chromiumcodereview.appspot.com/12217068/diff/1/chrome/app/policy/policy_templates.json#newcode3940 chrome/app/policy/policy_templates.json:3940: 'caption': '''Screen lock delay when running on AC power''', ...
7 years, 10 months ago (2013-02-07 17:25:53 UTC) #3
Daniel Erat
The descriptions look good! I haven't looked at the code yet (on a phone, so ...
7 years, 10 months ago (2013-02-07 23:54:41 UTC) #4
Daniel Erat
The descriptions look good! I haven't looked at the code yet (on a phone, so ...
7 years, 10 months ago (2013-02-08 01:05:51 UTC) #5
bartfab (slow)
On 2013/02/08 01:05:51, Daniel Erat wrote: > The descriptions look good! I haven't looked at ...
7 years, 10 months ago (2013-02-08 09:39:12 UTC) #6
Mattias Nissler (ping if slow)
LGTM - but please consider whether you want to elaborate on the descriptions. https://chromiumcodereview.appspot.com/12217068/diff/1/chrome/app/policy/policy_templates.json File ...
7 years, 10 months ago (2013-02-08 09:47:49 UTC) #7
bartfab (slow)
https://chromiumcodereview.appspot.com/12217068/diff/1/chrome/app/policy/policy_templates.json File chrome/app/policy/policy_templates.json (right): https://chromiumcodereview.appspot.com/12217068/diff/1/chrome/app/policy/policy_templates.json#newcode3940 chrome/app/policy/policy_templates.json:3940: 'caption': '''Screen lock delay when running on AC power''', ...
7 years, 10 months ago (2013-02-08 11:39:24 UTC) #8
Mattias Nissler (ping if slow)
lgtm still https://codereview.chromium.org/12217068/diff/13002/chrome/browser/policy/configuration_policy_handler.cc File chrome/browser/policy/configuration_policy_handler.cc (right): https://codereview.chromium.org/12217068/diff/13002/chrome/browser/policy/configuration_policy_handler.cc#newcode254 chrome/browser/policy/configuration_policy_handler.cc:254: return false; Another option could be to ...
7 years, 10 months ago (2013-02-08 12:04:26 UTC) #9
bartfab (slow)
https://chromiumcodereview.appspot.com/12217068/diff/13002/chrome/browser/policy/configuration_policy_handler.cc File chrome/browser/policy/configuration_policy_handler.cc (right): https://chromiumcodereview.appspot.com/12217068/diff/13002/chrome/browser/policy/configuration_policy_handler.cc#newcode254 chrome/browser/policy/configuration_policy_handler.cc:254: return false; On 2013/02/08 12:04:26, Mattias Nissler wrote: > ...
7 years, 10 months ago (2013-02-08 14:13:08 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bartfab@chromium.org/12217068/5003
7 years, 10 months ago (2013-02-08 14:13:32 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bartfab@chromium.org/12217068/5003
7 years, 10 months ago (2013-02-08 15:31:55 UTC) #12
commit-bot: I haz the power
7 years, 10 months ago (2013-02-08 15:31:58 UTC) #13
Message was sent while issue was closed.
Failed to apply patch for chrome/app/policy/policy_templates.json:
While running patch -p1 --forward --force --no-backup-if-mismatch;
  patching file chrome/app/policy/policy_templates.json
  Hunk #1 FAILED at 112.
  Hunk #2 succeeded at 4226 with fuzz 2 (offset 352 lines).
  1 out of 2 hunks FAILED -- saving rejects to file
chrome/app/policy/policy_templates.json.rej

Patch:       chrome/app/policy/policy_templates.json
Index: chrome/app/policy/policy_templates.json
diff --git a/chrome/app/policy/policy_templates.json
b/chrome/app/policy/policy_templates.json
index
4c1fa136ffef71ead999715d8d8bd58970887d00..0b89f461075fc5265dba3ba375afa3504c4ff776
100644
--- a/chrome/app/policy/policy_templates.json
+++ b/chrome/app/policy/policy_templates.json
@@ -112,7 +112,7 @@
 #   persistent IDs for all fields (but not for groups!) are needed. These are
 #   specified by the 'id' keys of each policy. NEVER CHANGE EXISTING IDs,
 #   because doing so would break the deployed wire format!
-#   For your editing convenience: highest ID currently used: 171
+#   For your editing convenience: highest ID currently used: 184
 #
 # Placeholders:
 #   The following placeholder strings are automatically substituted:
@@ -3874,6 +3874,338 @@
 
       The policy value should be specified in milliseconds. Values are clamped
to a range of 30 seconds to 24 hours.''',
     },
+    {
+      'name': 'PowerManagement',
+      'type': 'group',
+      'caption': '''Power mangement''',
+      'desc': '''Configure power manegement in <ph
name="PRODUCT_OS_NAME">$2<ex>Google Chrome OS</ex></ph>.
+
+      These policies let you configure how <ph
name="PRODUCT_OS_NAME">$2<ex>Google Chrome OS</ex></ph> behaves when the user
remains idle for some amount of time.''',
+      'policies': [
+        {
+          'name': 'ScreenDimDelayAC',
+          'type': 'int',
+          'schema': { 'type': 'integer' },
+          'supported_on': ['chrome_os:26-'],
+          'features': {
+            'dynamic_refresh': True,
+            'per_profile': False,
+          },
+          'example_value': 420000,
+          'id': 172,
+          'caption': '''Screen dim delay when running on AC power''',
+          'desc': '''Specifies the length of time without user input after
which the screen is dimmed when running on AC power.
+
+          When this policy is set to a value greater than zero, it specifies
the length of time that the user must remain idle before <ph
name="PRODUCT_OS_NAME">$2<ex>Google Chrome OS</ex></ph> dims the screen.
+
+          When this policy is set to zero, <ph
name="PRODUCT_OS_NAME">$2<ex>Google Chrome OS</ex></ph> does not dim the screen
when the user becomes idle.
+
+          When this policy is unset, a default length of time is used.
+
+          The policy value should be specified in milliseconds. Values are
clamped to be less than or equal the screen off delay (if set) and the idle
delay.''',
+        },
+        {
+          'name': 'ScreenOffDelayAC',
+          'type': 'int',
+          'schema': { 'type': 'integer' },
+          'supported_on': ['chrome_os:26-'],
+          'features': {
+            'dynamic_refresh': True,
+            'per_profile': False,
+          },
+          'example_value': 480000,
+          'id': 173,
+          'caption': '''Screen off delay when running on AC power''',
+          'desc': '''Specifies the length of time without user input after
which the screen is turned off when running on AC power.
+
+          When this policy is set to a value greater than zero, it specifies
the length of time that the user must remain idle before <ph
name="PRODUCT_OS_NAME">$2<ex>Google Chrome OS</ex></ph> turns off the screen.
+
+          When this policy is set to zero, <ph
name="PRODUCT_OS_NAME">$2<ex>Google Chrome OS</ex></ph> does not turn off the
screen when the user becomes idle.
+
+          When this policy is unset, a default length of time is used.
+
+          The policy value should be specified in milliseconds. Values are
clamped to be less than or equal the idle delay.''',
+        },
+        {
+          'name': 'ScreenLockDelayAC',
+          'type': 'int',
+          'schema': { 'type': 'integer' },
+          'supported_on': ['chrome_os:26-'],
+          'features': {
+            'dynamic_refresh': True,
+            'per_profile': False,
+          },
+          'example_value': 600000,
+          'id': 174,
+          'caption': '''Screen lock delay when running on AC power''',
+          'desc': '''Specifies the length of time without user input after
which the screen is locked when running on AC power.
+
+          When this policy is set to a value greater than zero, it specifies
the length of time that the user must remain idle before <ph
name="PRODUCT_OS_NAME">$2<ex>Google Chrome OS</ex></ph> locks the screen.
+
+          When this policy is set to zero, <ph
name="PRODUCT_OS_NAME">$2<ex>Google Chrome OS</ex></ph> does not lock the screen
when the user becomes idle.
+
+          When this policy is unset, a default length of time is used.
+
+          The recommended way to lock the screen on idle is to enable screen
locking on suspend and have <ph name="PRODUCT_OS_NAME">$2<ex>Google Chrome
OS</ex></ph> suspend after the idle delay. This policy should only be used when
screen locking should occur a significant amount of time sooner than suspend or
when suspend on idle is not desired at all.
+
+          The policy value should be specified in milliseconds. Values are
clamped to be less than the idle delay.''',
+        },
+        {
+          'name': 'IdleDelayAC',
+          'type': 'int',
+          'schema': { 'type': 'integer' },
+          'supported_on': ['chrome_os:26-'],
+          'features': {
+            'dynamic_refresh': True,
+            'per_profile': False,
+          },
+          'example_value': 1800000,
+          'id': 175,
+          'caption': '''Idle delay when running on AC power''',
+          'desc': '''Specifies the length of time without user input after
which the idle action is taken when running on AC power.
+
+          When this policy is set, it specifies the length of time that the
user must remain idle before <ph name="PRODUCT_OS_NAME">$2<ex>Google Chrome
OS</ex></ph> takes the idle action, which can be configured separately.
+
+          When this policy is unset, a default length of time is used.
+
+          The policy value should be specified in milliseconds.''',
+        },
+        {
+          'name': 'ScreenDimDelayBattery',
+          'type': 'int',
+          'schema': { 'type': 'integer' },
+          'supported_on': ['chrome_os:26-'],
+          'features': {
+            'dynamic_refresh': True,
+            'per_profile': False,
+          },
+          'example_value': 300000,
+          'id': 176,
+          'caption': '''Screen dim delay when running on battery power''',
+          'desc': '''Specifies the length of time without user input after
which the screen is dimmed when running on battery power.
+
+          When this policy is set to a value greater than zero, it specifies
the length of time that the user must remain idle before <ph
name="PRODUCT_OS_NAME">$2<ex>Google Chrome OS</ex></ph> dims the screen.
+
+          When this policy is set to zero, <ph
name="PRODUCT_OS_NAME">$2<ex>Google Chrome OS</ex></ph> does not dim the screen
when the user becomes idle.
+
+          When this policy is unset, a default length of time is used.
+
+          The policy value should be specified in milliseconds. Values are
clamped to be less than or equal the screen off delay (if set) and the idle
delay.''',
+        },
+        {
+          'name': 'ScreenOffDelayBattery',
+          'type': 'int',
+          'schema': { 'type': 'integer' },
+          'supported_on': ['chrome_os:26-'],
+          'features': {
+            'dynamic_refresh': True,
+            'per_profile': False,
+          },
+          'example_value': 360000,
+          'id': 177,
+          'caption': '''Screen off delay when running on battery power''',
+          'desc': '''Specifies the length of time without user input after
which the screen is turned off when running on battery power.
+
+          When this policy is set to a value greater than zero, it specifies
the length of time that the user must remain idle before <ph
name="PRODUCT_OS_NAME">$2<ex>Google Chrome OS</ex></ph> turns off the screen.
+
+          When this policy is set to zero, <ph
name="PRODUCT_OS_NAME">$2<ex>Google Chrome OS</ex></ph> does not turn off the
screen when the user becomes idle.
+
+          When this policy is unset, a default length of time is used.
+
+          The policy value should be specified in milliseconds. Values are
clamped to be less than or equal the idle delay.''',
+        },
+        {
+          'name': 'ScreenLockDelayBattery',
+          'type': 'int',
+          'schema': { 'type': 'integer' },
+          'supported_on': ['chrome_os:26-'],
+          'features': {
+            'dynamic_refresh': True,
+            'per_profile': False,
+          },
+          'example_value': 600000,
+          'id': 178,
+          'caption': '''Screen lock delay when running on battery power''',
+          'desc': '''Specifies the length of time without user input after
which the screen is locked when running on battery power.
+
+          When this policy is set to a value greater than zero, it specifies
the length of time that the user must remain idle before <ph
name="PRODUCT_OS_NAME">$2<ex>Google Chrome OS</ex></ph> locks the screen.
+
+          When this policy is set to zero, <ph
name="PRODUCT_OS_NAME">$2<ex>Google Chrome OS</ex></ph> does not lock the screen
when the user becomes idle.
+
+          When this policy is unset, a default length of time is used.
+
+          The recommended way to lock the screen on idle is to enable screen
locking on suspend and have <ph name="PRODUCT_OS_NAME">$2<ex>Google Chrome
OS</ex></ph> suspend after th…
(message too large)

Powered by Google App Engine
This is Rietveld 408576698