Chromium Code Reviews| Index: chrome/browser/automation/testing_automation_provider.cc |
| diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc |
| index 831194a1ebd119ef113d0b1956523b2a30f17707..ba1cd85fc2d234cbd39e9c879e9451e6527ab91e 100644 |
| --- a/chrome/browser/automation/testing_automation_provider.cc |
| +++ b/chrome/browser/automation/testing_automation_provider.cc |
| @@ -5979,11 +5979,20 @@ void TestingAutomationProvider::SetPolicies( |
| struct { |
| std::string name; |
| policy::ConfigurationPolicyProvider* provider; |
| + policy::PolicyLevel level; |
| } providers[] = { |
| - { "managed_cloud", connector->GetManagedCloudProvider() }, |
| - { "managed_platform", connector->GetManagedPlatformProvider() }, |
| - { "recommended_cloud", connector->GetRecommendedCloudProvider() }, |
| - { "recommended_platform", connector->GetRecommendedPlatformProvider() } |
| + { "managed_cloud", |
| + connector->GetManagedCloudProvider(), |
| + policy::POLICY_LEVEL_MANDATORY }, |
| + { "managed_platform", |
| + connector->GetManagedPlatformProvider(), |
| + policy::POLICY_LEVEL_MANDATORY }, |
| + { "recommended_cloud", |
| + connector->GetRecommendedCloudProvider(), |
| + policy::POLICY_LEVEL_RECOMMENDED }, |
| + { "recommended_platform", |
| + connector->GetRecommendedPlatformProvider(), |
| + policy::POLICY_LEVEL_RECOMMENDED }, |
| }; |
| // Verify if all the requested providers exist before changing anything. |
| for (size_t i = 0; i < ARRAYSIZE_UNSAFE(providers); ++i) { |
| @@ -5999,7 +6008,8 @@ void TestingAutomationProvider::SetPolicies( |
| DictionaryValue* policies = NULL; |
| if (args->GetDictionary(providers[i].name, &policies) && policies) { |
| policy::PolicyMap* map = new policy::PolicyMap; |
| - map->LoadFrom(policies, list); |
| + map->LoadFrom( |
| + policies, list, providers[i].level, policy::POLICY_SCOPE_USER); |
|
Mattias Nissler (ping if slow)
2012/01/16 18:23:33
nitty nit: Putting the first 3 parameters after (
Joao da Silva
2012/01/17 13:09:29
The scope should indeed be configurable. Added an
|
| providers[i].provider->OverridePolicies(map); |
| } |
| } |