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

Unified Diff: chrome/browser/automation/testing_automation_provider_chromeos.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_chromeos.cc
diff --git a/chrome/browser/automation/testing_automation_provider_chromeos.cc b/chrome/browser/automation/testing_automation_provider_chromeos.cc
index 727ddd5ac8f6a1a65f0df4301244c410443566f7..f092429dcb762d93d89a415a6a3fb2f66a27d9be 100644
--- a/chrome/browser/automation/testing_automation_provider_chromeos.cc
+++ b/chrome/browser/automation/testing_automation_provider_chromeos.cc
@@ -186,17 +186,18 @@ const char* EnterpriseStatusToString(
// PolicyLevel (Mandatory or Recommended policies).
DictionaryValue* CreateDictionaryWithPolicies(
policy::CloudPolicySubsystem* policy_subsystem,
- policy::CloudPolicyCacheBase::PolicyLevel policy_level) {
+ policy::PolicyLevel policy_level) {
DictionaryValue* dict = new DictionaryValue;
policy::CloudPolicyCacheBase* policy_cache =
policy_subsystem->GetCloudPolicyCacheBase();
if (policy_cache) {
- const policy::PolicyMap* policy_map = policy_cache->policy(policy_level);
+ const policy::PolicyMap* policy_map = policy_cache->policy();
if (policy_map) {
policy::PolicyMap::const_iterator i;
- for (i = policy_map->begin(); i != policy_map->end(); i++)
- dict->Set(policy::GetPolicyName(i->first),
- i->second->DeepCopy());
+ for (i = policy_map->begin(); i != policy_map->end(); i++) {
+ if (i->second.level == policy_level)
+ dict->Set(i->first, i->second.value->DeepCopy());
+ }
}
}
return dict;
@@ -986,16 +987,16 @@ void TestingAutomationProvider::GetEnterprisePolicyInfo(
// Get PolicyMaps.
return_value->Set("device_mandatory_policies",
CreateDictionaryWithPolicies(device_cloud_policy,
- policy::CloudPolicyCacheBase::POLICY_LEVEL_MANDATORY));
+ policy::POLICY_LEVEL_MANDATORY));
return_value->Set("user_mandatory_policies",
CreateDictionaryWithPolicies(user_cloud_policy,
- policy::CloudPolicyCacheBase::POLICY_LEVEL_MANDATORY));
+ policy::POLICY_LEVEL_MANDATORY));
return_value->Set("device_recommended_policies",
CreateDictionaryWithPolicies(device_cloud_policy,
- policy::CloudPolicyCacheBase::POLICY_LEVEL_RECOMMENDED));
+ policy::POLICY_LEVEL_RECOMMENDED));
return_value->Set("user_recommended_policies",
CreateDictionaryWithPolicies(user_cloud_policy,
- policy::CloudPolicyCacheBase::POLICY_LEVEL_RECOMMENDED));
+ policy::POLICY_LEVEL_RECOMMENDED));
reply.SendSuccess(return_value.get());
}
« no previous file with comments | « chrome/browser/automation/testing_automation_provider.cc ('k') | chrome/browser/policy/asynchronous_policy_loader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698