Index: base/android/java/src/org/chromium/base/metrics/RecordHistogram.java |
diff --git a/base/android/java/src/org/chromium/base/metrics/RecordHistogram.java b/base/android/java/src/org/chromium/base/metrics/RecordHistogram.java |
index eaf57b7ce7b346c90a4ecbe4e67ab5358872a17a..b3667c5515312374d9e8c4fbf1008edb8ed10985 100644 |
--- a/base/android/java/src/org/chromium/base/metrics/RecordHistogram.java |
+++ b/base/android/java/src/org/chromium/base/metrics/RecordHistogram.java |
@@ -269,6 +269,15 @@ public class RecordHistogram { |
return nativeGetHistogramValueCountForTesting(name, sample); |
} |
+ /** |
+ * Returns the number of samples recorded for the given histogram. |
+ * @param name name of the histogram to look up. |
+ */ |
+ @VisibleForTesting |
+ public static int getHistogramTotalCountForTesting(String name) { |
+ return nativeGetHistogramTotalCountForTesting(name); |
+ } |
+ |
/** |
* Initializes the metrics system. |
*/ |
@@ -290,5 +299,6 @@ public class RecordHistogram { |
private static native long nativeRecordSparseHistogram(String name, long key, int sample); |
private static native int nativeGetHistogramValueCountForTesting(String name, int sample); |
+ private static native int nativeGetHistogramTotalCountForTesting(String name); |
private static native void nativeInitialize(); |
} |