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

Unified Diff: chrome/browser/android/dev_tools_server.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/android/dev_tools_server.cc
diff --git a/chrome/browser/android/dev_tools_server.cc b/chrome/browser/android/dev_tools_server.cc
index da5ac36d36874b2ee3662b9e3c7005b55359db82..69d349d71e2562611bbfddb7d17e5163e71dbe50 100644
--- a/chrome/browser/android/dev_tools_server.cc
+++ b/chrome/browser/android/dev_tools_server.cc
@@ -21,6 +21,7 @@
#include "chrome/browser/android/tab_android.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/history/top_sites.h"
+#include "chrome/browser/history/top_sites_service_factory.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/ui/android/tab_model/tab_model.h"
#include "chrome/browser/ui/android/tab_model/tab_model_list.h"
@@ -123,8 +124,9 @@ class DevToolsServerDelegate : public content::DevToolsHttpHandlerDelegate {
static void PopulatePageThumbnails() {
Profile* profile =
ProfileManager::GetLastUsedProfile()->GetOriginalProfile();
- history::TopSites* top_sites = profile->GetTopSites();
- if (top_sites)
+ scoped_refptr<history::TopSites> top_sites =
+ TopSitesServiceFactory::GetForProfile(profile);
+ if (top_sites.get())
top_sites->SyncWithHistory();
}

Powered by Google App Engine
This is Rietveld 408576698