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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/preferences/website/WebsiteSettingsCategoryFilter.java

Issue 1091253005: [Android] Update Protected Media Identifier Settings UI to reflect exceptions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Newton's Comments Created 5 years, 8 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
Index: chrome/android/java/src/org/chromium/chrome/browser/preferences/website/WebsiteSettingsCategoryFilter.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/WebsiteSettingsCategoryFilter.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/WebsiteSettingsCategoryFilter.java
index d47e2512672f6e17c7e0bc8c65da407c000cbc70..8c7ffc97ed6d95241bde9d199756a51836011f41 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/WebsiteSettingsCategoryFilter.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/WebsiteSettingsCategoryFilter.java
@@ -20,6 +20,7 @@ public class WebsiteSettingsCategoryFilter {
private static final String FILTER_FULLSCREEN = "fullscreen";
private static final String FILTER_MICROPHONE = "microphone";
private static final String FILTER_POPUPS = "popups";
+ private static final String FILTER_PROTECTED_MEDIA = "protected_content";
public static final String FILTER_PUSH_NOTIFICATIONS = "push_notifications";
private static final String FILTER_USE_STORAGE = "use_storage";
@@ -46,6 +47,8 @@ public class WebsiteSettingsCategoryFilter {
return ContentSettingsType.CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC;
} else if (showPopupSites(key)) {
return ContentSettingsType.CONTENT_SETTINGS_TYPE_POPUPS;
+ } else if (showProtectedMediaSites(key)) {
+ return ContentSettingsType.CONTENT_SETTINGS_TYPE_PROTECTED_MEDIA_IDENTIFIER;
} else if (showPushNotificationsSites(key)) {
return ContentSettingsType.CONTENT_SETTINGS_TYPE_NOTIFICATIONS;
}
@@ -70,14 +73,6 @@ public class WebsiteSettingsCategoryFilter {
/**
* @param filterValue A category value.
- * @return Whether the category passed is the images category.
- */
- public boolean showImagesSites(String filterValue) {
- return filterValue.equals(FILTER_IMAGES);
- }
-
- /**
- * @param filterValue A category value.
* @return Whether the category passed is the cookies category.
*/
public boolean showCookiesSites(String filterValue) {
@@ -102,6 +97,14 @@ public class WebsiteSettingsCategoryFilter {
/**
* @param filterValue A category value.
+ * @return Whether the category passed is the images category.
+ */
+ public boolean showImagesSites(String filterValue) {
+ return filterValue.equals(FILTER_IMAGES);
+ }
+
+ /**
+ * @param filterValue A category value.
* @return Whether the category passed is the javascript category.
*/
public boolean showJavaScriptSites(String filterValue) {
@@ -126,6 +129,14 @@ public class WebsiteSettingsCategoryFilter {
/**
* @param filterValue A category value.
+ * @return Whether the category passed is the protected media category.
+ */
+ public boolean showProtectedMediaSites(String filterValue) {
+ return filterValue.equals(FILTER_PROTECTED_MEDIA);
+ }
+
+ /**
+ * @param filterValue A category value.
* @return Whether the category passed is the push notification category.
*/
public boolean showPushNotificationsSites(String filterValue) {

Powered by Google App Engine
This is Rietveld 408576698