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

Unified Diff: chrome/browser/banners/app_banner_metrics.cc

Issue 2178833002: Add new app banner metrics using InstallableStatusCode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@banner-integrate-checker-no-refptr
Patch Set: Fix histogram name Created 4 years, 4 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
« no previous file with comments | « chrome/browser/banners/app_banner_metrics.h ('k') | chrome/browser/banners/app_banner_settings_helper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/banners/app_banner_metrics.cc
diff --git a/chrome/browser/banners/app_banner_metrics.cc b/chrome/browser/banners/app_banner_metrics.cc
index 58e373d3b90f8786c20a60c933a28dcd343ea6f0..c5321f56e91127522d94ce62eb58a90c15431536 100644
--- a/chrome/browser/banners/app_banner_metrics.cc
+++ b/chrome/browser/banners/app_banner_metrics.cc
@@ -6,6 +6,7 @@
#include "base/metrics/histogram_macros.h"
#include "base/metrics/sparse_histogram.h"
+#include "chrome/browser/installable/installable_logging.h"
namespace banners {
@@ -16,6 +17,8 @@ const char kMinutesHistogram[] =
"AppBanners.MinutesFromFirstVisitToBannerShown";
const char kUserResponseHistogram[] = "AppBanners.UserResponse";
const char kBeforeInstallEventHistogram[] = "AppBanners.BeforeInstallEvent";
+const char kInstallableStatusCodeHistogram[] =
+ "AppBanners.InstallableStatusCode";
void TrackDismissEvent(int event) {
DCHECK_LT(DISMISS_EVENT_MIN, event);
@@ -55,4 +58,10 @@ void TrackBeforeInstallEvent(int event) {
UMA_HISTOGRAM_SPARSE_SLOWLY(kBeforeInstallEventHistogram, event);
}
+void TrackInstallableStatusCode(InstallableStatusCode code) {
+ DCHECK_LE(NO_ERROR_DETECTED, code);
+ DCHECK_LT(code, MAX_ERROR_CODE);
+ UMA_HISTOGRAM_SPARSE_SLOWLY(kInstallableStatusCodeHistogram, code);
+}
+
} // namespace banners
« no previous file with comments | « chrome/browser/banners/app_banner_metrics.h ('k') | chrome/browser/banners/app_banner_settings_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698