OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 package org.chromium.base; | 5 package org.chromium.base; |
6 | 6 |
7 /** | 7 /** |
8 * Helper to get field trial information. | 8 * Helper to get field trial information. |
9 */ | 9 */ |
10 public class FieldTrialList { | 10 public class FieldTrialList { |
11 | 11 |
12 private FieldTrialList() {} | 12 private FieldTrialList() {} |
13 | 13 |
14 /** | 14 /** |
15 * @param trialName The name of the trial to get the group for. | 15 * @param trialName The name of the trial to get the group for. |
16 * @return The group name chosen for the named trial, or the empty string if
the trial does | 16 * @return The group name chosen for the named trial, or the empty string if
the trial does |
17 * not exist. | 17 * not exist. |
18 */ | 18 */ |
19 public static String findFullName(String trialName) { | 19 public static String findFullName(String trialName) { |
20 return nativeFindFullName(trialName); | 20 return nativeFindFullName(trialName); |
21 } | 21 } |
22 | 22 |
| 23 /** |
| 24 * @param trialName The name of the trial to get the group for. |
| 25 * @return Whether the trial exists or not. |
| 26 */ |
| 27 public static boolean trialExists(String trialName) { |
| 28 return nativeTrialExists(trialName); |
| 29 } |
| 30 |
23 private static native String nativeFindFullName(String trialName); | 31 private static native String nativeFindFullName(String trialName); |
| 32 private static native boolean nativeTrialExists(String trialName); |
24 } | 33 } |
OLD | NEW |