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

Unified Diff: components/ntp_snippets/remote/remote_suggestions_fetcher.cc

Issue 2804633003: Add base::FeatureParam<> struct (Closed)
Patch Set: rebase Created 3 years, 4 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/remote/remote_suggestions_fetcher.cc
diff --git a/components/ntp_snippets/remote/remote_suggestions_fetcher.cc b/components/ntp_snippets/remote/remote_suggestions_fetcher.cc
index 183519908a093eb73a983e93c68132d7be56050d..110b9610b846bd639daaa8d40e1ecac886f6d6e5 100644
--- a/components/ntp_snippets/remote/remote_suggestions_fetcher.cc
+++ b/components/ntp_snippets/remote/remote_suggestions_fetcher.cc
@@ -15,13 +15,13 @@ namespace ntp_snippets {
namespace {
// Variation parameter for chrome-content-suggestions backend.
-const char kContentSuggestionsBackend[] = "content_suggestions_backend";
+constexpr base::FeatureParam<std::string> kContentSuggestionsBackend{
+ &kArticleSuggestionsFeature, "content_suggestions_backend", ""};
} // namespace
GURL GetFetchEndpoint(version_info::Channel channel) {
- std::string endpoint = variations::GetVariationParamValueByFeature(
- ntp_snippets::kArticleSuggestionsFeature, kContentSuggestionsBackend);
+ std::string endpoint = kContentSuggestionsBackend.Get();
if (!endpoint.empty()) {
return GURL{endpoint};
}

Powered by Google App Engine
This is Rietveld 408576698