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

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

Issue 1538573004: Expose a Java API for base/feature_list.h. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 unified diff | Download patch
OLDNEW
(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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698