Skip to content

Commit

Permalink
policy: Create managed screensaver user policies
Browse files Browse the repository at this point in the history
Whereas consumer users can configure the screensaver, the
managed screensaver will retrieve the images to display, and
configurable settings from policy values.

This change adds the user-policy set to configure the managed
screensaver in the user lock screen.

Bug: b:175142676,b:265112751
Change-Id: I03dc847d7ea230bc5419b5fa96fa521a2e68201a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4180715
Commit-Queue: Emmanuel Arias Soto <eariassoto@google.com>
Reviewed-by: Alexander Hendrich <hendrich@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1095692}
  • Loading branch information
Emmanuel Arias Soto authored and Chromium LUCI CQ committed Jan 23, 2023
1 parent 6fab620 commit 36cf42c
Show file tree
Hide file tree
Showing 8 changed files with 151 additions and 0 deletions.
12 changes: 12 additions & 0 deletions chrome/test/data/policy/policy_test_cases.json
Original file line number Diff line number Diff line change
Expand Up @@ -21860,5 +21860,17 @@
}
}
]
},
"ScreensaverEnabled" : {
"reason_for_missing_test": "TODO(b/175142676): Feature not yet implemented"
},
"ScreensaverIdleTimeoutSeconds" : {
"reason_for_missing_test": "TODO(b/175142676): Feature not yet implemented"
},
"ScreensaverImageDisplayIntervalSeconds" : {
"reason_for_missing_test": "TODO(b/175142676): Feature not yet implemented"
},
"ScreensaverImages" : {
"reason_for_missing_test": "TODO(b/175142676): Feature not yet implemented"
}
}
4 changes: 4 additions & 0 deletions components/policy/resources/templates/policies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1057,6 +1057,10 @@ policies:
1056: KioskTroubleshootingToolsEnabled
1057: ForceEnablePepperVideoDecoderDevAPI
1058: DomainReliabilityAllowed
1059: ScreensaverEnabled
1060: ScreensaverIdleTimeoutSeconds
1061: ScreensaverImageDisplayIntervalSeconds
1062: ScreensaverImages
atomic_groups:
1: Homepage
2: RemoteAccess
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
caption: Screensaver Settings
desc: Controls the screensaver settings for the device sign-in screen, and user lock screen.
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
caption: User screensaver enabled.
default: false
desc: |-
Configures the user screensaver for the lock screen.
If this policy is set to true, the <ph name="PRODUCT_OS_NAME">$2<ex>Google ChromeOS</ex></ph> device will show a screensaver when it is idle in the lock screen.
If this policy is set to false, or unset, the screensaver will not be displayed in the lock screen.
The user screensaver displays the images referenced by the <ph name="SCREENSAVER_IMAGES_POLICY_NAME">ScreensaverImages</ph> policy. If <ph name="SCREENSAVER_IMAGES_POLICY_NAME">ScreensaverImages</ph> is unset, or it is set to an empty list, or to a list without any valid images, the screensaver for the lock screen will not be displayed.
The idle timeout to start the screensaver, and the interval that an image is displayed can be modified with the <ph name="SCREENSAVER_IDLE_TIMEOUT_SECONDS_POLICY_NAME">ScreensaverIdleTimeoutSeconds</ph>, and the <ph name="SCREENSAVER_DISPLAY_INTERVAL_SECONDS_POLICY_NAME">ScreensaverDisplayIntervalSeconds</ph> policies respectively. If any of these policies are unset, their default values will be use instead.
example_value: true
features:
can_be_recommended: false
dynamic_refresh: true
per_profile: true
items:
- caption: Enable the screensaver in the lock screen.
value: true
- caption: Do not enable the screensaver in the lock screen.
value: false
owners:
- mpetrisor@google.com
- eariassoto@google.com
- imprivata-eng@google.com
schema:
type: boolean
future_on:
- chrome_os
tags: []
type: main
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
caption: User screensaver idle timeout.
desc: |-
Configures the time in seconds that the device will wait idle before showing the screensaver for the lock screen.
Valid values range from 1 second to 9999 seconds. Leaving the policy unset means <ph name="PRODUCT_OS_NAME">$2<ex>Google ChromeOS</ex></ph> uses the default value of 7 seconds.
This policy will not have any effect when the <ph name="SCREENSAVER_ENABLED_POLICY_NAME">ScreensaverEnabled</ph> policy is set to false.
default: 7
example_value: 7
features:
can_be_recommended: false
dynamic_refresh: true
per_profile: true
owners:
- mpetrisor@google.com
- eariassoto@google.com
- imprivata-eng@google.com
schema:
minimum: 1
maximum: 9999
type: integer
future_on:
- chrome_os
tags: []
type: int
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
caption: User screensaver image display interval.
desc: |-
Configures the interval in seconds to display an image when the screensaver for the lock screen has multiple images to display.
Valid values range from 1 second to 9999 seconds. Leaving the policy unset means <ph name="PRODUCT_OS_NAME">$2<ex>Google ChromeOS</ex></ph> uses the default value of 60 seconds.
This policy will not have any effect when the <ph name="SCREENSAVER_ENABLED_POLICY_NAME">ScreensaverEnabled</ph> policy is set to false.
default: 60
example_value: 60
features:
can_be_recommended: false
dynamic_refresh: true
per_profile: true
owners:
- mpetrisor@google.com
- eariassoto@google.com
- imprivata-eng@google.com
schema:
minimum: 1
maximum: 9999
type: integer
future_on:
- chrome_os
tags: []
type: int
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
caption: User screensaver image source.
desc: |-
Configures the list of images to display in the screensaver for the lock screen.
Each list item references an image to be displayed in the screensaver. The item must have as members a URL to the image, and the SHA-256 hash value of the image file for verification. The image format must be JPEG. The <ph name="PRODUCT_OS_NAME">$2<ex>Google ChromeOS</ex></ph> device will download these images, and maintain a local cache of these references.
This policy will not have any effect if the <ph name="SCREENSAVER_ENABLED_POLICY_NAME">ScreensaverEnabled</ph> policy is set to false.
If this policy is unset, or the list does not contain any valid image references, the screensaver for the lock screen will not be displayed, regardless of the value set in the <ph name="SCREENSAVER_ENABLED_POLICY_NAME">ScreensaverEnabled</ph> policy.
default: []
example_value:
- url: https://www.example.com/img_1.jpg
hash: 38aae2b1647f1f37729c4f3632c297ceb901a130bf5881d72c3a19e16ff97e7a
- url: https://www.example.com/img_2.jpg
hash: 439189aabe4fb024450ca7f0f5a7bc06841200e14b286db87e820d8674e316cd
- url: https://www.example.com/img_3.jpg
hash: b6d9d35eb4d2957dbb78ba82f47c94727b8563ee7e3030c3c56be227c4ef4f78
features:
can_be_recommended: false
dynamic_refresh: true
per_profile: true
owners:
- mpetrisor@google.com
- eariassoto@google.com
- imprivata-eng@google.com
schema:
items:
properties:
hash:
description: The SHA-256 hash of the image.
type: string
url:
description: The URL from which the screensaver image can be downloaded.
type: string
required:
- url
- hash
type: object
type: array
future_on:
- chrome_os
tags: []
type: dict
4 changes: 4 additions & 0 deletions tools/metrics/histograms/enums.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32419,6 +32419,10 @@ Called by update_document_policy_enum.py.-->
<int value="1056" label="KioskTroubleshootingToolsEnabled"/>
<int value="1057" label="ForceEnablePepperVideoDecoderDevAPI"/>
<int value="1058" label="DomainReliabilityAllowed"/>
<int value="1059" label="ScreensaverEnabled"/>
<int value="1060" label="ScreensaverIdleTimeoutSeconds"/>
<int value="1061" label="ScreensaverImageDisplayIntervalSeconds"/>
<int value="1062" label="ScreensaverImages"/>
</enum>

<enum name="EnterprisePoliciesSources">
Expand Down

0 comments on commit 36cf42c

Please sign in to comment.