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

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

Issue 631253002: Refactor sending NOTIFICATION_HISTORY_URL_VISITED (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 52d2826baab9891f79744f57726e642314c5f4a8..941c1a17ec47666a56d998366503cb3f50ea4de3 100644
--- a/chrome/browser/history/history_service_factory.cc
+++ b/chrome/browser/history/history_service_factory.cc
@@ -72,10 +72,13 @@ HistoryServiceFactory::~HistoryServiceFactory() {
KeyedService* HistoryServiceFactory::BuildServiceInstanceFor(
content::BrowserContext* context) const {
Profile* profile = static_cast<Profile*>(context);
- scoped_ptr<HistoryService> history_service(new HistoryService(
- ChromeHistoryClientFactory::GetForProfile(profile), profile));
+ ChromeHistoryClient* history_client =
+ ChromeHistoryClientFactory::GetForProfile(profile);
+ scoped_ptr<HistoryService> history_service(
+ new HistoryService(history_client, profile));
if (!history_service->Init(profile->GetPath()))
return NULL;
+ history_client->SetHistoryService(history_service.get());
blundell 2014/10/08 09:59:13 Will we be able to remove this once everything is
sdefresne 2014/10/09 09:38:15 Done.
ChromeBookmarkClientFactory::GetForProfile(profile)
->SetHistoryService(history_service.get());
return history_service.release();

Powered by Google App Engine
This is Rietveld 408576698