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

Unified Diff: components/ntp_tiles/most_visited_sites.cc

Issue 2668943002: provide static popular sites for first run (Closed)
Patch Set: Clean build/DEPS files 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 | « components/ntp_tiles/DEPS ('k') | components/ntp_tiles/most_visited_sites_unittest.cc » ('j') | 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 6df20e31c89d74107da78ad0a2a868b7dd370476..f3695c9946ec90bfe44a7e89456e6e539e820fd9 100644
--- a/components/ntp_tiles/most_visited_sites.cc
+++ b/components/ntp_tiles/most_visited_sites.cc
@@ -337,7 +337,8 @@ NTPTilesVector MostVisitedSites::CreatePopularSitesTiles(
size_t num_popular_sites_tiles = num_sites_ - num_tiles;
NTPTilesVector popular_sites_tiles;
- if (num_popular_sites_tiles > 0 && popular_sites_) {
+ if (num_popular_sites_tiles > 0 && popular_sites_ &&
+ ShouldShowPopularSites()) {
std::set<std::string> hosts;
for (const auto& tile : personal_tiles)
hosts.insert(tile.url.host());
@@ -417,9 +418,6 @@ void MostVisitedSites::OnPopularSitesDownloaded(bool success) {
LOG(WARNING) << "Download of popular sites failed";
return;
}
-
- // Re-build the tile list. Once done, this will notify the observer.
- BuildCurrentTiles();
}
void MostVisitedSites::OnIconMadeAvailable(const GURL& site_url,
« no previous file with comments | « components/ntp_tiles/DEPS ('k') | components/ntp_tiles/most_visited_sites_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698