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

Unified Diff: chrome/browser/android/most_visited_sites.cc

Issue 1331113002: Popular sites on the NTP: Add Finch params for country and version (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dont_leak_files
Patch Set: rebase Created 5 years, 3 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 | « no previous file | chrome/browser/android/popular_sites.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/most_visited_sites.cc
diff --git a/chrome/browser/android/most_visited_sites.cc b/chrome/browser/android/most_visited_sites.cc
index 727dc1a37ae3fb9bf7000c672f13d2c2efb53d7f..37e2c188b796e110ec2643611e71f72adf92204c 100644
--- a/chrome/browser/android/most_visited_sites.cc
+++ b/chrome/browser/android/most_visited_sites.cc
@@ -129,6 +129,17 @@ bool ShouldShowPopularSites() {
base::CompareCase::INSENSITIVE_ASCII);
}
+std::string GetPopularSitesCountry() {
+ return variations::GetVariationParamValue(kPopularSitesFieldTrialName,
+ "country");
+}
+
+std::string GetPopularSitesVersion() {
+ return variations::GetVariationParamValue(kPopularSitesFieldTrialName,
+ "version");
+}
+
+// TODO(treib): Get rid of this.
std::string GetPopularSitesFilename() {
return variations::GetVariationParamValue(kPopularSitesFieldTrialName,
"filename");
@@ -238,6 +249,8 @@ void MostVisitedSites::SetMostVisitedURLsObserver(JNIEnv* env,
NeedPopularSites(profile_->GetPrefs(), num_sites_)) {
popular_sites_.reset(new PopularSites(
profile_,
+ GetPopularSitesCountry(),
+ GetPopularSitesVersion(),
GetPopularSitesFilename(),
base::Bind(&MostVisitedSites::OnPopularSitesAvailable,
base::Unretained(this))));
« no previous file with comments | « no previous file | chrome/browser/android/popular_sites.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698