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

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

Issue 1432573002: Adding <keygen> Content Setting (Android UI) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@keygen_ui
Patch Set: Update UI strings. Created 5 years, 1 month 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/SiteSettingsCategory.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SiteSettingsCategory.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SiteSettingsCategory.java
index 77029d68157bb0d2292d1d45c7b55cf0ba65c2de..ebe3821f603a6abf41cf6bdf9b11e0ef8746de39 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SiteSettingsCategory.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/SiteSettingsCategory.java
@@ -38,6 +38,7 @@ public class SiteSettingsCategory {
public static final String CATEGORY_DEVICE_LOCATION = "device_location";
public static final String CATEGORY_FULLSCREEN = "fullscreen";
public static final String CATEGORY_JAVASCRIPT = "javascript";
+ public static final String CATEGORY_KEYGEN = "keygen";
public static final String CATEGORY_MICROPHONE = "microphone";
public static final String CATEGORY_POPUPS = "popups";
public static final String CATEGORY_PROTECTED_MEDIA = "protected_content";
@@ -93,6 +94,10 @@ public class SiteSettingsCategory {
return new SiteSettingsCategory(CATEGORY_JAVASCRIPT, "",
ContentSettingsType.CONTENT_SETTINGS_TYPE_JAVASCRIPT);
}
+ if (CATEGORY_KEYGEN.equals(category)) {
+ return new SiteSettingsCategory(CATEGORY_KEYGEN, "",
+ ContentSettingsType.CONTENT_SETTINGS_TYPE_KEYGEN);
+ }
if (CATEGORY_DEVICE_LOCATION.equals(category)) {
return new LocationCategory();
}
@@ -140,6 +145,9 @@ public class SiteSettingsCategory {
if (contentSettingsType == ContentSettingsType.CONTENT_SETTINGS_TYPE_JAVASCRIPT) {
return fromString(CATEGORY_JAVASCRIPT);
}
+ if (contentSettingsType == ContentSettingsType.CONTENT_SETTINGS_TYPE_KEYGEN) {
+ return fromString(CATEGORY_KEYGEN);
+ }
if (contentSettingsType == ContentSettingsType.CONTENT_SETTINGS_TYPE_GEOLOCATION) {
return fromString(CATEGORY_DEVICE_LOCATION);
}
@@ -214,6 +222,13 @@ public class SiteSettingsCategory {
}
/**
+ * Returns whether this category is the Keygen category.
+ */
+ public boolean showKeygenSites() {
+ return mContentSettingsType == ContentSettingsType.CONTENT_SETTINGS_TYPE_KEYGEN;
+ }
+
+ /**
* Returns whether this category is the Microphone category.
*/
public boolean showMicrophoneSites() {
@@ -263,6 +278,7 @@ public class SiteSettingsCategory {
return !prefs.isAllowLocationUserModifiable();
}
if (showJavaScriptSites()) return prefs.javaScriptManaged();
+ if (showKeygenSites()) return prefs.keygenManaged();
Finnur 2015/11/05 20:44:41 I don't think you need any of these changes if you
svaldez 2015/11/10 15:25:02 Done.
if (showMicrophoneSites()) return !prefs.isMicUserModifiable();
if (showPopupSites()) return prefs.isPopupsManaged();
return false;

Powered by Google App Engine
This is Rietveld 408576698