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

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: Rebased and fixed unit test fail 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 6c926b9ecb866c7407bf0e3b20b6b4cdb4dcb9ec..f8bdfbd5bfd7fe0725f19c45b9acf1f8f0125205 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/lifetime/application_lifetime.h"
#include "chrome/browser/notifications/notification_ui_manager.h"
@@ -1882,12 +1883,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);
Bernhard Bauer 2015/01/22 21:23:27 Just dereferencing the scoped_refptr (not the raw
Jitu( very slow this week) 2015/01/23 11:36:53 Done.
return open_urls;
}

Powered by Google App Engine
This is Rietveld 408576698