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

Unified Diff: chrome/browser/policy/profile_policy_connector_factory.cc

Issue 2486813002: Add DeviceADPolicyManager to provide AD policy. (Closed)
Patch Set: Address Bernhard's comments Created 4 years, 1 month 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/policy/profile_policy_connector_factory.cc
diff --git a/chrome/browser/policy/profile_policy_connector_factory.cc b/chrome/browser/policy/profile_policy_connector_factory.cc
index a992459ddc09e029047967c6a8eab2a8682528e2..4b836952e3d96050c6bf13fddb5fc2084ab78ffe 100644
--- a/chrome/browser/policy/profile_policy_connector_factory.cc
+++ b/chrome/browser/policy/profile_policy_connector_factory.cc
@@ -110,12 +110,15 @@ ProfilePolicyConnectorFactory::CreateForBrowserContextInternal(
Profile* const profile = Profile::FromBrowserContext(context);
const user_manager::User* user = nullptr;
if (chromeos::ProfileHelper::IsSigninProfile(profile)) {
- policy::BrowserPolicyConnectorChromeOS* browser_policy_connector =
- g_browser_process->platform_part()->browser_policy_connector_chromeos();
policy::DeviceCloudPolicyManagerChromeOS* device_cloud_policy_manager =
- browser_policy_connector->GetDeviceCloudPolicyManager();
- device_cloud_policy_manager->SetSigninProfileSchemaRegistry(
- schema_registry);
+ g_browser_process->platform_part()
+ ->browser_policy_connector_chromeos()
+ ->GetDeviceCloudPolicyManager();
+ // TODO(tnagel): Do we need to do something for Active Directory management?
+ if (device_cloud_policy_manager) {
+ device_cloud_policy_manager->SetSigninProfileSchemaRegistry(
+ schema_registry);
+ }
} else {
user = chromeos::ProfileHelper::Get()->GetUserByProfile(profile);
CHECK(user);

Powered by Google App Engine
This is Rietveld 408576698