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

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

Issue 2867373003: Add metrics for webapk update rate. (Closed)
Patch Set: Created 3 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chrome.browser.metrics; 5 package org.chromium.chrome.browser.metrics;
6 6
7 import org.chromium.base.metrics.RecordHistogram; 7 import org.chromium.base.metrics.RecordHistogram;
8 8
9 import java.util.concurrent.TimeUnit; 9 import java.util.concurrent.TimeUnit;
10 10
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 /** 83 /**
84 * Records whether installing a WebAPK from Google Play succeeded. If not, r ecords the reason 84 * Records whether installing a WebAPK from Google Play succeeded. If not, r ecords the reason
85 * that the install failed. 85 * that the install failed.
86 */ 86 */
87 public static void recordGooglePlayInstallResult(int result) { 87 public static void recordGooglePlayInstallResult(int result) {
88 assert result >= 0 && result < GOOGLE_PLAY_INSTALL_RESULT_MAX; 88 assert result >= 0 && result < GOOGLE_PLAY_INSTALL_RESULT_MAX;
89 RecordHistogram.recordEnumeratedHistogram( 89 RecordHistogram.recordEnumeratedHistogram(
90 "WebApk.Install.GooglePlayInstallResult", result, GOOGLE_PLAY_IN STALL_RESULT_MAX); 90 "WebApk.Install.GooglePlayInstallResult", result, GOOGLE_PLAY_IN STALL_RESULT_MAX);
91 } 91 }
92 92
93 /**
94 * Records whether updating a WebAPK from Google Play succeeded. If not, rec ords the reason
95 * that the update failed.
96 */
97 public static void recordGooglePlayUpdateResult(int result) {
98 assert result >= 0 && result < GOOGLE_PLAY_INSTALL_RESULT_MAX;
99 RecordHistogram.recordEnumeratedHistogram(
100 "WebApk.Update.GooglePlayUpdateResult", result, GOOGLE_PLAY_INST ALL_RESULT_MAX);
101 }
102
93 /** Records the duration of a WebAPK session (from launch/foreground to back ground). */ 103 /** Records the duration of a WebAPK session (from launch/foreground to back ground). */
94 public static void recordWebApkSessionDuration(long duration) { 104 public static void recordWebApkSessionDuration(long duration) {
95 RecordHistogram.recordLongTimesHistogram( 105 RecordHistogram.recordLongTimesHistogram(
96 "WebApk.Session.TotalDuration", duration, TimeUnit.MILLISECONDS) ; 106 "WebApk.Session.TotalDuration", duration, TimeUnit.MILLISECONDS) ;
97 } 107 }
98 } 108 }
OLDNEW
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698