1 // Copyright 2016 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.
7 #include "base/android/jni_string.h"
8 #include "base/base_jni/StatisticsRecorderAndroid_jni.h"
9 #include "base/metrics/histogram_base.h"
10 #include "base/metrics/statistics_recorder.h"
11 #include "base/system/sys_info.h"
13 using base::android::JavaParamRef;
14 using base::android::ConvertUTF8ToJavaString;
19 static ScopedJavaLocalRef<jstring> JNI_StatisticsRecorderAndroid_ToJson(
21 jint verbosityLevel) {
22 return ConvertUTF8ToJavaString(
23 env, base::StatisticsRecorder::ToJSON(
24 static_cast<JSONVerbosityLevel>(verbosityLevel)));
27 } // namespace android