Chromium Code Reviews| Index: components/policy/core/common/policy_map.h |
| diff --git a/components/policy/core/common/policy_map.h b/components/policy/core/common/policy_map.h |
| index d3664ab066a9ab8da260965dae17d9dcb2ad7ade..d7b98ea5d697c30319c8c803b08f7387549452f6 100644 |
| --- a/components/policy/core/common/policy_map.h |
| +++ b/components/policy/core/common/policy_map.h |
| @@ -78,6 +78,9 @@ class POLICY_EXPORT PolicyMap { |
| // Erase the given |policy|, if it exists in this map. |
| void Erase(const std::string& policy); |
| + // Erase all entries for which |filter| returns true. |
| + void EraseMatching(const base::Callback<bool(const const_iterator)>& filter); |
| + |
| // Erase all entries for which |filter| returns false. |
| void EraseNonmatching( |
| const base::Callback<bool(const const_iterator)>& filter); |
| @@ -125,6 +128,10 @@ class POLICY_EXPORT PolicyMap { |
| static bool MapEntryEquals(const PolicyMapType::value_type& a, |
| const PolicyMapType::value_type& b); |
| + // Erase all entries for which |filter| returns |deletion_value|. |
| + void EraseGeneric(const base::Callback<bool(const const_iterator)>& filter, |
|
pastarmovj
2016/10/18 16:20:11
nit: I don't like this name much but I can't come
Thiemo Nagel
2016/10/18 16:31:50
I wasn't happy with FilterGeneric() either. Using
|
| + bool deletion_value); |
| + |
| PolicyMapType map_; |
| DISALLOW_COPY_AND_ASSIGN(PolicyMap); |