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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/metrics/WebApkUma.java

Issue 2910313002: [Android WebAPK] Add UMA histogram to record error code when install fails pt 2/3 (Closed)
Patch Set: Merge branch 'master' into more_uma Created 3 years, 6 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: 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.

Powered by Google App Engine
This is Rietveld 408576698