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

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

Issue 2442843002: Override SigninManager::SignOut if force-signin is enabled. (Closed)
Patch Set: fixup Created 4 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/signin/signin_manager_factory.cc
diff --git a/chrome/browser/signin/signin_manager_factory.cc b/chrome/browser/signin/signin_manager_factory.cc
index 96856204292365b089c3f6396f3f8fc57089a039..727056846d1b7f9b6ff54b979cb6405d3032277a 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(
@@ -114,11 +119,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));
AccountFetcherServiceFactory::GetForProfile(profile);
#endif
service->Initialize(g_browser_process->local_state());

Powered by Google App Engine
This is Rietveld 408576698