Chromium Code Reviews| Index: chrome/android/java/src/org/chromium/chrome/browser/metrics/WebApkUma.java |
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/metrics/WebApkUma.java b/chrome/android/java/src/org/chromium/chrome/browser/metrics/WebApkUma.java |
| index 100e403d9307ed8e4872fe7d15614bbc18ad3feb..67094cf27fd3d9307368e348b50e3e721b2b2468 100644 |
| --- a/chrome/android/java/src/org/chromium/chrome/browser/metrics/WebApkUma.java |
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/metrics/WebApkUma.java |
| @@ -95,6 +95,14 @@ public class WebApkUma { |
| "WebApk.Install.GooglePlayInstallResult", result, GOOGLE_PLAY_INSTALL_RESULT_MAX); |
| } |
| + /** Records the error code if installing a WebAPK from Google Play has failed. */ |
| + public static void recordGooglePlayInstallErrorCode(int errorCode) { |
| + // Don't use an enumerated histogram as there are > 30 potential error codes. In practice, |
| + // a given client will always get the same error code. |
| + RecordHistogram.recordSparseSlowlyHistogram( |
| + "WebApk.Install.GooglePlayErrorCode", Math.min(errorCode, 1000)); |
|
Ilya Sherman
2017/06/08 01:29:00
It's probably ok not to cap the error code, since
pkotwicz
2017/06/08 02:23:21
The error codes have whacky values. I think that a
|
| + } |
| + |
| /** |
| * Records whether updating a WebAPK from Google Play succeeded. If not, records the reason |
| * that the update failed. |