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

Side by Side Diff: chrome/browser/signin/easy_unlock_service_factory.cc

Issue 2945023002: Introduce profile for lock screen apps (Closed)
Patch Set: rebase Created 3 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/signin/easy_unlock_service_factory.h" 5 #include "chrome/browser/signin/easy_unlock_service_factory.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/memory/singleton.h" 8 #include "base/memory/singleton.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "chrome/browser/cryptauth/chrome_cryptauth_service_factory.h" 10 #include "chrome/browser/cryptauth/chrome_cryptauth_service_factory.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 77
78 EasyUnlockServiceFactory::~EasyUnlockServiceFactory() { 78 EasyUnlockServiceFactory::~EasyUnlockServiceFactory() {
79 } 79 }
80 80
81 KeyedService* EasyUnlockServiceFactory::BuildServiceInstanceFor( 81 KeyedService* EasyUnlockServiceFactory::BuildServiceInstanceFor(
82 content::BrowserContext* context) const { 82 content::BrowserContext* context) const {
83 EasyUnlockService* service = NULL; 83 EasyUnlockService* service = NULL;
84 int manifest_id = 0; 84 int manifest_id = 0;
85 85
86 #if defined(OS_CHROMEOS) 86 #if defined(OS_CHROMEOS)
87 if (chromeos::ProfileHelper::IsLockScreenAppProfile(
88 Profile::FromBrowserContext(context))) {
89 return nullptr;
90 }
87 if (chromeos::ProfileHelper::IsSigninProfile( 91 if (chromeos::ProfileHelper::IsSigninProfile(
88 Profile::FromBrowserContext(context))) { 92 Profile::FromBrowserContext(context))) {
89 if (!context->IsOffTheRecord()) 93 if (!context->IsOffTheRecord())
90 return NULL; 94 return NULL;
91 95
92 service = new EasyUnlockServiceSignin(Profile::FromBrowserContext(context)); 96 service = new EasyUnlockServiceSignin(Profile::FromBrowserContext(context));
93 manifest_id = IDR_EASY_UNLOCK_MANIFEST_SIGNIN; 97 manifest_id = IDR_EASY_UNLOCK_MANIFEST_SIGNIN;
94 } 98 }
95 #endif 99 #endif
96 100
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 bool EasyUnlockServiceFactory::ServiceIsCreatedWithBrowserContext() const { 134 bool EasyUnlockServiceFactory::ServiceIsCreatedWithBrowserContext() const {
131 return true; 135 return true;
132 } 136 }
133 137
134 bool EasyUnlockServiceFactory::ServiceIsNULLWhileTesting() const { 138 bool EasyUnlockServiceFactory::ServiceIsNULLWhileTesting() const {
135 // Don't create the service for TestingProfile used in unit_tests because 139 // Don't create the service for TestingProfile used in unit_tests because
136 // EasyUnlockService uses ExtensionSystem::ready().Post, which expects 140 // EasyUnlockService uses ExtensionSystem::ready().Post, which expects
137 // a MessageLoop that does not exit in many unit_tests cases. 141 // a MessageLoop that does not exit in many unit_tests cases.
138 return true; 142 return true;
139 } 143 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_manager.cc ('k') | chrome/browser/supervised_user/child_accounts/child_account_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698