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

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

Issue 305443004: Introduce HistoryClient interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@371825
Patch Set: Reupload with --no-find-copies 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/history_service_factory.cc
diff --git a/chrome/browser/history/history_service_factory.cc b/chrome/browser/history/history_service_factory.cc
index 13f137f60611fe466847634efc7373a1b892cebf..79b507432d7371000eb8fad8ca27a2b622936966 100644
--- a/chrome/browser/history/history_service_factory.cc
+++ b/chrome/browser/history/history_service_factory.cc
@@ -6,6 +6,8 @@
#include "base/prefs/pref_service.h"
#include "chrome/browser/bookmarks/bookmark_model_factory.h"
+#include "chrome/browser/history/chrome_history_client.h"
+#include "chrome/browser/history/chrome_history_client_factory.h"
#include "chrome/browser/history/history_service.h"
#include "chrome/browser/profiles/incognito_helpers.h"
#include "chrome/common/pref_names.h"
@@ -59,6 +61,7 @@ HistoryServiceFactory::HistoryServiceFactory()
: BrowserContextKeyedServiceFactory(
"HistoryService", BrowserContextDependencyManager::GetInstance()) {
DependsOn(BookmarkModelFactory::GetInstance());
+ DependsOn(ChromeHistoryClientFactory::GetInstance());
}
HistoryServiceFactory::~HistoryServiceFactory() {
@@ -67,7 +70,8 @@ HistoryServiceFactory::~HistoryServiceFactory() {
KeyedService* HistoryServiceFactory::BuildServiceInstanceFor(
content::BrowserContext* context) const {
Profile* profile = static_cast<Profile*>(context);
- HistoryService* history_service = new HistoryService(profile);
+ HistoryService* history_service = new HistoryService(
+ ChromeHistoryClientFactory::GetForProfile(profile), profile);
if (!history_service->Init(profile->GetPath(),
BookmarkModelFactory::GetForProfile(profile))) {
return NULL;
« no previous file with comments | « chrome/browser/history/history_service.cc ('k') | chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698