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

Unified Diff: components/ntp_snippets/features.h

Issue 2831553003: List our features in ntp_snippets::kAllFeatures (Closed)
Patch Set: rebase Created 3 years, 8 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
« no previous file with comments | « chrome/browser/ntp_snippets/ntp_snippets_features.cc ('k') | components/ntp_snippets/features.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/ntp_snippets/features.h
diff --git a/components/ntp_snippets/features.h b/components/ntp_snippets/features.h
index 8832aed550217336f78ebaea7414d73046e12712..9946e7c2d0a6c76799eb4123a3f891e1829e06dd 100644
--- a/components/ntp_snippets/features.h
+++ b/components/ntp_snippets/features.h
@@ -18,6 +18,14 @@ class Clock;
namespace ntp_snippets {
+//
+// Null-terminated list of all features related to content suggestions.
+//
+// If you add a base::Feature below, you must add it to this list. It is used in
+// internal pages to list relevant parameters and settings.
+//
+extern const base::Feature*(kAllFeatures[]);
+
// Features to turn individual providers/categories on/off.
// TODO(jkrcal): Rename to kRemoteSuggestionsFeature.
extern const base::Feature kArticleSuggestionsFeature;
@@ -72,6 +80,39 @@ enum class CategoryOrderChoice {
// Returns which category order to use according to kCategoryOrder feature.
CategoryOrderChoice GetSelectedCategoryOrder();
+// Enables and configures notifications for content suggestions on Android.
+extern const base::Feature kNotificationsFeature;
+
+// An integer. The priority of the notification, ranging from -2 (PRIORITY_MIN)
+// to 2 (PRIORITY_MAX). Vibrates and makes sound if >= 0.
+extern const char kNotificationsPriorityParam[];
+constexpr int kNotificationsDefaultPriority = -1;
+
+// "publisher": use article's publisher as notification's text (default).
+// "snippet": use article's snippet as notification's text.
+// "and_more": use "From $1. Read this article and $2 more." as text.
+extern const char kNotificationsTextParam[];
+extern const char kNotificationsTextValuePublisher[];
+extern const char kNotificationsTextValueSnippet[];
+extern const char kNotificationsTextValueAndMore[];
+
+// "true": when Chrome becomes frontmost, leave notifications open.
+// "false": automatically dismiss notification when Chrome becomes frontmost.
+extern const char kNotificationsKeepWhenFrontmostParam[];
+
+// "true": notifications link to chrome://newtab, with appropriate text.
+// "false": notifications link to URL of notifying article.
+extern const char kNotificationsOpenToNTPParam[];
+
+// An integer. The maximum number of notifications that will be shown in 1 day.
+extern const char kNotificationsDailyLimit[];
+constexpr int kNotificationsDefaultDailyLimit = 1;
+
+// An integer. The number of notifications that can be ignored. If the user
+// ignores this many notifications or more, we stop sending them.
+extern const char kNotificationsIgnoredLimitParam[];
+constexpr int kNotificationsIgnoredDefaultLimit = 3;
+
} // namespace ntp_snippets
#endif // COMPONENTS_NTP_SNIPPETS_FEATURES_H_
« no previous file with comments | « chrome/browser/ntp_snippets/ntp_snippets_features.cc ('k') | components/ntp_snippets/features.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698