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

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..f3c257f29d42a2351a803a2db493ece9c2aa1b0a 100644
--- a/chrome/browser/devtools/browser_list_tabcontents_provider.cc
+++ b/chrome/browser/devtools/browser_list_tabcontents_provider.cc
@@ -6,7 +6,8 @@
#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_provider.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) {
+ history::TopSitesProvider* top_sites_provider =
+ TopSitesServiceFactory::GetForProfile(*it);
+ if (top_sites_provider) {
// 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_provider->SyncWithHistory();
}
}
return ResourceBundle::GetSharedInstance().GetRawDataResource(

Powered by Google App Engine
This is Rietveld 408576698