| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_NTP_SNIPPETS_NTP_SNIPPETS_METRICS_H_ | 5 #ifndef CHROME_BROWSER_NTP_SNIPPETS_NTP_SNIPPETS_METRICS_H_ |
| 6 #define CHROME_BROWSER_NTP_SNIPPETS_NTP_SNIPPETS_METRICS_H_ | 6 #define CHROME_BROWSER_NTP_SNIPPETS_NTP_SNIPPETS_METRICS_H_ |
| 7 | 7 |
| 8 enum ContentSuggestionsNotificationImpression { | 8 enum ContentSuggestionsNotificationImpression { |
| 9 CONTENT_SUGGESTIONS_ARTICLE = 0, // Server-provided "articles" category. | 9 CONTENT_SUGGESTIONS_ARTICLE = 0, // Server-provided "articles" category. |
| 10 CONTENT_SUGGESTIONS_NONARTICLE, // Anything else. | 10 CONTENT_SUGGESTIONS_NONARTICLE, // Anything else. |
| 11 | 11 |
| 12 MAX_CONTENT_SUGGESTIONS_NOTIFICATION_IMPRESSION | 12 MAX_CONTENT_SUGGESTIONS_NOTIFICATION_IMPRESSION |
| 13 }; | 13 }; |
| 14 | 14 |
| 15 // TODO(https://crbug.com/710254) Switch to enum class to remove need for |
| 16 // prefix strip. |
| 15 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.ntp.snippets | 17 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.ntp.snippets |
| 18 // GENERATED_JAVA_PREFIX_TO_STRIP: CONTENT_SUGGESTIONS_ |
| 16 enum ContentSuggestionsNotificationAction { | 19 enum ContentSuggestionsNotificationAction { |
| 17 CONTENT_SUGGESTIONS_TAP = 0, // User tapped notification to open article. | 20 CONTENT_SUGGESTIONS_TAP = 0, // User tapped notification to open article. |
| 18 CONTENT_SUGGESTIONS_DISMISSAL, // User swiped notification to dismiss it. | 21 CONTENT_SUGGESTIONS_DISMISSAL, // User swiped notification to dismiss it. |
| 19 | 22 |
| 20 CONTENT_SUGGESTIONS_HIDE_DEADLINE, // notification_extra().deadline passed. | 23 CONTENT_SUGGESTIONS_HIDE_DEADLINE, // notification_extra().deadline passed. |
| 21 CONTENT_SUGGESTIONS_HIDE_EXPIRY, // NTP no longer shows notified article. | 24 CONTENT_SUGGESTIONS_HIDE_EXPIRY, // NTP no longer shows notified article. |
| 22 CONTENT_SUGGESTIONS_HIDE_FRONTMOST, // Chrome became the frontmost app. | 25 CONTENT_SUGGESTIONS_HIDE_FRONTMOST, // Chrome became the frontmost app. |
| 23 CONTENT_SUGGESTIONS_HIDE_DISABLED, // NTP no longer shows whole category. | 26 CONTENT_SUGGESTIONS_HIDE_DISABLED, // NTP no longer shows whole category. |
| 24 CONTENT_SUGGESTIONS_HIDE_SHUTDOWN, // Content sugg service is shutting down. | 27 CONTENT_SUGGESTIONS_HIDE_SHUTDOWN, // Content sugg service is shutting down. |
| 25 | 28 |
| 29 CONTENT_SUGGESTIONS_OPEN_SETTINGS, // User opened settings from notification. |
| 30 |
| 26 MAX_CONTENT_SUGGESTIONS_NOTIFICATION_ACTION | 31 MAX_CONTENT_SUGGESTIONS_NOTIFICATION_ACTION |
| 27 }; | 32 }; |
| 28 | 33 |
| 34 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.ntp.snippets |
| 35 // GENERATED_JAVA_PREFIX_TO_STRIP: CONTENT_SUGGESTIONS_ |
| 29 enum ContentSuggestionsNotificationOptOut { | 36 enum ContentSuggestionsNotificationOptOut { |
| 30 CONTENT_SUGGESTIONS_IMPLICIT = 0, // User ignored notifications. | 37 CONTENT_SUGGESTIONS_IMPLICIT = 0, // User ignored notifications. |
| 31 CONTENT_SUGGESTIONS_EXPLICIT, // User explicitly opted-out. | 38 CONTENT_SUGGESTIONS_EXPLICIT, // User explicitly opted-out. |
| 32 | 39 |
| 33 MAX_CONTENT_SUGGESTIONS_NOTIFICATION_OPT_OUT | 40 MAX_CONTENT_SUGGESTIONS_NOTIFICATION_OPT_OUT |
| 34 }; | 41 }; |
| 35 | 42 |
| 36 void RecordContentSuggestionsNotificationImpression( | 43 void RecordContentSuggestionsNotificationImpression( |
| 37 ContentSuggestionsNotificationImpression what); | 44 ContentSuggestionsNotificationImpression what); |
| 38 void RecordContentSuggestionsNotificationAction( | 45 void RecordContentSuggestionsNotificationAction( |
| 39 ContentSuggestionsNotificationAction what); | 46 ContentSuggestionsNotificationAction what); |
| 40 void RecordContentSuggestionsNotificationOptOut( | 47 void RecordContentSuggestionsNotificationOptOut( |
| 41 ContentSuggestionsNotificationOptOut what); | 48 ContentSuggestionsNotificationOptOut what); |
| 42 | 49 |
| 43 #endif // CHROME_BROWSER_NTP_SNIPPETS_NTP_SNIPPETS_METRICS_H_ | 50 #endif // CHROME_BROWSER_NTP_SNIPPETS_NTP_SNIPPETS_METRICS_H_ |
| OLD | NEW |