summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-02 07:39:19 +0000
committerxiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-02 07:39:19 +0000
commit0ac68ed510339f5b174b844ae88a646ede4a9288 (patch)
treeb8f6c065f623d52f74f4f6c10aea1839808d3935
parent442233d48747e65512b01ee892ba0c3a4eb8935a (diff)
downloadchromium_src-0ac68ed510339f5b174b844ae88a646ede4a9288.zip
chromium_src-0ac68ed510339f5b174b844ae88a646ede4a9288.tar.gz
chromium_src-0ac68ed510339f5b174b844ae88a646ede4a9288.tar.bz2
cros: Fix easy unlock app causing crash on login screen.
EasyUnlockService is created with profile. Previous code to prevent it from being created on login screen does not work for all cases. Move the logic to EasyUnlockServiceFactory::GetBrowserContextToUse fixes the issue. BUG=399705 TBR=rogerta@chromium.org Review URL: https://codereview.chromium.org/423363004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@287176 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/signin/easy_unlock_service_factory.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/chrome/browser/signin/easy_unlock_service_factory.cc b/chrome/browser/signin/easy_unlock_service_factory.cc
index b3c2904..4e90429 100644
--- a/chrome/browser/signin/easy_unlock_service_factory.cc
+++ b/chrome/browser/signin/easy_unlock_service_factory.cc
@@ -23,10 +23,6 @@ EasyUnlockServiceFactory* EasyUnlockServiceFactory::GetInstance() {
// static
EasyUnlockService* EasyUnlockServiceFactory::GetForProfile(Profile* profile) {
-#if defined(OS_CHROMEOS)
- if (chromeos::ProfileHelper::IsSigninProfile(profile))
- return NULL;
-#endif
return static_cast<EasyUnlockService*>(
EasyUnlockServiceFactory::GetInstance()->GetServiceForBrowserContext(
profile, true));
@@ -50,6 +46,12 @@ KeyedService* EasyUnlockServiceFactory::BuildServiceInstanceFor(
content::BrowserContext* EasyUnlockServiceFactory::GetBrowserContextToUse(
content::BrowserContext* context) const {
+#if defined(OS_CHROMEOS)
+ if (chromeos::ProfileHelper::IsSigninProfile(
+ Profile::FromBrowserContext(context))) {
+ return NULL;
+ }
+#endif
return chrome::GetBrowserContextRedirectedInIncognito(context);
}