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

Unified Diff: components/policy/core/common/policy_map.h

Issue 2414663002: Fix log spew for "_comment..." policies. (Closed)
Patch Set: Rename EraseGeneric() to FilterErase(). Created 4 years, 2 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: 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..2aa9a5910cf052a88cc7b4cfb1dad67cde32b4d5 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 FilterErase(const base::Callback<bool(const const_iterator)>& filter,
+ bool deletion_value);
+
PolicyMapType map_;
DISALLOW_COPY_AND_ASSIGN(PolicyMap);
« no previous file with comments | « components/policy/core/common/policy_loader_win_unittest.cc ('k') | components/policy/core/common/policy_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698