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..de37765c2c3e880b40eccf5b54f23ad29a5be0af |
--- /dev/null |
+++ b/chrome/browser/ntp_snippets/ntp_snippets_metrics.h |
@@ -0,0 +1,42 @@ |
+// 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_ |
+ |
+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_ |