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

Unified Diff: chrome/browser/signin/signin_manager_factory.cc

Issue 12502017: signin: pull basic SigninManager functionality into new SigninManagerBase class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: deal with new enterprise_platform_keys_private_api Created 7 years, 8 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/signin/signin_manager_factory.h ('k') | chrome/browser/signin/signin_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/signin/signin_manager_factory.cc
diff --git a/chrome/browser/signin/signin_manager_factory.cc b/chrome/browser/signin/signin_manager_factory.cc
index 11dd5e694039cc370c5c28239e128494b6b951ec..b7b30525b572756446e14f36c936bed91d31d995 100644
--- a/chrome/browser/signin/signin_manager_factory.cc
+++ b/chrome/browser/signin/signin_manager_factory.cc
@@ -21,6 +21,22 @@ SigninManagerFactory::SigninManagerFactory()
SigninManagerFactory::~SigninManagerFactory() {}
+#if defined(OS_CHROMEOS)
+// static
+SigninManagerBase* SigninManagerFactory::GetForProfileIfExists(
+ Profile* profile) {
+ return static_cast<SigninManagerBase*>(
+ GetInstance()->GetServiceForProfile(profile, false));
+}
+
+// static
+SigninManagerBase* SigninManagerFactory::GetForProfile(
+ Profile* profile) {
+ return static_cast<SigninManagerBase*>(
+ GetInstance()->GetServiceForProfile(profile, true));
+}
+
+#else
// static
SigninManager* SigninManagerFactory::GetForProfile(Profile* profile) {
return static_cast<SigninManager*>(
@@ -32,6 +48,7 @@ SigninManager* SigninManagerFactory::GetForProfileIfExists(Profile* profile) {
return static_cast<SigninManager*>(
GetInstance()->GetServiceForProfile(profile, false));
}
+#endif
// static
SigninManagerFactory* SigninManagerFactory::GetInstance() {
@@ -62,7 +79,14 @@ void SigninManagerFactory::RegisterPrefs(PrefRegistrySimple* registry) {
ProfileKeyedService* SigninManagerFactory::BuildServiceInstanceFor(
Profile* profile) const {
- SigninManager* service = new SigninManager();
+
+ SigninManagerBase* service = NULL;
+#if defined(OS_CHROMEOS)
+ service = new SigninManagerBase();
+#else
+ service = new SigninManager();
+#endif
+
service->Initialize(profile);
return service;
}
« no previous file with comments | « chrome/browser/signin/signin_manager_factory.h ('k') | chrome/browser/signin/signin_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698