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 d94b9800abb0f50fb5e7363f8cb7c9eb87b21ce0..a47360e849108e9ec0fde16676be21f5d640948f 100644 |
--- a/base/android/java/src/org/chromium/base/metrics/RecordHistogram.java |
+++ b/base/android/java/src/org/chromium/base/metrics/RecordHistogram.java |
@@ -78,6 +78,21 @@ public class RecordHistogram { |
} |
/** |
+ * Records a sample in a linear histogram. This is the Java equivalent for using |
+ * base::LinearHistogram. |
+ * @param name name of the histogram |
+ * @param sample sample to be recorded, at least |min| and at most |max| - 1. |
+ * @param min lower bound for expected sample values, should be at least 1. |
+ * @param max upper bounds for expected sample values |
+ * @param numBuckets the number of buckets |
+ */ |
+ public static void recordLinearCountHistogram( |
+ String name, int sample, int min, int max, int numBuckets) { |
+ nativeRecordLinearCountHistogram( |
+ name, System.identityHashCode(name), sample, min, max, numBuckets); |
+ } |
+ |
+ /** |
* Records a sparse histogram. This is the Java equivalent of UMA_HISTOGRAM_SPARSE_SLOWLY. |
* @param name name of the histogram |
* @param sample sample to be recorded. All values of |sample| are valid, including negative |
@@ -170,6 +185,8 @@ public class RecordHistogram { |
String name, int key, int sample, int boundary); |
private static native void nativeRecordCustomCountHistogram( |
String name, int key, int sample, int min, int max, int numBuckets); |
+ private static native void nativeRecordLinearCountHistogram( |
+ String name, int key, int sample, int min, int max, int numBuckets); |
private static native void nativeRecordSparseHistogram(String name, int key, int sample); |
private static native int nativeGetHistogramValueCountForTesting(String name, int sample); |