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

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: 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 8323590f2cabcfe0ac43ae28c910b5d3524eec30..e41ac16dd7362682d01d4768f38d714e5a6d86fc 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/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 {

Powered by Google App Engine
This is Rietveld 408576698