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

Unified Diff: chrome/browser/ui/webui/options/content_settings_handler.cc

Issue 601633002: Disable protected content button in Guest mode settings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/options/content_settings_handler.cc
diff --git a/chrome/browser/ui/webui/options/content_settings_handler.cc b/chrome/browser/ui/webui/options/content_settings_handler.cc
index 48865b87f76380e62c5a33669d3cd4353796d002..7a4babbba338d37453bf482a6ef61ca4d5a0a1ab 100644
--- a/chrome/browser/ui/webui/options/content_settings_handler.cc
+++ b/chrome/browser/ui/webui/options/content_settings_handler.cc
@@ -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",
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698