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

Unified Diff: chrome/browser/history/chrome_history_client_factory.cc

Issue 285233012: Abstract history dependencies on bookmarks through HistoryClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 7 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/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(

Powered by Google App Engine
This is Rietveld 408576698