| 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 f7a90a89b9e6437bcdf979561b522143f1fb8736..756e12082972cf8465c4d7dcbcd9815a83995985 100644
|
| --- a/components/ntp_tiles/most_visited_sites.cc
|
| +++ b/components/ntp_tiles/most_visited_sites.cc
|
| @@ -78,6 +78,21 @@ MostVisitedSites::~MostVisitedSites() {
|
| supervisor_->SetObserver(nullptr);
|
| }
|
|
|
| +bool MostVisitedSites::DoesSourceExist(NTPTileSource source) const {
|
| + switch (source) {
|
| + case NTPTileSource::TOP_SITES:
|
| + return top_sites_ != nullptr;
|
| + case NTPTileSource::SUGGESTIONS_SERVICE:
|
| + return suggestions_service_ != nullptr;
|
| + case NTPTileSource::POPULAR:
|
| + return popular_sites_ != nullptr;
|
| + case NTPTileSource::WHITELIST:
|
| + return supervisor_ != nullptr;
|
| + }
|
| + NOTREACHED();
|
| + return false;
|
| +}
|
| +
|
| void MostVisitedSites::SetMostVisitedURLsObserver(Observer* observer,
|
| int num_sites) {
|
| DCHECK(observer);
|
|
|