Commit 848b97e2 authored by Tim Song's avatar Tim Song Committed by Commit Bot

Ash Display: Add IsManaged() function to PrivacyScreenController.

BUG=1040648

Change-Id: I58630f7fbffc0132745b0b14f20816a3980a4a97
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2079800Reviewed-by: default avatarAhmed Fakhry <afakhry@chromium.org>
Reviewed-by: default avatarGil Dekel <gildekel@chromium.org>
Commit-Queue: Tim Song <tengs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#745369}
parent 4aa2547b
......@@ -37,6 +37,11 @@ bool PrivacyScreenController::IsSupported() const {
->IsPrivacyScreenSupportedOnInternalDisplay();
}
bool PrivacyScreenController::IsManaged() const {
return active_user_pref_service_->IsManagedPreference(
prefs::kDisplayPrivacyScreenEnabled);
}
bool PrivacyScreenController::GetEnabled() const {
return active_user_pref_service_ && active_user_pref_service_->GetBoolean(
prefs::kDisplayPrivacyScreenEnabled);
......
......@@ -42,6 +42,8 @@ class ASH_EXPORT PrivacyScreenController
// Whether or not the privacy screen feature is supported by the device.
bool IsSupported() const;
// Whether or not the privacy screen feature is enforced by policy.
bool IsManaged() const;
// Get the PrivacyScreen settings stored in the current active user prefs.
bool GetEnabled() const;
// Set the desired PrivacyScreen settings in the current active user prefs.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment