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; |