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

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

Issue 2486813002: Add DeviceADPolicyManager to provide AD policy. (Closed)
Patch Set: Address Bernhard's comments Created 4 years, 1 month 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.cc
diff --git a/components/policy/core/common/policy_map.cc b/components/policy/core/common/policy_map.cc
index cac8e3b3e67d5ef2bf575bb38112fbe999ac1748..9ad2627143cc65469a1060fd3ca6fdd9ac32c000 100644
--- a/components/policy/core/common/policy_map.cc
+++ b/components/policy/core/common/policy_map.cc
@@ -89,6 +89,12 @@ void PolicyMap::Set(const std::string& policy, Entry entry) {
map_[policy] = std::move(entry);
}
+void PolicyMap::SetSourceForAll(PolicySource source) {
+ for (auto& it : map_) {
+ it.second.source = source;
+ }
+}
+
void PolicyMap::Erase(const std::string& policy) {
map_.erase(policy);
}

Powered by Google App Engine
This is Rietveld 408576698