• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2016 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 #include <string>
6 
7 #include "base/android/jni_string.h"
8 #include "base/metrics/histogram_base.h"
9 #include "base/metrics/statistics_recorder.h"
10 #include "base/sys_info.h"
11 #include "jni/StatisticsRecorderAndroid_jni.h"
12 
13 using base::android::JavaParamRef;
14 using base::android::ConvertUTF8ToJavaString;
15 
16 namespace base {
17 namespace android {
18 
JNI_StatisticsRecorderAndroid_ToJson(JNIEnv * env,const JavaParamRef<jclass> & clazz,jint verbosityLevel)19 static ScopedJavaLocalRef<jstring> JNI_StatisticsRecorderAndroid_ToJson(
20     JNIEnv* env,
21     const JavaParamRef<jclass>& clazz,
22     jint verbosityLevel) {
23   return ConvertUTF8ToJavaString(
24       env, base::StatisticsRecorder::ToJSON(
25                static_cast<JSONVerbosityLevel>(verbosityLevel)));
26 }
27 
28 }  // namespace android
29 }  // namespace base
30