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

Unified Diff: components/variations/android/java/src/org/chromium/components/variations/VariationsAssociatedData.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: components/variations/android/java/src/org/chromium/components/variations/VariationsAssociatedData.java
diff --git a/components/variations/android/java/src/org/chromium/components/variations/VariationsAssociatedData.java b/components/variations/android/java/src/org/chromium/components/variations/VariationsAssociatedData.java
index 8d7264d780a7b94b646f7d4e92d85c467cf044ee..084aad38709ac083293576d0e00e1c464c8bbae6 100644
--- a/components/variations/android/java/src/org/chromium/components/variations/VariationsAssociatedData.java
+++ b/components/variations/android/java/src/org/chromium/components/variations/VariationsAssociatedData.java
@@ -18,6 +18,18 @@ public final class VariationsAssociatedData {
}
/**
+ * @param feature Native reference of the feature to get the param as integer for.
+ * @param paramName The name of the param for which to get as an integer.
+ * @param defaultValue The integer value to use if the param is not available.
+ * @return The parameter value as an int. Default value if the feature does not exist or the
+ * specified parameter does not exist.
+ */
+ public static int getVariationParamByFeatureAsInt(
+ long feature, String paramName, int defaultValue) {
+ return nativeGetVariationParamByFeatureAsInt(feature, paramName, defaultValue);
+ }
+
+ /**
* @param trialName The name of the trial to get the param value for.
* @param paramName The name of the param for which to get the value.
* @return The parameter value. Empty string if the field trial does not exist or the specified
@@ -35,4 +47,6 @@ public final class VariationsAssociatedData {
private static native String nativeGetVariationParamValue(String trialName, String paramName);
private static native String nativeGetFeedbackVariations();
+ private static native int nativeGetVariationParamByFeatureAsInt(
+ long feature, String paramName, int defaultValue);
}

Powered by Google App Engine
This is Rietveld 408576698