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

Unified Diff: components/ntp_snippets/features.h

Issue 2595883002: [NTP::SectionOrder] Add a flag to choose category ranker. (Closed)
Patch Set: histograms.xml + jkrcal@ & tschumann comments. Created 4 years 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 d4cf6a023d4a9398335fc392b3235c7aa52f524c..ae5c938cb88f5278fb8be15f00c6760d5d27d5fb 100644
--- a/components/ntp_snippets/features.h
+++ b/components/ntp_snippets/features.h
@@ -41,6 +41,21 @@ extern const base::Feature kFetchMoreFeature;
// Feature to prefer AMP URLs over regular URLs when available.
extern const base::Feature kPreferAmpUrlsFeature;
+// Feature to choose a category ranker.
+extern const base::Feature kCategoryRanker;
+
+const char kCategoryRankerParameter[] = "category_ranker";
jkrcal 2016/12/22 13:39:15 can you make these extern as well and define them
vitaliii 2016/12/22 13:47:10 Done.
+const char kCategoryRankerConstantRanker[] = "constant";
+const char kCategoryRankerClickBasedRanker[] = "click_based";
+
+enum class CategoryRankerChoice {
+ CONSTANT,
+ CLICK_BASED,
+};
+
+// Returns which CategoryRanker to use according to kCategoryRanker feature.
+CategoryRankerChoice GetSelectedCategoryRanker();
+
} // namespace ntp_snippets
#endif // COMPONENTS_NTP_SNIPPETS_FEATURES_H_
« no previous file with comments | « chrome/browser/ntp_snippets/content_suggestions_service_factory.cc ('k') | components/ntp_snippets/features.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698