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..6785ba0f4cd2809a83ea6bd362da65f55f318277 100644 |
--- a/components/ntp_tiles/most_visited_sites.cc |
+++ b/components/ntp_tiles/most_visited_sites.cc |
@@ -326,7 +326,8 @@ NTPTilesVector MostVisitedSites::CreatePopularSitesTiles( |
const NTPTilesVector& personal_tiles, |
const NTPTilesVector& whitelist_tiles) { |
// For child accounts popular sites tiles will not be added. |
- if (supervisor_ && supervisor_->IsChildProfile()) |
+ if ((supervisor_ && supervisor_->IsChildProfile()) || |
+ !ShouldShowPopularSites()) |
sfiera
2017/02/13 15:05:54
I think this should be in the lower if-statement,
fhorschig
2017/02/13 18:13:44
Okay.
|
return NTPTilesVector(); |
size_t num_tiles = personal_tiles.size() + whitelist_tiles.size(); |
@@ -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, |