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

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: 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 b0b1bda761acc0b00c547c06ba819f3419275e05..79fcd9197dcf0593385388a3df5751a3a8bce484 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_USE_STORAGE = "use_storage";
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";
public WebsiteSettingsCategoryFilter() {
@@ -45,6 +46,8 @@ public class WebsiteSettingsCategoryFilter {
return ContentSettingsType.CONTENT_SETTINGS_TYPE_JAVASCRIPT;
} else if (showFullscreenSites(key)) {
return ContentSettingsType.CONTENT_SETTINGS_TYPE_FULLSCREEN;
+ } else if (showProtectedMediaSites(key)) {
+ return ContentSettingsType.CONTENT_SETTINGS_TYPE_PROTECTED_MEDIA_IDENTIFIER;
}
return -1;
}
@@ -128,4 +131,12 @@ public class WebsiteSettingsCategoryFilter {
public boolean showPushNotificationsSites(String filterValue) {
return filterValue.equals(FILTER_PUSH_NOTIFICATIONS);
}
+
+ /**
+ * @param filterValue A category value.
+ * @return Whether the category passed is the protected media category.
+ */
+ public boolean showProtectedMediaSites(String filterValue) {
newt (away) 2015/04/30 00:31:59 move this above showPushNotificationsSites() to ke
knn 2015/04/30 16:00:36 Done.
+ return filterValue.equals(FILTER_PROTECTED_MEDIA);
+ }
}

Powered by Google App Engine
This is Rietveld 408576698