Index: chrome/browser/devtools/browser_list_tabcontents_provider.cc |
diff --git a/chrome/browser/devtools/browser_list_tabcontents_provider.cc b/chrome/browser/devtools/browser_list_tabcontents_provider.cc |
index a975222fe24e86fe8dca28378febfa2fcc7df7df..70c57a43d12e1d93256f38c1de5e181dbc9d66dd 100644 |
--- a/chrome/browser/devtools/browser_list_tabcontents_provider.cc |
+++ b/chrome/browser/devtools/browser_list_tabcontents_provider.cc |
@@ -7,6 +7,7 @@ |
#include "base/path_service.h" |
#include "base/strings/string_number_conversions.h" |
#include "chrome/browser/history/top_sites.h" |
+#include "chrome/browser/history/top_sites_service_factory.h" |
#include "chrome/browser/profiles/profile.h" |
#include "chrome/browser/ui/browser.h" |
#include "chrome/browser/ui/browser_iterator.h" |
@@ -52,11 +53,12 @@ std::string BrowserListTabContentsProvider::GetDiscoveryPageHTML() { |
for (std::set<Profile*>::iterator it = profiles.begin(); |
it != profiles.end(); ++it) { |
- history::TopSites* ts = (*it)->GetTopSites(); |
- if (ts) { |
+ scoped_refptr<history::TopSites> top_sites = |
+ TopSitesServiceFactory::GetForProfile(*it); |
+ if (top_sites.get()) { |
// TopSites updates itself after a delay. Ask TopSites to update itself |
// when we're about to show the remote debugging landing page. |
- ts->SyncWithHistory(); |
+ top_sites->SyncWithHistory(); |
} |
} |
return ResourceBundle::GetSharedInstance().GetRawDataResource( |