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

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

Issue 1068223002: Implement Site Settings \ Images category. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync and fix merge conflict 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 8c98fe0a8c1191b166c6dd4c1b2a064058b7ac83..b0b1bda761acc0b00c547c06ba819f3419275e05 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
@@ -15,6 +15,7 @@ public class WebsiteSettingsCategoryFilter {
private static final String FILTER_COOKIES = "cookies";
private static final String FILTER_CAMERA_MIC = "use_camera_or_mic";
private static final String FILTER_JAVASCRIPT = "javascript";
+ private static final String FILTER_IMAGES = "images";
private static final String FILTER_DEVICE_LOCATION = "device_location";
private static final String FILTER_FULLSCREEN = "fullscreen";
private static final String FILTER_USE_STORAGE = "use_storage";
@@ -36,6 +37,8 @@ public class WebsiteSettingsCategoryFilter {
return ContentSettingsType.CONTENT_SETTINGS_TYPE_POPUPS;
} else if (showGeolocationSites(key)) {
return ContentSettingsType.CONTENT_SETTINGS_TYPE_GEOLOCATION;
+ } else if (showImagesSites(key)) {
+ return ContentSettingsType.CONTENT_SETTINGS_TYPE_IMAGES;
} else if (showPushNotificationsSites(key)) {
return ContentSettingsType.CONTENT_SETTINGS_TYPE_NOTIFICATIONS;
} else if (showJavaScriptSites(key)) {
@@ -72,6 +75,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) {

Powered by Google App Engine
This is Rietveld 408576698