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

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

Issue 1824743002: Drop non-user policy in ConfigDirPolicyLoader on Chrome OS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 5 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 5b527adb867f7dace8ff37e9a3e30a7371bbd88f..d3664ab066a9ab8da260965dae17d9dcb2ad7ade 100644
--- a/components/policy/core/common/policy_map.h
+++ b/components/policy/core/common/policy_map.h
@@ -12,6 +12,7 @@
#include <set>
#include <string>
+#include "base/callback.h"
#include "base/macros.h"
#include "base/values.h"
#include "components/policy/core/common/external_data_fetcher.h"
@@ -77,6 +78,10 @@ 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 false.
+ void EraseNonmatching(
+ const base::Callback<bool(const const_iterator)>& filter);
+
// Swaps the internal representation of |this| with |other|.
void Swap(PolicyMap* other);
@@ -107,12 +112,6 @@ class POLICY_EXPORT PolicyMap {
void GetDifferingKeys(const PolicyMap& other,
std::set<std::string>* differing_keys) const;
- // Removes all policies that don't have the specified |level|. This is a
- // temporary helper method, until mandatory and recommended levels are served
- // by a single provider.
- // TODO(joaodasilva): Remove this. http://crbug.com/108999
- void FilterLevel(PolicyLevel level);
-
bool Equals(const PolicyMap& other) const;
bool empty() const;
size_t size() const;
« 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