1 // Copyright 2019 The Chromium Authors 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.test; 6 7 import org.chromium.base.annotations.JNINamespace; 8 import org.chromium.base.annotations.NativeMethods; 9 10 /** 11 * Class containing only static methods for querying the status of the reached code profiler. 12 */ 13 @JNINamespace("base::android") 14 public class ReachedCodeProfiler { ReachedCodeProfiler()15 private ReachedCodeProfiler() {} 16 17 /** 18 * @return Whether the reached code profiler is enabled. 19 */ isEnabled()20 public static boolean isEnabled() { 21 return ReachedCodeProfilerJni.get().isReachedCodeProfilerEnabled(); 22 } 23 24 /** 25 * @return Whether the currently used version of native library supports the reached code 26 * profiler. 27 */ isSupported()28 public static boolean isSupported() { 29 return ReachedCodeProfilerJni.get().isReachedCodeProfilerSupported(); 30 } 31 32 @NativeMethods 33 interface Natives { isReachedCodeProfilerEnabled()34 boolean isReachedCodeProfilerEnabled(); isReachedCodeProfilerSupported()35 boolean isReachedCodeProfilerSupported(); 36 } 37 } 38