Chromium Code Reviews| 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 |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..27d037d58c4cb4cd1bb5aa07f8546bc82a6ccbbe |
| --- /dev/null |
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeFeatureList.java |
| @@ -0,0 +1,31 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +package org.chromium.chrome.browser; |
| + |
| +import org.chromium.base.annotations.MainDex; |
| + |
| +/** |
| + * Java accessor for base/feature_list.h state. |
| + */ |
| +@MainDex |
| +public abstract class ChromeFeatureList { |
|
nyquist
2015/12/18 22:49:22
I don't really get why this is in //chrome and not
Alexei Svitkine (slow)
2015/12/18 22:54:45
Chatted with nyquist@ offline, but the answer is t
|
| + // Prevent instantiation. |
| + private ChromeFeatureList() {} |
| + |
| + /** |
| + * Returns whether the specified feature is enabled or not. |
| + * |
| + * 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 query. |
| + * @return Whether the feature is enabled or not. |
| + */ |
| + public static boolean isEnabled(String featureName) { |
| + return nativeIsEnabled(featureName); |
| + } |
| + |
| + private static native boolean nativeIsEnabled(String featureName); |
| +} |