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

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

Issue 577683002: Introduce EasyUnlockService class for signin profile (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years, 3 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/easy_unlock_service.cc ('k') | chrome/browser/signin/easy_unlock_service_regular.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/signin/easy_unlock_service_factory.cc
diff --git a/chrome/browser/signin/easy_unlock_service_factory.cc b/chrome/browser/signin/easy_unlock_service_factory.cc
index 4e90429c3732d0537ce0523a1e28513cc726b95c..b831da6d725be28e2000ed566ac45f6b7b8dea66 100644
--- a/chrome/browser/signin/easy_unlock_service_factory.cc
+++ b/chrome/browser/signin/easy_unlock_service_factory.cc
@@ -8,12 +8,14 @@
#include "chrome/browser/profiles/incognito_helpers.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/signin/easy_unlock_service.h"
+#include "chrome/browser/signin/easy_unlock_service_regular.h"
#include "components/keyed_service/content/browser_context_dependency_manager.h"
#include "extensions/browser/extension_system_provider.h"
#include "extensions/browser/extensions_browser_client.h"
#if defined(OS_CHROMEOS)
#include "chrome/browser/chromeos/profiles/profile_helper.h"
+#include "chrome/browser/signin/easy_unlock_service_signin_chromeos.h"
#endif
// static
@@ -41,17 +43,17 @@ EasyUnlockServiceFactory::~EasyUnlockServiceFactory() {
KeyedService* EasyUnlockServiceFactory::BuildServiceInstanceFor(
content::BrowserContext* context) const {
- return new EasyUnlockService(Profile::FromBrowserContext(context));
-}
-
-content::BrowserContext* EasyUnlockServiceFactory::GetBrowserContextToUse(
- content::BrowserContext* context) const {
#if defined(OS_CHROMEOS)
if (chromeos::ProfileHelper::IsSigninProfile(
Profile::FromBrowserContext(context))) {
- return NULL;
+ return new EasyUnlockServiceSignin(Profile::FromBrowserContext(context));
}
#endif
+ return new EasyUnlockServiceRegular(Profile::FromBrowserContext(context));
+}
+
+content::BrowserContext* EasyUnlockServiceFactory::GetBrowserContextToUse(
+ content::BrowserContext* context) const {
return chrome::GetBrowserContextRedirectedInIncognito(context);
}
« no previous file with comments | « chrome/browser/signin/easy_unlock_service.cc ('k') | chrome/browser/signin/easy_unlock_service_regular.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698