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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/webui/options/content_settings_handler.h" 5 #include "chrome/browser/ui/webui/options/content_settings_handler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1477 matching lines...) Expand 10 before | Expand all | Expand 10 after
1488 media_settings_.flash_default_setting, 1488 media_settings_.flash_default_setting,
1489 media_settings_.flash_exceptions, 1489 media_settings_.flash_exceptions,
1490 media_settings_.policy_disable_audio, 1490 media_settings_.policy_disable_audio,
1491 media_settings_.policy_disable_video)) { 1491 media_settings_.policy_disable_video)) {
1492 ShowFlashMediaLink(EXCEPTIONS, true); 1492 ShowFlashMediaLink(EXCEPTIONS, true);
1493 } 1493 }
1494 } 1494 }
1495 } 1495 }
1496 1496
1497 void ContentSettingsHandler::UpdateProtectedContentExceptionsButton() { 1497 void ContentSettingsHandler::UpdateProtectedContentExceptionsButton() {
1498 #if defined(OS_CHROMEOS)
1499 // Guests cannot modify exceptions. UIAccountTweaks will disabled the button.
1500 if (user_manager::UserManager::Get()->IsLoggedInAsGuest())
1501 return;
1502 #endif
1503
1504 // Exceptions apply only when the feature is enabled.
1498 PrefService* prefs = user_prefs::UserPrefs::Get(GetBrowserContext(web_ui())); 1505 PrefService* prefs = user_prefs::UserPrefs::Get(GetBrowserContext(web_ui()));
1499 // Exceptions apply only when the feature is enabled.
1500 bool enable_exceptions = prefs->GetBoolean(prefs::kEnableDRM); 1506 bool enable_exceptions = prefs->GetBoolean(prefs::kEnableDRM);
1501 web_ui()->CallJavascriptFunction( 1507 web_ui()->CallJavascriptFunction(
1502 "ContentSettings.enableProtectedContentExceptions", 1508 "ContentSettings.enableProtectedContentExceptions",
1503 base::FundamentalValue(enable_exceptions)); 1509 base::FundamentalValue(enable_exceptions));
1504 } 1510 }
1505 1511
1506 } // namespace options 1512 } // namespace options
OLDNEW
« 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