Chromium Code Reviews| Index: chrome/browser/search/instant_service.cc |
| diff --git a/chrome/browser/search/instant_service.cc b/chrome/browser/search/instant_service.cc |
| index 3d5863dbb45a41b4987ce9f464745cb2a868e13c..abfbe96f1716054e95c55627f56cb2fe188d6261 100644 |
| --- a/chrome/browser/search/instant_service.cc |
| +++ b/chrome/browser/search/instant_service.cc |
| @@ -103,7 +103,7 @@ InstantService::InstantService(Profile* profile) |
| if (base::FeatureList::IsEnabled(kNtpTilesFeature)) { |
| most_visited_sites_ = |
| ChromeMostVisitedSitesFactory::NewForProfile(profile_); |
| - most_visited_sites_->SetMostVisitedURLsObserver(this, 8); |
| + most_visited_sites_->AddObserver(this); |
|
sfiera
2017/01/18 09:58:33
Here, you're not doing any filtering to produce 8
|
| } else { |
| top_sites_ = TopSitesFactory::GetForProfile(profile_); |
| if (top_sites_) { |
| @@ -151,6 +151,8 @@ InstantService::InstantService(Profile* profile) |
| } |
| InstantService::~InstantService() { |
| + if (most_visited_sites_) |
| + most_visited_sites_->RemoveObserver(this); |
| if (template_url_service_) |
| template_url_service_->RemoveObserver(this); |
| } |