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

Unified Diff: chrome/browser/about_flags.cc

Issue 2182553002: Add other variations (with ids) for NTPSnippets to chrome://flags (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Alexei's comment #5 + fix a bug Created 4 years, 5 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
« no previous file with comments | « chrome/browser/about_flags.h ('k') | chrome/browser/chrome_browser_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/about_flags.cc
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index 07ecb14904397ebbee13285432523e34b9ef083f..ea354261692018a6d445ed04f68cf6b1383c4f6e 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -557,16 +557,41 @@ const FeatureEntry::FeatureParam
{"fetching_host_restrict", "on"},
};
+const FeatureEntry::FeatureParam kNTPSnippetsFeatureVariationServer[] = {
+ {"content_suggestions_backend",
+ "https://dev-chromecontentsuggestions-pa.sandbox.googleapis.com/v1/"
+ "snippets/list"}};
+
+const FeatureEntry::FeatureParam
+ kNTPSnippetsFeatureVariationServerNonPersonalized[] = {
+ {"content_suggestions_backend",
+ "https://dev-chromecontentsuggestions-pa.sandbox.googleapis.com/v1/"
+ "snippets/list"},
+ {"fetching_personalization", "non_personal"}};
+
const FeatureEntry::FeatureVariation kNTPSnippetsFeatureVariations[] = {
- {"only personalized", kNTPSnippetsFeatureVariationOnlyPersonal,
- arraysize(kNTPSnippetsFeatureVariationOnlyPersonal)},
- {"only from most visited sites",
+ {"via ChromeReader (only personalized)",
+ kNTPSnippetsFeatureVariationOnlyPersonal,
+ arraysize(kNTPSnippetsFeatureVariationOnlyPersonal), nullptr},
+ {"via ChromeReader (only from most visited sites)",
kNTPSnippetsFeatureVariationOnlyNonPersonalHostRestricted,
- arraysize(kNTPSnippetsFeatureVariationOnlyPersonal)},
- {"only personalized from most visited sites",
+ arraysize(kNTPSnippetsFeatureVariationOnlyPersonal), nullptr},
+ {"via ChromeReader (only personalized from most visited sites)",
kNTPSnippetsFeatureVariationOnlyPersonalHostRestricted,
- arraysize(kNTPSnippetsFeatureVariationOnlyPersonalHostRestricted)},
-};
+ arraysize(kNTPSnippetsFeatureVariationOnlyPersonalHostRestricted),
+ nullptr},
+ {"via content suggestion server (backed by ChromeReader)",
+ kNTPSnippetsFeatureVariationServer,
+ arraysize(kNTPSnippetsFeatureVariationServer), nullptr},
+ {"via content suggestion server (backed by ChromeReader, non-personalized)",
+ kNTPSnippetsFeatureVariationServerNonPersonalized,
+ arraysize(kNTPSnippetsFeatureVariationServerNonPersonalized), nullptr},
+ {"via content suggestion server (backed by Google Now)",
+ kNTPSnippetsFeatureVariationServer,
+ arraysize(kNTPSnippetsFeatureVariationServer), "3313279"},
+ {"via content suggestion server (backed by Google Now, non-personalized)",
+ kNTPSnippetsFeatureVariationServerNonPersonalized,
+ arraysize(kNTPSnippetsFeatureVariationServerNonPersonalized), "3313279"}};
#endif // defined(OS_ANDROID)
#if defined(OS_ANDROID)
@@ -2106,11 +2131,11 @@ void ConvertFlagsToSwitches(flags_ui::FlagsStorage* flags_storage,
switches::kDisableFeatures);
}
-void RegisterAllFeatureVariationParameters(
+std::vector<std::string> RegisterAllFeatureVariationParameters(
flags_ui::FlagsStorage* flags_storage,
base::FeatureList* feature_list) {
- FlagsStateSingleton::GetFlagsState()->RegisterAllFeatureVariationParameters(
- flags_storage, feature_list);
+ return FlagsStateSingleton::GetFlagsState()
+ ->RegisterAllFeatureVariationParameters(flags_storage, feature_list);
}
bool AreSwitchesIdenticalToCurrentCommandLine(
« no previous file with comments | « chrome/browser/about_flags.h ('k') | chrome/browser/chrome_browser_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698