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

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: Add namespace. 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
« no previous file with comments | « no previous file | chrome/browser/android/chrome_feature_list.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.JNINamespace;
8 import org.chromium.base.annotations.MainDex;
9
10 /**
11 * Java accessor for base/feature_list.h state.
12 */
13 @JNINamespace("chrome::android")
14 @MainDex
15 public abstract class ChromeFeatureList {
16 // Prevent instantiation.
17 private ChromeFeatureList() {}
18
19 /**
20 * Returns whether the specified feature is enabled or not.
21 *
22 * Note: Features queried through this API must be added to the array
23 * |kFeaturesExposedToJava| in chrome/browser/android/chrome_feature_list.cc
24 *
25 * @param featureName The name of the feature to query.
26 * @return Whether the feature is enabled or not.
27 */
28 public static boolean isEnabled(String featureName) {
29 return nativeIsEnabled(featureName);
30 }
31
32 private static native boolean nativeIsEnabled(String featureName);
33 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/android/chrome_feature_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698