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

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

Issue 1314493013: Popular sites on the NTP: add thumbnails! (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix android_clang_dbg_recipe build 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 | « chrome/browser/android/popular_sites.h ('k') | components/suggestions/image_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/popular_sites.cc
diff --git a/chrome/browser/android/popular_sites.cc b/chrome/browser/android/popular_sites.cc
index f7cb722b86bbf846b856d119b921d3c2342f5642..7bacd4c270a99847b7ca6057a9bfb9233749aee4 100644
--- a/chrome/browser/android/popular_sites.cc
+++ b/chrome/browser/android/popular_sites.cc
@@ -27,7 +27,7 @@ using content::BrowserThread;
namespace {
const char kPopularSitesURLFormat[] = "https://www.gstatic.com/chrome/ntp/%s";
-const char kPopularSitesFilenameFormat[] = "suggested_sites_%s_1.json";
+const char kPopularSitesFilenameFormat[] = "suggested_sites_%s_2.json";
const char kPopularSitesDefaultCountryCode[] = "DEFAULT";
@@ -113,7 +113,11 @@ scoped_ptr<std::vector<PopularSites::Site>> ReadAndParseJsonFile(
continue;
std::string favicon_url;
item->GetString("favicon_url", &favicon_url);
- sites->push_back(PopularSites::Site(title, GURL(url), GURL(favicon_url)));
+ std::string thumbnail_url;
+ item->GetString("thumbnail_url", &thumbnail_url);
+
+ sites->push_back(PopularSites::Site(title, GURL(url), GURL(favicon_url),
+ GURL(thumbnail_url)));
}
return sites.Pass();
@@ -123,8 +127,14 @@ scoped_ptr<std::vector<PopularSites::Site>> ReadAndParseJsonFile(
PopularSites::Site::Site(const base::string16& title,
const GURL& url,
- const GURL& favicon_url)
- : title(title), url(url), favicon_url(favicon_url) {}
+ const GURL& favicon_url,
+ const GURL& thumbnail_url)
+ : title(title),
+ url(url),
+ favicon_url(favicon_url),
+ thumbnail_url(thumbnail_url) {}
+
+PopularSites::Site::~Site() {}
PopularSites::PopularSites(Profile* profile,
const std::string& filename,
« no previous file with comments | « chrome/browser/android/popular_sites.h ('k') | components/suggestions/image_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698