Chromium Code Reviews| 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..c050ffe85f8be8d725f9507e250194abe760e5e8 100644 |
| --- a/chrome/browser/signin/easy_unlock_service_factory.cc |
| +++ b/chrome/browser/signin/easy_unlock_service_factory.cc |
| @@ -8,6 +8,8 @@ |
| #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 "chrome/browser/signin/easy_unlock_service_signin_chromeos.h" |
|
xiyuan
2014/09/16 21:59:59
Move this into #if defined(OS_CHROMEOS) around lin
tbarzic
2014/09/16 22:30:58
d'oh forgot to move it when I made the file cros-o
|
| #include "components/keyed_service/content/browser_context_dependency_manager.h" |
| #include "extensions/browser/extension_system_provider.h" |
| #include "extensions/browser/extensions_browser_client.h" |
| @@ -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); |
| } |