Commit e83e359e authored by michaelpg's avatar michaelpg Committed by Commit bot

Disable protected content button in Guest mode settings

UIAccountTweaks disables the "manage protected content exceptions"
button in guest mode, but the ContentSettingsHandler re-enables it.

BUG=417103
R=stevenjb@chromium.org

Review URL: https://codereview.chromium.org/601633002

Cr-Commit-Position: refs/heads/master@{#296531}
parent bf330448
......@@ -1495,8 +1495,14 @@ void ContentSettingsHandler::UpdateFlashMediaLinksVisibility() {
}
void ContentSettingsHandler::UpdateProtectedContentExceptionsButton() {
PrefService* prefs = user_prefs::UserPrefs::Get(GetBrowserContext(web_ui()));
#if defined(OS_CHROMEOS)
// Guests cannot modify exceptions. UIAccountTweaks will disabled the button.
if (user_manager::UserManager::Get()->IsLoggedInAsGuest())
return;
#endif
// Exceptions apply only when the feature is enabled.
PrefService* prefs = user_prefs::UserPrefs::Get(GetBrowserContext(web_ui()));
bool enable_exceptions = prefs->GetBoolean(prefs::kEnableDRM);
web_ui()->CallJavascriptFunction(
"ContentSettings.enableProtectedContentExceptions",
......
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