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

Unified Diff: components/ntp_snippets/offline_pages/recent_tab_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
Index: components/ntp_snippets/offline_pages/recent_tab_suggestions_provider.cc
diff --git a/components/ntp_snippets/offline_pages/recent_tab_suggestions_provider.cc b/components/ntp_snippets/offline_pages/recent_tab_suggestions_provider.cc
index 1585a6730a33fb3ebff543cb2701f2cddc19d213..f27892f36ac7236aa297cfa4efb0b9702dc8c488 100644
--- a/components/ntp_snippets/offline_pages/recent_tab_suggestions_provider.cc
+++ b/components/ntp_snippets/offline_pages/recent_tab_suggestions_provider.cc
@@ -20,6 +20,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 "grit/components_strings.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/image/image.h"
@@ -38,9 +39,9 @@ const int kDefaultMaxSuggestionsCount = 5;
const char* kMaxSuggestionsCountParamName = "recent_tabs_max_count";
int GetMaxSuggestionsCount() {
- return GetParamAsInt(kRecentOfflineTabSuggestionsFeature,
- kMaxSuggestionsCountParamName,
- kDefaultMaxSuggestionsCount);
+ return variations::GetVariationParamByFeatureAsInt(
+ kRecentOfflineTabSuggestionsFeature, kMaxSuggestionsCountParamName,
+ kDefaultMaxSuggestionsCount);
}
struct OrderOfflinePagesByMostRecentlyCreatedFirst {
« no previous file with comments | « components/ntp_snippets/features.cc ('k') | components/ntp_snippets/remote/remote_suggestions_hard_scheduler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698