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

Unified Diff: chrome/browser/about_flags.cc

Issue 2595883002: [NTP::SectionOrder] Add a flag to choose category ranker. (Closed)
Patch Set: 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: chrome/browser/about_flags.cc
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index 6bb5213cbb41e5b42dd8042a593bd8eafcc3abd6..0f3a8d42bec12d463ceee44b7b07d732908c3228 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -510,6 +510,27 @@ const FeatureEntry::Choice kNtpSwitchToExistingTabChoices[] = {
#endif // OS_ANDROID
#if defined(OS_ANDROID)
+const FeatureEntry::FeatureParam
+ kNTPSnippetsCategoryRankerFeatureVariationConstant[] = {
+ {"category_ranker", "constant"},
+};
+
+const FeatureEntry::FeatureParam
+ kNTPSnippetsCategoryRankerFeatureVariationClickBased[] = {
+ {"category_ranker", "click_based"},
+};
+
+const FeatureEntry::FeatureVariation
+ kNTPSnippetsCategoryRankerFeatureVariations[] = {
+ {"(constant)", kNTPSnippetsCategoryRankerFeatureVariationConstant,
+ arraysize(kNTPSnippetsCategoryRankerFeatureVariationConstant),
+ nullptr},
+ {"(click based)", kNTPSnippetsCategoryRankerFeatureVariationClickBased,
+ arraysize(kNTPSnippetsCategoryRankerFeatureVariationClickBased),
+ nullptr}};
+#endif // OS_ANDROID
+
+#if defined(OS_ANDROID)
const FeatureEntry::FeatureParam kNTPSnippetsFeatureVariationOnlyPersonal[] = {
{"fetching_personalization", "personal"},
};
@@ -1839,6 +1860,12 @@ const FeatureEntry kFeatureEntries[] = {
SINGLE_VALUE_TYPE(extensions::switches::kDisableTabForDesktopShare)},
#endif // ENABLE_EXTENSIONS
#if defined(OS_ANDROID)
+ {"ntp-category-ranker", IDS_FLAGS_NTP_CATEGORY_RANKER_NAME,
+ IDS_FLAGS_NTP_CATEGORY_RANKER_DESCRIPTION, kOsAndroid,
+ FEATURE_WITH_VARIATIONS_VALUE_TYPE(
+ ntp_snippets::kCategoryRanker,
+ kNTPSnippetsCategoryRankerFeatureVariations,
+ ntp_snippets::kStudyName)},
{"enable-ntp-snippets", IDS_FLAGS_ENABLE_NTP_SNIPPETS_NAME,
IDS_FLAGS_ENABLE_NTP_SNIPPETS_DESCRIPTION, kOsAndroid,
FEATURE_WITH_VARIATIONS_VALUE_TYPE(

Powered by Google App Engine
This is Rietveld 408576698