Chromium Code Reviews| Index: chrome/android/java/src/org/chromium/chrome/browser/metrics/UmaUtils.java |
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/metrics/UmaUtils.java b/chrome/android/java/src/org/chromium/chrome/browser/metrics/UmaUtils.java |
| index 6dad167052a8710a0976162c10d4193cd44ae864..fbb579c42d4a2ca132497971111804a6c1c4fb06 100644 |
| --- a/chrome/android/java/src/org/chromium/chrome/browser/metrics/UmaUtils.java |
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/metrics/UmaUtils.java |
| @@ -55,6 +55,14 @@ public class UmaUtils { |
| } |
| /** |
| + * Determines if this client is eligible to send metrics. If they are, and there was user |
| + * consent, then metrics and crashes would be reported. |
| + */ |
| + public static boolean isClientInSample() { |
| + return nativeIsClientInMetricsReportingSample(); |
|
Alexei Svitkine (slow)
2016/08/18 06:16:39
Please make the native* name consistent with the m
jwd
2016/08/23 18:40:03
Done.
|
| + } |
| + |
| + /** |
| * Sets whether metrics reporting was opt-in or not. If it was opt-in, then the enable checkbox |
| * on first-run was default unchecked. If it was opt-out, then the checkbox was default checked. |
| * This should only be set once, and only during first-run. |
| @@ -73,5 +81,6 @@ public class UmaUtils { |
| return sForegroundStartTimeMs; |
| } |
| + private static native boolean nativeIsClientInMetricsReportingSample(); |
| private static native void nativeRecordMetricsReportingDefaultOptIn(boolean optIn); |
| } |