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

Unified Diff: chrome/browser/automation/testing_automation_provider.cc

Issue 9111022: Removed ConfigurationPolicyType and extended PolicyMap. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 8 years, 11 months 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/automation/testing_automation_provider.cc
diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc
index 06001634259f9e91ee6311928edc67f59ff6ff88..0c3ddd238446adb2ae32a0c6c0c4a7d05c862c76 100644
--- a/chrome/browser/automation/testing_automation_provider.cc
+++ b/chrome/browser/automation/testing_automation_provider.cc
@@ -6057,11 +6057,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) {
@@ -6073,11 +6082,16 @@ void TestingAutomationProvider::SetPolicies(
return;
}
}
+ // TODO(joaodasilva): POLICY_SCOPE_USER is currently hardcoded, and the
+ // level is determined by the provider. Change this interface to support
+ // per-policy level and scope once the PolicyService is ready.
+ // http://crbug.com/110588
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(providers); ++i) {
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);
providers[i].provider->OverridePolicies(map);
}
}
« no previous file with comments | « chrome/app/policy/cloud_policy_codegen.gyp ('k') | chrome/browser/automation/testing_automation_provider_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698