| 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 728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 739 break; | 739 break; |
| 740 case CONTENT_SETTINGS_TYPE_SSL_CERT_DECISIONS: | 740 case CONTENT_SETTINGS_TYPE_SSL_CERT_DECISIONS: |
| 741 // The content settings type CONTENT_SETTINGS_TYPE_SSL_CERT_DECISIONS is | 741 // The content settings type CONTENT_SETTINGS_TYPE_SSL_CERT_DECISIONS is |
| 742 // supposed to be set by flags and field trials only, thus there is no | 742 // supposed to be set by flags and field trials only, thus there is no |
| 743 // user facing UI for this content type and we skip it here. | 743 // user facing UI for this content type and we skip it here. |
| 744 break; | 744 break; |
| 745 #if defined(OS_WIN) | 745 #if defined(OS_WIN) |
| 746 case CONTENT_SETTINGS_TYPE_METRO_SWITCH_TO_DESKTOP: | 746 case CONTENT_SETTINGS_TYPE_METRO_SWITCH_TO_DESKTOP: |
| 747 break; | 747 break; |
| 748 #endif | 748 #endif |
| 749 case CONTENT_SETTINGS_TYPE_APP_BANNER: |
| 750 // The content settings type CONTENT_SETTINGS_TYPE_APP_BANNER is used to |
| 751 // track whether app banners should be shown or not, and is not a user |
| 752 // visible content setting. |
| 753 break; |
| 749 default: | 754 default: |
| 750 UpdateExceptionsViewFromHostContentSettingsMap(type); | 755 UpdateExceptionsViewFromHostContentSettingsMap(type); |
| 751 break; | 756 break; |
| 752 } | 757 } |
| 753 } | 758 } |
| 754 | 759 |
| 755 void ContentSettingsHandler::UpdateOTRExceptionsViewFromModel( | 760 void ContentSettingsHandler::UpdateOTRExceptionsViewFromModel( |
| 756 ContentSettingsType type) { | 761 ContentSettingsType type) { |
| 757 switch (type) { | 762 switch (type) { |
| 758 case CONTENT_SETTINGS_TYPE_GEOLOCATION: | 763 case CONTENT_SETTINGS_TYPE_GEOLOCATION: |
| (...skipping 825 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1584 | 1589 |
| 1585 // Exceptions apply only when the feature is enabled. | 1590 // Exceptions apply only when the feature is enabled. |
| 1586 PrefService* prefs = user_prefs::UserPrefs::Get(GetBrowserContext(web_ui())); | 1591 PrefService* prefs = user_prefs::UserPrefs::Get(GetBrowserContext(web_ui())); |
| 1587 bool enable_exceptions = prefs->GetBoolean(prefs::kEnableDRM); | 1592 bool enable_exceptions = prefs->GetBoolean(prefs::kEnableDRM); |
| 1588 web_ui()->CallJavascriptFunction( | 1593 web_ui()->CallJavascriptFunction( |
| 1589 "ContentSettings.enableProtectedContentExceptions", | 1594 "ContentSettings.enableProtectedContentExceptions", |
| 1590 base::FundamentalValue(enable_exceptions)); | 1595 base::FundamentalValue(enable_exceptions)); |
| 1591 } | 1596 } |
| 1592 | 1597 |
| 1593 } // namespace options | 1598 } // namespace options |
| OLD | NEW |