OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 package org.chromium.chrome.browser; |
| 6 |
| 7 import org.chromium.base.annotations.MainDex; |
| 8 |
| 9 /** |
| 10 * Java accessor for base/feature_list.h state. |
| 11 */ |
| 12 @MainDex |
| 13 public abstract class ChromeFeatureList { |
| 14 // Prevent instantiation. |
| 15 private ChromeFeatureList() {} |
| 16 |
| 17 /** |
| 18 * Returns whether the specified feature is enabled or not. |
| 19 * |
| 20 * Note: Features queried through this API must be added to the array |
| 21 * |kFeaturesExposedToJava| in chrome/browser/android/chrome_feature_list.cc |
| 22 * |
| 23 * @param featureName The name of the feature to query. |
| 24 * @return Whether the feature is enabled or not. |
| 25 */ |
| 26 public static boolean isEnabled(String featureName) { |
| 27 return nativeIsEnabled(featureName); |
| 28 } |
| 29 |
| 30 private static native boolean nativeIsEnabled(String featureName); |
| 31 } |
OLD | NEW |