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

Unified Diff: components/ntp_tiles/most_visited_sites.cc

Issue 2720513004: ntp_tiles: fetch popular sites icons for 2nd NTP (Closed)
Patch Set: Created 3 years, 10 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/ntp_tiles/most_visited_sites.cc
diff --git a/components/ntp_tiles/most_visited_sites.cc b/components/ntp_tiles/most_visited_sites.cc
index f3695c9946ec90bfe44a7e89456e6e539e820fd9..3b65bf1882aeb7b851225912afd3ebae2337d647 100644
--- a/components/ntp_tiles/most_visited_sites.cc
+++ b/components/ntp_tiles/most_visited_sites.cc
@@ -418,6 +418,12 @@ void MostVisitedSites::OnPopularSitesDownloaded(bool success) {
LOG(WARNING) << "Download of popular sites failed";
return;
}
+
+ for (const PopularSites::Site& popular_site : popular_sites_->sites()) {
+ // Ignore callback; these icons will be seen on the *next* NTP.
+ icon_cacher_->StartFetch(popular_site,
Marc Treib 2017/02/27 12:33:35 Hrm. So if the NTP gets closed in the meantime, th
sfiera 2017/02/27 12:51:33 Yes. But that's already true of PopularSites as a
fhorschig 2017/02/27 15:40:28 +1 to making MVS/PS long-lived. (Maybe not in this
+ base::Bind([](bool newly_available) {}));
Marc Treib 2017/02/27 12:33:35 Can we just pass a null Callback here?
sfiera 2017/02/27 12:51:33 Do you mean to change the signature of StartFetch(
Marc Treib 2017/02/27 13:09:35 No, I mean just passing "PopularSites::FinishedCal
fhorschig 2017/02/27 15:40:28 Agree to the readability but I think it's more lik
+ }
}
void MostVisitedSites::OnIconMadeAvailable(const GURL& site_url,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698