Chromium Code Reviews| 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 10f458d7a3c6c1735c1bb8df5bf2a1324015e233..63fdc1b1468b7370aabc29315bdd5d44d7fb5fa7 100644 |
| --- a/chrome/browser/signin/signin_manager_factory.cc |
| +++ b/chrome/browser/signin/signin_manager_factory.cc |
| @@ -15,7 +15,12 @@ |
| #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" |
| #include "components/keyed_service/content/browser_context_dependency_manager.h" |
| #include "components/prefs/pref_registry_simple.h" |
| + |
| +#if !defined(OS_ANDROID) && !defined(OS_CHROMEOS) |
| +#include "chrome/browser/signin/force_signin_manager.h" |
| +#else |
| #include "components/signin/core/browser/signin_manager.h" |
| +#endif |
| SigninManagerFactory::SigninManagerFactory() |
| : BrowserContextKeyedServiceFactory( |
| @@ -115,11 +120,19 @@ KeyedService* SigninManagerFactory::BuildServiceInstanceFor( |
| client, |
| AccountTrackerServiceFactory::GetForProfile(profile)); |
| #else |
| - service = new SigninManager( |
| - client, |
| - ProfileOAuth2TokenServiceFactory::GetForProfile(profile), |
| - AccountTrackerServiceFactory::GetForProfile(profile), |
| - GaiaCookieManagerServiceFactory::GetForProfile(profile)); |
| +#if !defined(OS_ANDROID) |
| + if (ForceSigninManager::IsForceSigninEnabled()) |
| + service = new ForceSigninManager( |
| + profile, client, |
| + ProfileOAuth2TokenServiceFactory::GetForProfile(profile), |
| + AccountTrackerServiceFactory::GetForProfile(profile), |
| + GaiaCookieManagerServiceFactory::GetForProfile(profile)); |
| + else |
| +#endif |
| + service = new SigninManager( |
| + client, ProfileOAuth2TokenServiceFactory::GetForProfile(profile), |
| + AccountTrackerServiceFactory::GetForProfile(profile), |
| + GaiaCookieManagerServiceFactory::GetForProfile(profile)); |
|
Roger Tawa OOO till Jul 10th
2016/10/26 18:25:31
Nit: add { and } around if and else blocks.
|
| AccountFetcherServiceFactory::GetForProfile(profile); |
| #endif |
| service->Initialize(g_browser_process->local_state()); |