Index: chrome/browser/policy/mock_configuration_policy_provider.cc |
diff --git a/chrome/browser/policy/mock_configuration_policy_provider.cc b/chrome/browser/policy/mock_configuration_policy_provider.cc |
index a2566b050f53bce640515ff573f2faa7115f356c..46f997c5d1dcfaa0160d90b6cee2772a0b7b8b15 100644 |
--- a/chrome/browser/policy/mock_configuration_policy_provider.cc |
+++ b/chrome/browser/policy/mock_configuration_policy_provider.cc |
@@ -15,23 +15,16 @@ MockConfigurationPolicyProvider::MockConfigurationPolicyProvider() |
initialization_complete_(false) { |
} |
-MockConfigurationPolicyProvider::~MockConfigurationPolicyProvider() { |
- STLDeleteValues(&policy_map_); |
-} |
+MockConfigurationPolicyProvider::~MockConfigurationPolicyProvider() {} |
void MockConfigurationPolicyProvider::AddPolicy(ConfigurationPolicyType policy, |
Value* value) { |
- std::swap(policy_map_[policy], value); |
- delete value; |
+ policy_map_.Set(policy, value); |
} |
void MockConfigurationPolicyProvider::RemovePolicy( |
ConfigurationPolicyType policy) { |
- const PolicyMap::iterator entry = policy_map_.find(policy); |
- if (entry != policy_map_.end()) { |
- delete entry->second; |
- policy_map_.erase(entry); |
- } |
+ policy_map_.Erase(policy); |
} |
void MockConfigurationPolicyProvider::SetInitializationComplete( |
@@ -52,4 +45,4 @@ bool MockConfigurationPolicyProvider::IsInitializationComplete() const { |
return initialization_complete_; |
} |
-} |
+} // namespace policy |