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

Unified Diff: chrome/browser/search/instant_service.cc

Issue 2619993002: ntp_tiles: Migrate to multi-observer model
Patch Set: Fixed build. Created 3 years, 11 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
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);
}

Powered by Google App Engine
This is Rietveld 408576698