| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |