Index: components/policy/core/common/cloud/component_cloud_policy_service.cc |
diff --git a/components/policy/core/common/cloud/component_cloud_policy_service.cc b/components/policy/core/common/cloud/component_cloud_policy_service.cc |
index 0ba5db11f3d5736ce033cf6d8615c8abe48624f6..d2daeead3ad36573302b92f9c7aaeb9d659a5981 100644 |
--- a/components/policy/core/common/cloud/component_cloud_policy_service.cc |
+++ b/components/policy/core/common/cloud/component_cloud_policy_service.cc |
@@ -35,7 +35,8 @@ bool NotInSchemaMap(const scoped_refptr<SchemaMap> schema_map, |
return schema_map->GetSchema(PolicyNamespace(domain, component_id)) == NULL; |
} |
-bool ToPolicyNamespace(const PolicyNamespaceKey& key, PolicyNamespace* ns) { |
+bool ToPolicyNamespace(const std::pair<std::string, std::string>& key, |
+ PolicyNamespace* ns) { |
if (!ComponentCloudPolicyStore::GetPolicyDomain(key.first, &ns->domain)) |
return false; |
ns->component_id = key.second; |
@@ -304,8 +305,8 @@ void ComponentCloudPolicyService::OnCoreConnected(CloudPolicyCore* core) { |
core_->client()->AddObserver(this); |
// Register the supported policy domains at the client. |
- core_->client()->AddNamespaceToFetch( |
- PolicyNamespaceKey(dm_protocol::kChromeExtensionPolicyType, "")); |
+ core_->client()->AddPolicyTypeToFetch( |
+ dm_protocol::kChromeExtensionPolicyType, ""); |
// Immediately load any PolicyFetchResponses that the client may already |
// have if the backend is ready. |
@@ -320,8 +321,8 @@ void ComponentCloudPolicyService::OnCoreDisconnecting(CloudPolicyCore* core) { |
core_->client()->RemoveObserver(this); |
// Remove all the namespaces from the client. |
- core_->client()->RemoveNamespaceToFetch( |
- PolicyNamespaceKey(dm_protocol::kChromeExtensionPolicyType, "")); |
+ core_->client()->RemovePolicyTypeToFetch( |
+ dm_protocol::kChromeExtensionPolicyType, ""); |
} |
void ComponentCloudPolicyService::OnRefreshSchedulerStarted( |
@@ -396,8 +397,7 @@ void ComponentCloudPolicyService::OnPolicyFetched(CloudPolicyClient* client) { |
// Backend. |
const CloudPolicyClient::ResponseMap& responses = |
core_->client()->responses(); |
- for (CloudPolicyClient::ResponseMap::const_iterator it = responses.begin(); |
- it != responses.end(); ++it) { |
+ for (auto it = responses.begin(); it != responses.end(); ++it) { |
PolicyNamespace ns; |
if (ToPolicyNamespace(it->first, &ns) && |
current_schema_map_->GetSchema(ns)) { |