Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(161)

Unified Diff: base/android/java/src/org/chromium/base/metrics/StatisticsRecorderAndroid.java

Issue 2378773010: Expose registered histograms from FeedbackCollector (Closed)
Patch Set: ps Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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();
+}

Powered by Google App Engine
This is Rietveld 408576698