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

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 comments Created 5 years, 11 months 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..54145ee8ed562be970e0360fe6657d8ddeb2ea4e 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -59,6 +59,7 @@
#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_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();
+ scoped_refptr<history::TopSites> top_sites =
+ TopSitesFactory::GetForProfile(profile_);
if (!top_sites) // 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.get(), &open_urls);
return open_urls;
}

Powered by Google App Engine
This is Rietveld 408576698