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

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: Rebase 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
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..d597cc636b8db90db481e3add349e7a48cdbc3e9 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,7 @@ const char kMinutesHistogram[] =
"AppBanners.MinutesFromFirstVisitToBannerShown";
const char kUserResponseHistogram[] = "AppBanners.UserResponse";
const char kBeforeInstallEventHistogram[] = "AppBanners.BeforeInstallEvent";
+const char kInstallableErrorCodeHistogram[] = "AppBanners.InstallableErrorCode";
void TrackDismissEvent(int event) {
DCHECK_LT(DISMISS_EVENT_MIN, event);
@@ -55,4 +57,10 @@ void TrackBeforeInstallEvent(int event) {
UMA_HISTOGRAM_SPARSE_SLOWLY(kBeforeInstallEventHistogram, event);
}
+void TrackInstallableErrorCode(InstallableErrorCode code) {
+ DCHECK_LE(NO_ERROR_DETECTED, code);
+ DCHECK_LT(code, MAX_ERROR_CODE);
+ UMA_HISTOGRAM_SPARSE_SLOWLY(kInstallableErrorCodeHistogram, code);
+}
+
} // namespace banners

Powered by Google App Engine
This is Rietveld 408576698