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

Side by Side 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 unified diff | Download patch
OLDNEW
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 COMPONENTS_NTP_SNIPPETS_FEATURES_H_ 5 #ifndef COMPONENTS_NTP_SNIPPETS_FEATURES_H_
6 #define COMPONENTS_NTP_SNIPPETS_FEATURES_H_ 6 #define COMPONENTS_NTP_SNIPPETS_FEATURES_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
11 #include "base/feature_list.h" 11 #include "base/feature_list.h"
12 #include "components/ntp_snippets/category_rankers/category_ranker.h" 12 #include "components/ntp_snippets/category_rankers/category_ranker.h"
13 #include "components/prefs/pref_service.h" 13 #include "components/prefs/pref_service.h"
14 14
15 namespace base { 15 namespace base {
16 class Clock; 16 class Clock;
17 } 17 }
18 18
19 namespace ntp_snippets { 19 namespace ntp_snippets {
20 20
21 //
22 // Null-terminated list of all features related to content suggestions.
23 //
24 // If you add a base::Feature below, you must add it to this list. It is used in
25 // internal pages to list relevant parameters and settings.
26 //
27 extern const base::Feature*(kAllFeatures[]);
28
21 // Features to turn individual providers/categories on/off. 29 // Features to turn individual providers/categories on/off.
22 // TODO(jkrcal): Rename to kRemoteSuggestionsFeature. 30 // TODO(jkrcal): Rename to kRemoteSuggestionsFeature.
23 extern const base::Feature kArticleSuggestionsFeature; 31 extern const base::Feature kArticleSuggestionsFeature;
24 extern const base::Feature kBookmarkSuggestionsFeature; 32 extern const base::Feature kBookmarkSuggestionsFeature;
25 extern const base::Feature kRecentOfflineTabSuggestionsFeature; 33 extern const base::Feature kRecentOfflineTabSuggestionsFeature;
26 extern const base::Feature kPhysicalWebPageSuggestionsFeature; 34 extern const base::Feature kPhysicalWebPageSuggestionsFeature;
27 extern const base::Feature kForeignSessionsSuggestionsFeature; 35 extern const base::Feature kForeignSessionsSuggestionsFeature;
28 36
29 // Feature to allow UI as specified here: https://crbug.com/660837. 37 // Feature to allow UI as specified here: https://crbug.com/660837.
30 extern const base::Feature kIncreasedVisibility; 38 extern const base::Feature kIncreasedVisibility;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 extern const char kCategoryOrderEmergingMarketsOriented[]; 73 extern const char kCategoryOrderEmergingMarketsOriented[];
66 74
67 enum class CategoryOrderChoice { 75 enum class CategoryOrderChoice {
68 GENERAL, 76 GENERAL,
69 EMERGING_MARKETS_ORIENTED, 77 EMERGING_MARKETS_ORIENTED,
70 }; 78 };
71 79
72 // Returns which category order to use according to kCategoryOrder feature. 80 // Returns which category order to use according to kCategoryOrder feature.
73 CategoryOrderChoice GetSelectedCategoryOrder(); 81 CategoryOrderChoice GetSelectedCategoryOrder();
74 82
83 // Enables and configures notifications for content suggestions on Android.
84 extern const base::Feature kNotificationsFeature;
85
86 // An integer. The priority of the notification, ranging from -2 (PRIORITY_MIN)
87 // to 2 (PRIORITY_MAX). Vibrates and makes sound if >= 0.
88 extern const char kNotificationsPriorityParam[];
89 constexpr int kNotificationsDefaultPriority = -1;
90
91 // "publisher": use article's publisher as notification's text (default).
92 // "snippet": use article's snippet as notification's text.
93 // "and_more": use "From $1. Read this article and $2 more." as text.
94 extern const char kNotificationsTextParam[];
95 extern const char kNotificationsTextValuePublisher[];
96 extern const char kNotificationsTextValueSnippet[];
97 extern const char kNotificationsTextValueAndMore[];
98
99 // "true": when Chrome becomes frontmost, leave notifications open.
100 // "false": automatically dismiss notification when Chrome becomes frontmost.
101 extern const char kNotificationsKeepWhenFrontmostParam[];
102
103 // "true": notifications link to chrome://newtab, with appropriate text.
104 // "false": notifications link to URL of notifying article.
105 extern const char kNotificationsOpenToNTPParam[];
106
107 // An integer. The maximum number of notifications that will be shown in 1 day.
108 extern const char kNotificationsDailyLimit[];
109 constexpr int kNotificationsDefaultDailyLimit = 1;
110
111 // An integer. The number of notifications that can be ignored. If the user
112 // ignores this many notifications or more, we stop sending them.
113 extern const char kNotificationsIgnoredLimitParam[];
114 constexpr int kNotificationsIgnoredDefaultLimit = 3;
115
75 } // namespace ntp_snippets 116 } // namespace ntp_snippets
76 117
77 #endif // COMPONENTS_NTP_SNIPPETS_FEATURES_H_ 118 #endif // COMPONENTS_NTP_SNIPPETS_FEATURES_H_
OLDNEW
« 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