• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2014 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.base;
6 
7 import org.chromium.base.annotations.MainDex;
8 
9 /**
10  * Helper to get field trial information.
11  */
12 @MainDex
13 public class FieldTrialList {
14 
FieldTrialList()15     private FieldTrialList() {}
16 
17     /**
18      * @param trialName The name of the trial to get the group for.
19      * @return The group name chosen for the named trial, or the empty string if the trial does
20      *         not exist.
21      */
findFullName(String trialName)22     public static String findFullName(String trialName) {
23         return nativeFindFullName(trialName);
24     }
25 
26     /**
27      * @param trialName The name of the trial to get the group for.
28      * @return Whether the trial exists or not.
29      */
trialExists(String trialName)30     public static boolean trialExists(String trialName) {
31         return nativeTrialExists(trialName);
32     }
33 
nativeFindFullName(String trialName)34     private static native String nativeFindFullName(String trialName);
nativeTrialExists(String trialName)35     private static native boolean nativeTrialExists(String trialName);
36 }
37