| Index: chrome/browser/jumplist_win.cc
|
| diff --git a/chrome/browser/jumplist_win.cc b/chrome/browser/jumplist_win.cc
|
| index 1eb72f594f41574bbd54ba47ee04b41fa57b670f..4dc93b2798fcb014bdf754121e1a55a55392ea6b 100644
|
| --- a/chrome/browser/jumplist_win.cc
|
| +++ b/chrome/browser/jumplist_win.cc
|
| @@ -20,6 +20,7 @@
|
| #include "chrome/browser/favicon/favicon_service_factory.h"
|
| #include "chrome/browser/history/history_service.h"
|
| #include "chrome/browser/history/top_sites.h"
|
| +#include "chrome/browser/history/top_sites_factory.h"
|
| #include "chrome/browser/metrics/jumplist_metrics_win.h"
|
| #include "chrome/browser/profiles/profile.h"
|
| #include "chrome/browser/profiles/profile_info_cache.h"
|
| @@ -248,7 +249,8 @@ JumpList::JumpList(Profile* profile)
|
| icon_dir_ = profile_->GetPath().Append(chrome::kJumpListIconDirname);
|
| use_profiles_category_ = HasProfilesJumplistExperiment();
|
|
|
| - history::TopSites* top_sites = profile_->GetTopSites();
|
| + scoped_refptr<history::TopSites> top_sites =
|
| + TopSitesFactory::GetForProfile(profile_);
|
| if (top_sites) {
|
| // TopSites updates itself after a delay. This is especially noticable when
|
| // your profile is empty. Ask TopSites to update itself when jumplist is
|
| @@ -258,7 +260,7 @@ JumpList::JumpList(Profile* profile)
|
| // Register for notification when TopSites changes so that we can update
|
| // ourself.
|
| registrar_->Add(this, chrome::NOTIFICATION_TOP_SITES_CHANGED,
|
| - content::Source<history::TopSites>(top_sites));
|
| + content::Source<history::TopSites>(top_sites.get()));
|
| // Register for notification when profile is destroyed to ensure that all
|
| // observers are detatched at that time.
|
| registrar_->Add(this, chrome::NOTIFICATION_PROFILE_DESTROYED,
|
| @@ -293,7 +295,8 @@ void JumpList::Observe(int type,
|
| switch (type) {
|
| case chrome::NOTIFICATION_TOP_SITES_CHANGED: {
|
| // Most visited urls changed, query again.
|
| - history::TopSites* top_sites = profile_->GetTopSites();
|
| + scoped_refptr<history::TopSites> top_sites =
|
| + TopSitesFactory::GetForProfile(profile_);
|
| if (top_sites) {
|
| top_sites->GetMostVisitedURLs(
|
| base::Bind(&JumpList::OnMostVisitedURLsAvailable,
|
|
|