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

Unified Diff: chrome/browser/autocomplete/zero_suggest_provider.cc

Issue 815983002: Topsites become keyedService based. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove extra inclusion from testing_profile.h Created 5 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/autocomplete/zero_suggest_provider.cc
diff --git a/chrome/browser/autocomplete/zero_suggest_provider.cc b/chrome/browser/autocomplete/zero_suggest_provider.cc
index 3feaae3fbcf6257b60ad7a09518d12f5fb2e472d..3ce8f5c592dacf6ff9ed7252a540e0919509f8a3 100644
--- a/chrome/browser/autocomplete/zero_suggest_provider.cc
+++ b/chrome/browser/autocomplete/zero_suggest_provider.cc
@@ -20,6 +20,7 @@
#include "chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.h"
#include "chrome/browser/autocomplete/history_url_provider.h"
#include "chrome/browser/history/top_sites.h"
+#include "chrome/browser/history/top_sites_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search_engines/template_url_service_factory.h"
#include "chrome/common/pref_names.h"
@@ -318,7 +319,8 @@ AutocompleteMatch ZeroSuggestProvider::NavigationToMatch(
void ZeroSuggestProvider::Run(const GURL& suggest_url) {
if (OmniboxFieldTrial::InZeroSuggestMostVisitedFieldTrial()) {
most_visited_urls_.clear();
- history::TopSites* ts = profile_->GetTopSites();
+ scoped_refptr<history::TopSites> ts =
+ TopSitesFactory::GetForProfile(profile_);
if (ts) {
waiting_for_most_visited_urls_request_ = true;
ts->GetMostVisitedURLs(

Powered by Google App Engine
This is Rietveld 408576698