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

Unified Diff: chrome/browser/ntp_snippets/ntp_snippets_metrics.h

Issue 2626643002: Stop showing notifications if they're ignored (Closed)
Patch Set: Formatting, explicit Created 3 years, 11 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/ntp_snippets/ntp_snippets_metrics.h
diff --git a/chrome/browser/ntp_snippets/ntp_snippets_metrics.h b/chrome/browser/ntp_snippets/ntp_snippets_metrics.h
new file mode 100644
index 0000000000000000000000000000000000000000..68a65188c78371179355242e198ccbd29a6c0210
--- /dev/null
+++ b/chrome/browser/ntp_snippets/ntp_snippets_metrics.h
@@ -0,0 +1,44 @@
+// Copyright 2016 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_NTP_SNIPPETS_NTP_SNIPPETS_METRICS_H_
+#define CHROME_BROWSER_NTP_SNIPPETS_NTP_SNIPPETS_METRICS_H_
+
+#include "base/feature_list.h"
Alexei Svitkine (slow) 2017/01/11 16:45:59 Nit: Include not used?
sfiera 2017/01/12 11:26:23 Done.
+
+enum ContentSuggestionsNotificationImpression {
+ CONTENT_SUGGESTIONS_ARTICLE = 0, // Server-provided "articles" category.
+ CONTENT_SUGGESTIONS_NONARTICLE, // Anything else.
+
+ MAX_CONTENT_SUGGESTIONS_NOTIFICATION_IMPRESSION
+};
+
+enum ContentSuggestionsNotificationAction {
+ CONTENT_SUGGESTIONS_TAP = 0, // User tapped notification to open article.
+ CONTENT_SUGGESTIONS_DISMISSAL, // User swiped notification to dismiss it.
+
+ CONTENT_SUGGESTIONS_HIDE_DEADLINE, // notification_extra().deadline passed.
+ CONTENT_SUGGESTIONS_HIDE_EXPIRY, // NTP no longer shows notified article.
+ CONTENT_SUGGESTIONS_HIDE_FRONTMOST, // Chrome became the frontmost app.
+ CONTENT_SUGGESTIONS_HIDE_DISABLED, // NTP no longer shows whole category.
+ CONTENT_SUGGESTIONS_HIDE_SHUTDOWN, // Content sugg service is shutting down.
+
+ MAX_CONTENT_SUGGESTIONS_NOTIFICATION_ACTION
+};
+
+enum ContentSuggestionsNotificationOptOut {
+ CONTENT_SUGGESTIONS_IMPLICIT = 0, // User ignored notifications.
+ CONTENT_SUGGESTIONS_EXPLICIT, // User explicitly opted-out.
+
+ MAX_CONTENT_SUGGESTIONS_NOTIFICATION_OPT_OUT
+};
+
+void RecordContentSuggestionsNotificationImpression(
+ ContentSuggestionsNotificationImpression what);
+void RecordContentSuggestionsNotificationAction(
+ ContentSuggestionsNotificationAction what);
+void RecordContentSuggestionsNotificationOptOut(
+ ContentSuggestionsNotificationOptOut what);
+
+#endif // CHROME_BROWSER_NTP_SNIPPETS_NTP_SNIPPETS_METRICS_H_

Powered by Google App Engine
This is Rietveld 408576698