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

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

Issue 1020913002: Cleanup ChromeHistoryClientFactory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix android compilation of unit tests Created 5 years, 9 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
« no previous file with comments | « chrome/browser/history/chrome_history_client_factory.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 23ec9bd742e9816c02cee9d981a8f1a266edeb80..63d3bd6f537c34db2faabe28ec537b6d405c1f67 100644
--- a/chrome/browser/history/chrome_history_client_factory.cc
+++ b/chrome/browser/history/chrome_history_client_factory.cc
@@ -12,20 +12,13 @@
#include "components/keyed_service/content/browser_context_dependency_manager.h"
// static
-ChromeHistoryClient* ChromeHistoryClientFactory::GetForProfile(
+history::HistoryClient* ChromeHistoryClientFactory::GetForProfile(
Profile* profile) {
- return static_cast<ChromeHistoryClient*>(
+ return static_cast<history::HistoryClient*>(
GetInstance()->GetServiceForBrowserContext(profile, true));
}
// static
-ChromeHistoryClient* ChromeHistoryClientFactory::GetForProfileWithoutCreating(
- Profile* profile) {
- return static_cast<ChromeHistoryClient*>(
- GetInstance()->GetServiceForBrowserContext(profile, false));
-}
-
-// static
ChromeHistoryClientFactory* ChromeHistoryClientFactory::GetInstance() {
return Singleton<ChromeHistoryClientFactory>::get();
}
@@ -42,7 +35,7 @@ ChromeHistoryClientFactory::~ChromeHistoryClientFactory() {
KeyedService* ChromeHistoryClientFactory::BuildServiceInstanceFor(
content::BrowserContext* context) const {
- Profile* profile = static_cast<Profile*>(context);
+ Profile* profile = Profile::FromBrowserContext(context);
return new ChromeHistoryClient(BookmarkModelFactory::GetForProfile(profile));
}
« no previous file with comments | « chrome/browser/history/chrome_history_client_factory.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698