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

Unified Diff: chrome/browser/devtools/browser_list_tabcontents_provider.cc

Issue 815983002: Topsites become keyedService based. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 6 years 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/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(

Powered by Google App Engine
This is Rietveld 408576698