Index: chrome/browser/policy/mock_configuration_policy_store.cc |
diff --git a/chrome/browser/policy/mock_configuration_policy_store.cc b/chrome/browser/policy/mock_configuration_policy_store.cc |
index bda4688899e32f7a8309f50acb556f267cb8cf2e..1cbf4386d5c6eb4427be8333520eabdd6db6d84b 100644 |
--- a/chrome/browser/policy/mock_configuration_policy_store.cc |
+++ b/chrome/browser/policy/mock_configuration_policy_store.cc |
@@ -14,20 +14,16 @@ MockConfigurationPolicyStore::MockConfigurationPolicyStore() { |
Invoke(this, &MockConfigurationPolicyStore::ApplyToMap)); |
} |
-MockConfigurationPolicyStore::~MockConfigurationPolicyStore() { |
- STLDeleteValues(&policy_map_); |
-} |
+MockConfigurationPolicyStore::~MockConfigurationPolicyStore() {} |
const Value* MockConfigurationPolicyStore::Get( |
ConfigurationPolicyType type) const { |
- PolicyMap::const_iterator entry(policy_map_.find(type)); |
- return entry == policy_map_.end() ? NULL : entry->second; |
+ return policy_map_.Get(type); |
} |
void MockConfigurationPolicyStore::ApplyToMap( |
ConfigurationPolicyType policy, Value* value) { |
- std::swap(policy_map_[policy], value); |
- delete value; |
+ policy_map_.Set(policy, value); |
} |
} // namespace policy |