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

Unified Diff: chrome/browser/extensions/api/top_sites/top_sites_api.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/extensions/api/top_sites/top_sites_api.cc
diff --git a/chrome/browser/extensions/api/top_sites/top_sites_api.cc b/chrome/browser/extensions/api/top_sites/top_sites_api.cc
index 940667adfd5feeb9e786a4d21b94ad87b3b86c63..ead56e62c23fca118451ed2b9fa7faaaaff8b288 100644
--- a/chrome/browser/extensions/api/top_sites/top_sites_api.cc
+++ b/chrome/browser/extensions/api/top_sites/top_sites_api.cc
@@ -7,6 +7,7 @@
#include "base/bind.h"
#include "base/values.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/ui/webui/ntp/new_tab_ui.h"
@@ -18,7 +19,8 @@ TopSitesGetFunction::TopSitesGetFunction()
TopSitesGetFunction::~TopSitesGetFunction() {}
bool TopSitesGetFunction::RunAsync() {
- history::TopSites* ts = GetProfile()->GetTopSites();
+ scoped_refptr<history::TopSites> ts =
+ TopSitesFactory::GetForProfile(GetProfile());
if (!ts)
return false;

Powered by Google App Engine
This is Rietveld 408576698