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

Unified Diff: chrome/browser/about_flags.cc

Issue 2595883002: [NTP::SectionOrder] Add a flag to choose category ranker. (Closed)
Patch Set: jkrcal@ nit. 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 4afb92b95251e881d00156464f22937759934ca7..a396e2bc06eb980871742725febb54331ebbb288 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -510,6 +510,29 @@ const FeatureEntry::Choice kNtpSwitchToExistingTabChoices[] = {
#endif // OS_ANDROID
#if defined(OS_ANDROID)
+const FeatureEntry::FeatureParam
+ kNTPSnippetsCategoryRankerFeatureVariationConstant[] = {
+ {ntp_snippets::kCategoryRankerParameter,
+ ntp_snippets::kCategoryRankerConstantRanker},
+};
+
+const FeatureEntry::FeatureParam
+ kNTPSnippetsCategoryRankerFeatureVariationClickBased[] = {
+ {ntp_snippets::kCategoryRankerParameter,
+ ntp_snippets::kCategoryRankerClickBasedRanker},
+};
+
+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 +1862,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