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 5e89dd686387c9930452a8311226a11b89784341..b56a89871228b865c53057e5431467bb56d504e6 100644 |
--- a/chrome/browser/history/chrome_history_client_factory.cc |
+++ b/chrome/browser/history/chrome_history_client_factory.cc |
@@ -4,6 +4,8 @@ |
#include "chrome/browser/history/chrome_history_client_factory.h" |
+#include "base/memory/singleton.h" |
+#include "chrome/browser/bookmarks/bookmark_model_factory.h" |
#include "chrome/browser/history/chrome_history_client.h" |
#include "chrome/browser/profiles/incognito_helpers.h" |
#include "chrome/browser/profiles/profile.h" |
@@ -25,6 +27,7 @@ ChromeHistoryClientFactory::ChromeHistoryClientFactory() |
: BrowserContextKeyedServiceFactory( |
"ChromeHistoryClient", |
BrowserContextDependencyManager::GetInstance()) { |
+ DependsOn(BookmarkModelFactory::GetInstance()); |
} |
ChromeHistoryClientFactory::~ChromeHistoryClientFactory() { |
@@ -32,7 +35,8 @@ ChromeHistoryClientFactory::~ChromeHistoryClientFactory() { |
KeyedService* ChromeHistoryClientFactory::BuildServiceInstanceFor( |
content::BrowserContext* context) const { |
- return new ChromeHistoryClient(); |
+ return new ChromeHistoryClient( |
+ BookmarkModelFactory::GetForProfile(static_cast<Profile*>(context))); |
} |
content::BrowserContext* ChromeHistoryClientFactory::GetBrowserContextToUse( |