Commit dec137cb authored by Alexander Hendrich's avatar Alexander Hendrich Committed by Commit Bot

Fix profile() needed for login screen extensions

profile() is only needed for regular extension policies associated to
the user's profile(). The login screen extensions use the signin profile
instead, so we don't need to check for existence of profile().

Bug: 1025760
Change-Id: I8c28de42aead26aed13d3e5f6c9f72af03913e3c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2035977Reviewed-by: default avatarMaksim Ivanov <emaxx@chromium.org>
Commit-Queue: Alexander Hendrich <hendrich@chromium.org>
Cr-Commit-Position: refs/heads/master@{#738174}
parent f86d51a1
...@@ -540,12 +540,12 @@ Value DictionaryPolicyConversions::ToValue() { ...@@ -540,12 +540,12 @@ Value DictionaryPolicyConversions::ToValue() {
all_policies.SetKey("extensionPolicies", all_policies.SetKey("extensionPolicies",
GetExtensionPolicies(POLICY_DOMAIN_EXTENSIONS)); GetExtensionPolicies(POLICY_DOMAIN_EXTENSIONS));
#endif // BUILDFLAG(ENABLE_EXTENSIONS) #endif // BUILDFLAG(ENABLE_EXTENSIONS)
}
#if BUILDFLAG(ENABLE_EXTENSIONS) && defined(OS_CHROMEOS) #if BUILDFLAG(ENABLE_EXTENSIONS) && defined(OS_CHROMEOS)
all_policies.SetKey("loginScreenExtensionPolicies", all_policies.SetKey("loginScreenExtensionPolicies",
GetExtensionPolicies(POLICY_DOMAIN_SIGNIN_EXTENSIONS)); GetExtensionPolicies(POLICY_DOMAIN_SIGNIN_EXTENSIONS));
#endif // BUILDFLAG(ENABLE_EXTENSIONS) && defined(OS_CHROMEOS) #endif // BUILDFLAG(ENABLE_EXTENSIONS) && defined(OS_CHROMEOS)
}
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
all_policies.SetKey("deviceLocalAccountPolicies", all_policies.SetKey("deviceLocalAccountPolicies",
...@@ -599,14 +599,14 @@ Value ArrayPolicyConversions::ToValue() { ...@@ -599,14 +599,14 @@ Value ArrayPolicyConversions::ToValue() {
all_policies.Append(std::move(policy)); all_policies.Append(std::move(policy));
} }
#endif // BUILDFLAG(ENABLE_EXTENSIONS) #endif // BUILDFLAG(ENABLE_EXTENSIONS)
}
#if BUILDFLAG(ENABLE_EXTENSIONS) && defined(OS_CHROMEOS) #if BUILDFLAG(ENABLE_EXTENSIONS) && defined(OS_CHROMEOS)
for (auto& policy : for (auto& policy :
GetExtensionPolicies(POLICY_DOMAIN_SIGNIN_EXTENSIONS).TakeList()) { GetExtensionPolicies(POLICY_DOMAIN_SIGNIN_EXTENSIONS).TakeList()) {
all_policies.Append(std::move(policy)); all_policies.Append(std::move(policy));
}
#endif // BUILDFLAG(ENABLE_EXTENSIONS) && defined(OS_CHROMEOS)
} }
#endif // BUILDFLAG(ENABLE_EXTENSIONS) && defined(OS_CHROMEOS)
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
for (auto& device_policy : GetDeviceLocalAccountPolicies().TakeList()) for (auto& device_policy : GetDeviceLocalAccountPolicies().TakeList())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment