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

Unified Diff: chrome/browser/installable/installable_metrics.h

Issue 2778983005: Allow the app banner installability check to run on page load. (Closed)
Patch Set: Fix enum in test + minor improvements Created 3 years, 9 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/installable/installable_metrics.h
diff --git a/chrome/browser/installable/installable_metrics.h b/chrome/browser/installable/installable_metrics.h
new file mode 100644
index 0000000000000000000000000000000000000000..7d0e1b36c5d42f658f04fd5cd54d1a16633c7481
--- /dev/null
+++ b/chrome/browser/installable/installable_metrics.h
@@ -0,0 +1,26 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_INSTALLABLE_INSTALLABLE_METRICS_H_
+#define CHROME_BROWSER_INSTALLABLE_INSTALLABLE_METRICS_H_
+
+class InstallableMetrics {
+ public:
+ // This enum backs a UMA histogram and must be treated as append-only.
+ enum InstallabilityCheckStatus {
Ilya Sherman 2017/03/31 17:03:15 Optional nit: You can now use "enum class" without
dominickn 2017/04/03 00:06:46 Done. zomg no more static casting!!!!!
+ NOT_STARTED,
+ STOPPED_BEFORE_COMPLETION,
+ IN_PROGRESS_NON_PWA,
Ilya Sherman 2017/03/31 17:03:15 nit: "PWA" is not an obvious acronym, at least for
dominickn 2017/04/03 00:06:46 Done.
+ IN_PROGRESS_PWA,
+ COMPLETE_NON_PWA,
+ COMPLETE_PWA,
+ MAX,
Ilya Sherman 2017/03/31 17:03:16 Optional nit: I would name this "COUNT" -- "MAX" i
dominickn 2017/04/03 00:06:46 Done.
+ };
+
+ static void RecordMenuOpenHistogram(InstallabilityCheckStatus status);
+ static void RecordMenuItemAddToHomescreenHistogram(
+ InstallabilityCheckStatus status);
+};
+
+#endif // CHROME_BROWSER_INSTALLABLE_INSTALLABLE_METRICS_H_

Powered by Google App Engine
This is Rietveld 408576698