Chromium Code Reviews| Index: chrome/browser/policy/schema_registry_service_factory.cc |
| diff --git a/chrome/browser/policy/schema_registry_service_factory.cc b/chrome/browser/policy/schema_registry_service_factory.cc |
| index 6c9fd50b43cc265bcabeb970a71404ad8108e030..a2eef5a3a9f7cd3af8b08366cf4c26b81d134781 100644 |
| --- a/chrome/browser/policy/schema_registry_service_factory.cc |
| +++ b/chrome/browser/policy/schema_registry_service_factory.cc |
| @@ -123,6 +123,23 @@ SchemaRegistryServiceFactory::CreateForContextInternal( |
| if (!registry) |
| registry.reset(new SchemaRegistry); |
| +#if defined(OS_CHROMEOS) |
| + Profile* const profile = Profile::FromBrowserContext(context); |
| + if (chromeos::ProfileHelper::IsSigninProfile(profile)) { |
| + // Pass the SchemaRegistry of the signin profile to device cloud policy |
| + // manager, for being used for fetching the component policies. |
| + policy::DeviceCloudPolicyManagerChromeOS* device_cloud_policy_manager = |
|
bartfab (slow)
2017/03/03 17:31:28
Nit: #include "chrome/browser/chromeos/policy/devi
emaxx
2017/03/03 17:42:09
Done.
|
| + 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( |
| + registry.get()); |
| + } |
| + } |
| +#endif |
| + |
| std::unique_ptr<SchemaRegistryService> service(new SchemaRegistryService( |
| std::move(registry), chrome_schema, global_registry)); |
| registries_[context] = service.get(); |