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

Unified Diff: chrome/browser/ui/browser.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/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 9d0877b5b7bf8dc8fac2839edcb9f625caa3764d..70e33634bbde2838bcceaad4bf873dab82770a68 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -58,7 +58,8 @@
#include "chrome/browser/favicon/favicon_tab_helper.h"
#include "chrome/browser/file_select_helper.h"
#include "chrome/browser/first_run/first_run.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/infobars/infobar_service.h"
#include "chrome/browser/infobars/simple_alert_infobar_delegate.h"
#include "chrome/browser/lifetime/application_lifetime.h"
@@ -1881,12 +1882,13 @@ OmniboxView* Browser::GetOmniboxView() {
}
std::set<std::string> Browser::GetOpenUrls() {
- history::TopSites* top_sites = profile_->GetTopSites();
- if (!top_sites) // NULL for Incognito profiles.
+ history::TopSitesProvider* top_sites_provider =
+ TopSitesServiceFactory::GetForProfile(profile_);
+ if (!top_sites_provider) // NULL for Incognito profiles.
return std::set<std::string>();
std::set<std::string> open_urls;
- chrome::GetOpenUrls(*tab_strip_model_, *top_sites, &open_urls);
+ chrome::GetOpenUrls(*tab_strip_model_, *top_sites_provider, &open_urls);
return open_urls;
}

Powered by Google App Engine
This is Rietveld 408576698