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

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

Issue 2672443002: Don't create MostVisitedSites in incognito (Closed)
Patch Set: 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
« no previous file with comments | « chrome/browser/ntp_tiles/chrome_most_visited_sites_factory.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/search/instant_service.cc
diff --git a/chrome/browser/search/instant_service.cc b/chrome/browser/search/instant_service.cc
index 4a1c3b142c8ca4076e58b0b8ee88481487c72826..e313d56e7edf93f618dffc7a283982ea57e1a91f 100644
--- a/chrome/browser/search/instant_service.cc
+++ b/chrome/browser/search/instant_service.cc
@@ -103,7 +103,8 @@ InstantService::InstantService(Profile* profile)
if (base::FeatureList::IsEnabled(kNtpTilesFeature)) {
most_visited_sites_ =
ChromeMostVisitedSitesFactory::NewForProfile(profile_);
- most_visited_sites_->SetMostVisitedURLsObserver(this, 8);
+ if (most_visited_sites_)
+ most_visited_sites_->SetMostVisitedURLsObserver(this, 8);
sfiera 2017/02/01 11:24:57 FYI, merge conflict with https://crrev.com/2619993
Marc Treib 2017/02/01 12:42:46 Thanks for the heads-up! Since that one doesn't lo
mastiz 2017/02/01 13:03:39 Don't worry about conflicts, I can resolve those i
} else {
top_sites_ = TopSitesFactory::GetForProfile(profile_);
if (top_sites_) {
« no previous file with comments | « chrome/browser/ntp_tiles/chrome_most_visited_sites_factory.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698