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

Unified Diff: chrome/browser/ntp_snippets/download_suggestions_provider.cc

Issue 2558743003: Add generic functions for getting typed variation parameter values (Closed)
Patch Set: Alexei's 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
« no previous file with comments | « no previous file | components/ntp_snippets/bookmarks/bookmark_suggestions_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ntp_snippets/download_suggestions_provider.cc
diff --git a/chrome/browser/ntp_snippets/download_suggestions_provider.cc b/chrome/browser/ntp_snippets/download_suggestions_provider.cc
index 1189dd79942bbbc9192d5a45bfca4d5275f14de7..7dfb81d6a5de40afa57ad19a561fe23753aaf929 100644
--- a/chrome/browser/ntp_snippets/download_suggestions_provider.cc
+++ b/chrome/browser/ntp_snippets/download_suggestions_provider.cc
@@ -25,6 +25,7 @@
#include "components/offline_pages/core/offline_page_model_query.h"
#include "components/prefs/pref_registry_simple.h"
#include "components/prefs/pref_service.h"
+#include "components/variations/variations_associated_data.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/image/image.h"
@@ -51,7 +52,7 @@ const char* kMaxSuggestionsCountParamName = "downloads_max_count";
int GetMaxSuggestionsCount() {
bool assets_enabled =
base::FeatureList::IsEnabled(features::kAssetDownloadSuggestionsFeature);
- return ntp_snippets::GetParamAsInt(
+ return variations::GetVariationParamByFeatureAsInt(
assets_enabled ? features::kAssetDownloadSuggestionsFeature
: features::kOfflinePageDownloadSuggestionsFeature,
kMaxSuggestionsCountParamName, kDefaultMaxSuggestionsCount);
« no previous file with comments | « no previous file | components/ntp_snippets/bookmarks/bookmark_suggestions_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698