Chromium Code Reviews| Index: base/android/java/src/org/chromium/base/metrics/StatisticsRecorderAndroid.java |
| diff --git a/base/android/java/src/org/chromium/base/metrics/StatisticsRecorderAndroid.java b/base/android/java/src/org/chromium/base/metrics/StatisticsRecorderAndroid.java |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..a066661fe3f5572be8d8f2771868c1a2e7e7c594 |
| --- /dev/null |
| +++ b/base/android/java/src/org/chromium/base/metrics/StatisticsRecorderAndroid.java |
| @@ -0,0 +1,23 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +package org.chromium.base.metrics; |
| + |
| +import org.chromium.base.annotations.JNINamespace; |
| + |
| +/** |
| + * Java API which exposes the registered histograms on the native side as |
| + * JSON test. |
| + */ |
| +@JNINamespace("base::android") |
| +public class StatisticsRecorderAndroid { |
|
nyquist
2016/10/03 20:55:38
Nit: Should this class be final?
tbansal1
2016/10/04 03:34:11
Done.
|
| + private StatisticsRecorderAndroid() {} |
| + |
| + // Returns all the registered histograms as JSON text. |
|
nyquist
2016/10/03 20:55:38
Nit: Use JavaDoc style (the /** ... */ stuff)
tbansal1
2016/10/04 03:34:11
Done.
|
| + public static String toJson() { |
| + return nativeToJson(); |
| + } |
| + |
| + private static native String nativeToJson(); |
| +} |