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

Unified Diff: chrome/browser/chromeos/policy/user_policy_manager_factory_chromeos.cc

Issue 2945023002: Introduce profile for lock screen apps (Closed)
Patch Set: rebase Created 3 years, 6 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/chromeos/policy/user_policy_manager_factory_chromeos.cc
diff --git a/chrome/browser/chromeos/policy/user_policy_manager_factory_chromeos.cc b/chrome/browser/chromeos/policy/user_policy_manager_factory_chromeos.cc
index b0681d7a3dc7629e239e8e25f5cdabd5959ed78c..4a3d4807200f14d6944f6490da0c7f3688531b17 100644
--- a/chrome/browser/chromeos/policy/user_policy_manager_factory_chromeos.cc
+++ b/chrome/browser/chromeos/policy/user_policy_manager_factory_chromeos.cc
@@ -146,13 +146,17 @@ UserPolicyManagerFactoryChromeOS::CreateManagerForProfile(
const base::CommandLine* command_line =
base::CommandLine::ForCurrentProcess();
- // Don't initialize cloud policy for the signin profile.
- if (chromeos::ProfileHelper::IsSigninProfile(profile))
+ // Don't initialize cloud policy for the signin and the lock screen app
+ // profile.
+ if (chromeos::ProfileHelper::IsSigninProfile(profile) ||
+ chromeos::ProfileHelper::IsLockScreenAppProfile(profile)) {
return {};
+ }
- // |user| should never be nullptr except for the signin profile. This object
- // is created as part of the Profile creation, which happens right after
- // sign-in. The just-signed-in User is the active user during that time.
+ // |user| should never be nullptr except for the signin and lock screen app
+ // profile. This object is created as part of the Profile creation, which
+ // happens right after sign-in. The just-signed-in User is the active user
+ // during that time.
const user_manager::User* user =
chromeos::ProfileHelper::Get()->GetUserByProfile(profile);
CHECK(user);

Powered by Google App Engine
This is Rietveld 408576698