Index: chrome/browser/ui/webui/ntp/suggestions_page_handler.cc |
diff --git a/chrome/browser/ui/webui/ntp/suggestions_page_handler.cc b/chrome/browser/ui/webui/ntp/suggestions_page_handler.cc |
index 4d606fe2d0c02ebc3797f0e909e93accedd24cf1..2e359b4192d54228a0e1fce8883f1569adfb93cc 100644 |
--- a/chrome/browser/ui/webui/ntp/suggestions_page_handler.cc |
+++ b/chrome/browser/ui/webui/ntp/suggestions_page_handler.cc |
@@ -17,6 +17,7 @@ |
#include "base/values.h" |
#include "chrome/browser/chrome_notification_types.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/favicon_source.h" |
#include "chrome/browser/ui/webui/ntp/ntp_stats.h" |
@@ -69,7 +70,8 @@ void SuggestionsHandler::RegisterMessages() { |
// TODO(georgey) change the source of the web-sites to provide our data. |
// Initial commit uses top sites as a data source. |
- history::TopSites* top_sites = profile->GetTopSites(); |
+ scoped_refptr<history::TopSites> top_sites = |
+ TopSitesFactory::GetForProfile(profile); |
if (top_sites) { |
// TopSites updates itself after a delay. This is especially noticable when |
// your profile is empty. Ask TopSites to update itself when we're about to |
@@ -79,7 +81,7 @@ void SuggestionsHandler::RegisterMessages() { |
// Register for notification when TopSites changes so that we can update |
// ourself. |
registrar_.Add(this, chrome::NOTIFICATION_TOP_SITES_CHANGED, |
sdefresne
2015/01/21 17:57:24
Same here, you have a conflict with upstream that
|
- content::Source<history::TopSites>(top_sites)); |
+ content::Source<history::TopSites>(top_sites.get())); |
} |
// Setup the suggestions sources. |