Chromium Code Reviews| 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..ddf09c42d1e54aaf2cc5f9fb75c0acdf91d5be72 |
| --- /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_ |
| + |
| +#include "base/feature_list.h" |
| + |
| +enum ContentSuggestionsNotificationImpression { |
| + CONTENT_SUGGESTIONS_ARTICLE = 0, // Server-provided "articles" category. |
| + CONTENT_SUGGESTIONS_NONARTICLE, // Anything else. |
| + |
| + MAX_CONTENT_SUGGESTIONS_NOTIFICATION_IMPRESSION |
| +}; |
|
Bernhard Bauer
2017/01/11 15:21:49
Empty line afterwards please.
sfiera
2017/01/11 15:41:52
Done.
|
| +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_ |