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

Unified Diff: components/policy/resources/policy_templates.json

Issue 228423002: Add $ref support to policy schema (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@policy-schema-regex
Patch Set: fixes Created 6 years, 8 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
Index: components/policy/resources/policy_templates.json
diff --git a/components/policy/resources/policy_templates.json b/components/policy/resources/policy_templates.json
index 8e7b1fb0f79e7e29d9484131a94a9e9bce76d344..5155ff12ec7aa4520a7c3e404fbed855a985f225 100644
--- a/components/policy/resources/policy_templates.json
+++ b/components/policy/resources/policy_templates.json
@@ -5286,6 +5286,7 @@
'AC': {
'description': 'Delays and actions to take when the device is idle and running on AC power',
'type': 'object',
+ 'id': 'PowerManagementDelays',
'properties': {
'Delays': {
'type': 'object',
@@ -5321,42 +5322,8 @@
},
'Battery': {
'description': 'Delays and actions to take when the device is idle and running on battery',
- 'type': 'object',
- # TODO(binjin): Use $ref placeholder here once generated policy
- # constants get full support of it. http://crbug.com/347082
- 'properties': {
- 'Delays': {
- 'type': 'object',
- 'properties': {
- 'ScreenDim': {
- 'description': 'The length of time without user input after which the screen is dimmed, in milliseconds',
- 'type': 'integer',
- 'minimum': 0
- },
- 'ScreenOff': {
- 'description': 'The length of time without user input after which the screen is turned off, in milliseconds',
- 'type': 'integer',
- 'minimum': 0
- },
- 'IdleWarning': {
- 'description': 'The length of time without user input after which a warning dialog is shown, in milliseconds',
- 'type': 'integer',
- 'minimum': 0
- },
- 'Idle': {
- 'description': 'The length of time without user input after which the idle action is taken, in milliseconds',
- 'type': 'integer',
- 'minimum': 0
- }
- }
- },
- 'IdleAction': {
- 'description': 'Action to take when the idle delay is reached',
- 'type': 'string',
- 'enum': [ 'Suspend', 'Logout', 'Shutdown', 'DoNothing' ]
- }
- }
- },
+ '$ref': 'PowerManagementDelays'
+ }
}
},
'supported_on': ['chrome_os:35-'],
@@ -5453,6 +5420,7 @@
'AC': {
'description': 'Power management settings applicable only when running on AC power',
'type': 'object',
+ 'id': 'DeviceLoginScreenPowerSettings',
'properties': {
'Delays': {
'type': 'object',
@@ -5483,34 +5451,7 @@
},
'Battery': {
'description': 'Power management settings applicable only when running on battery power',
- 'type': 'object',
- 'properties': {
- 'Delays': {
- 'type': 'object',
- 'properties': {
- 'ScreenDim': {
- 'description': 'The length of time without user input after which the screen is dimmed, in milliseconds',
- 'type': 'integer',
- 'minimum': 0
- },
- 'ScreenOff': {
- 'description': 'The length of time without user input after which the screen is turned off, in milliseconds',
- 'type': 'integer',
- 'minimum': 0
- },
- 'Idle': {
- 'description': 'The length of time without user input after which the idle action is taken, in milliseconds',
- 'type': 'integer',
- 'minimum': 0
- }
- }
- },
- 'IdleAction': {
- 'description': 'Action to take when the idle delay is reached',
- 'type': 'string',
- 'enum': [ 'Suspend', 'Shutdown', 'DoNothing' ]
- }
- }
+ '$ref': 'DeviceLoginScreenPowerSettings'
},
'LidCloseAction': {
'description': 'Action to take when the lid is closed',
« no previous file with comments | « components/policy/core/common/generate_policy_source_unittest.cc ('k') | components/policy/tools/generate_policy_source.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698