| Index: chrome/browser/history/chrome_history_client_factory.cc
|
| diff --git a/chrome/browser/history/chrome_history_client_factory.cc b/chrome/browser/history/chrome_history_client_factory.cc
|
| index 10c8618e91d43199f6dfdbdad3bdc4c4afafadbb..0dcfe8c7638bd36a36694f7ba6295320a732bf87 100644
|
| --- a/chrome/browser/history/chrome_history_client_factory.cc
|
| +++ b/chrome/browser/history/chrome_history_client_factory.cc
|
| @@ -7,6 +7,7 @@
|
| #include "base/memory/singleton.h"
|
| #include "chrome/browser/bookmarks/bookmark_model_factory.h"
|
| #include "chrome/browser/history/chrome_history_client.h"
|
| +#include "chrome/browser/history/top_sites_service_factory.h"
|
| #include "chrome/browser/profiles/incognito_helpers.h"
|
| #include "chrome/browser/profiles/profile.h"
|
| #include "components/keyed_service/content/browser_context_dependency_manager.h"
|
| @@ -35,6 +36,7 @@ ChromeHistoryClientFactory::ChromeHistoryClientFactory()
|
| "ChromeHistoryClient",
|
| BrowserContextDependencyManager::GetInstance()) {
|
| DependsOn(BookmarkModelFactory::GetInstance());
|
| + DependsOn(TopSitesServiceFactory::GetInstance());
|
| }
|
|
|
| ChromeHistoryClientFactory::~ChromeHistoryClientFactory() {
|
| @@ -43,9 +45,10 @@ ChromeHistoryClientFactory::~ChromeHistoryClientFactory() {
|
| KeyedService* ChromeHistoryClientFactory::BuildServiceInstanceFor(
|
| content::BrowserContext* context) const {
|
| Profile* profile = static_cast<Profile*>(context);
|
| + scoped_refptr<history::TopSites> top_sites =
|
| + TopSitesServiceFactory::GetForProfile(profile);
|
| return new ChromeHistoryClient(BookmarkModelFactory::GetForProfile(profile),
|
| - profile,
|
| - profile->GetTopSites());
|
| + profile, top_sites.get());
|
| }
|
|
|
| content::BrowserContext* ChromeHistoryClientFactory::GetBrowserContextToUse(
|
|
|