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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/ChromeFeatureList.java

Issue 2657923002: Add a Kill switch for WebVR cardboard support through finch. (Closed)
Patch Set: Fix javadoc Created 3 years, 11 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/ChromeFeatureList.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeFeatureList.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeFeatureList.java
index 4325a3673764191cab87f314aab9ebc12c9d144c..e7f77211b896fd81656e99bac61e3a48b92388e1 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeFeatureList.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeFeatureList.java
@@ -48,6 +48,19 @@ public abstract class ChromeFeatureList {
return sTestEnabledFeatures.contains(featureName);
}
+ /**
+ * Returns a native reference to the specified feature.
+ *
+ * Note: Features queried through this API must be added to the array
+ * |kFeaturesExposedToJava| in chrome/browser/android/chrome_feature_list.cc
+ *
+ * @param featureName The name of the feature to retrieve a reference for.
+ * @return a pointer to the native feature.
+ */
+ public static long getFeature(String featureName) {
+ return nativeGetFeature(featureName);
+ }
+
// Alphabetical:
public static final String ANDROID_PAY_INTEGRATION_V1 = "AndroidPayIntegrationV1";
public static final String ANDROID_PAY_INTEGRATION_V2 = "AndroidPayIntegrationV2";
@@ -77,6 +90,8 @@ public abstract class ChromeFeatureList {
public static final String WEB_PAYMENTS = "WebPayments";
public static final String WEB_PAYMENTS_MODIFIERS = "WebPaymentsModifiers";
public static final String WEB_PAYMENTS_SINGLE_APP_UI_SKIP = "WebPaymentsSingleAppUiSkip";
+ public static final String WEBVR_CARDBOARD_SUPPORT = "WebVRCardboardSupport";
private static native boolean nativeIsEnabled(String featureName);
+ private static native long nativeGetFeature(String featureName);
}

Powered by Google App Engine
This is Rietveld 408576698