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

Unified Diff: components/ntp_snippets/features.h

Issue 2696563002: [NTP::SectionOrder] Add EM oriented order. (Closed)
Patch Set: Created 3 years, 10 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
Index: components/ntp_snippets/features.h
diff --git a/components/ntp_snippets/features.h b/components/ntp_snippets/features.h
index cc8be99fdf3029c92d1994fda4b148c1c0d31ce2..3ef1800d7293fdd9d9bb94009535f23a9ae28f22 100644
--- a/components/ntp_snippets/features.h
+++ b/components/ntp_snippets/features.h
@@ -46,9 +46,8 @@ extern const base::Feature kPreferAmpUrlsFeature;
// Feature to choose a category ranker.
extern const base::Feature kCategoryRanker;
-// Parameter for a kCategoryRanker feature flag.
+// Parameter and its values for the kCategoryRanker feature flag.
extern const char kCategoryRankerParameter[];
-// Possible values of the parameter above.
extern const char kCategoryRankerConstantRanker[];
extern const char kCategoryRankerClickBasedRanker[];
@@ -65,6 +64,21 @@ std::unique_ptr<CategoryRanker> BuildSelectedCategoryRanker(
PrefService* pref_service,
std::unique_ptr<base::Clock> clock);
+// Feature to choose a default category order.
+extern const base::Feature kCategoryOrder;
+
+extern const char kCategoryOrderParameter[];
Marc Treib 2017/02/13 14:25:23 Comment, similar to CategoryRanker above?
vitaliii 2017/02/14 09:32:32 Done.
+extern const char kCategoryOrderGeneral[];
+extern const char kCategoryOrderEmergingMarketsOriented[];
+
+enum class CategoryOrderChoice {
+ GENERAL,
Marc Treib 2017/02/13 14:25:23 DEFAULT?
vitaliii 2017/02/14 09:32:32 I thought about this. These orders may be used in
+ EMERGING_MARKETS_ORIENTED,
+};
+
+// Returns which category order to use according to kCategoryOrder feature.
+CategoryOrderChoice GetSelectedCategoryOrder();
+
} // namespace ntp_snippets
#endif // COMPONENTS_NTP_SNIPPETS_FEATURES_H_

Powered by Google App Engine
This is Rietveld 408576698