From 8d01f640208ff07115140f592ad1cf6de360cf0c Mon Sep 17 00:00:00 2001 From: "joaodasilva@chromium.org" Date: Tue, 12 Nov 2013 14:50:15 +0000 Subject: Policy providers all get a SchemaRegistry to work with. The SchemaRegistry contains the components that the policy provider should load policy for, as well as the expected policies and their types for each component. Also killed the PolicyDomainDescriptor, which was a similar way of doing this but had the problem of overlapping descriptors on shared policy providers. BUG=270667 R=bartfab@chromium.org, jochen@chromium.org, kalman@chromium.org Review URL: https://codereview.chromium.org/56623005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@234514 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/policy/profile_policy_connector.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'chrome/browser/policy/profile_policy_connector.cc') diff --git a/chrome/browser/policy/profile_policy_connector.cc b/chrome/browser/policy/profile_policy_connector.cc index 96812cc..ba88c99 100644 --- a/chrome/browser/policy/profile_policy_connector.cc +++ b/chrome/browser/policy/profile_policy_connector.cc @@ -12,6 +12,8 @@ #include "chrome/browser/policy/cloud/cloud_policy_manager.h" #include "chrome/browser/policy/configuration_policy_provider.h" #include "chrome/browser/policy/policy_service.h" +#include "chrome/browser/policy/schema_registry_service.h" +#include "chrome/browser/policy/schema_registry_service_factory.h" #if defined(OS_CHROMEOS) #include "base/bind.h" @@ -56,7 +58,8 @@ void ProfilePolicyConnector::Init( // This case occurs for the signin profile. special_user_policy_provider_.reset( new LoginProfilePolicyProvider(connector->GetPolicyService())); - special_user_policy_provider_->Init(); + special_user_policy_provider_->Init( + SchemaRegistryServiceFactory::GetForContext(profile_)); } else { // |user| should never be NULL except for the signin profile. is_primary_user_ = user == chromeos::UserManager::Get()->GetPrimaryUser(); @@ -122,7 +125,8 @@ void ProfilePolicyConnector::InitializeDeviceLocalAccountPolicyProvider( return; special_user_policy_provider_.reset(new DeviceLocalAccountPolicyProvider( username, device_local_account_policy_service)); - special_user_policy_provider_->Init(); + special_user_policy_provider_->Init( + SchemaRegistryServiceFactory::GetForContext(profile_)); } #endif -- cgit v1.1