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

Side by Side Diff: components/policy/core/common/policy_map.h

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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_POLICY_CORE_COMMON_POLICY_MAP_H_ 5 #ifndef COMPONENTS_POLICY_CORE_COMMON_POLICY_MAP_H_
6 #define COMPONENTS_POLICY_CORE_COMMON_POLICY_MAP_H_ 6 #define COMPONENTS_POLICY_CORE_COMMON_POLICY_MAP_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 68
69 // Overwrites any existing information stored in the map for the key |policy|. 69 // Overwrites any existing information stored in the map for the key |policy|.
70 void Set(const std::string& policy, 70 void Set(const std::string& policy,
71 PolicyLevel level, 71 PolicyLevel level,
72 PolicyScope scope, 72 PolicyScope scope,
73 PolicySource source, 73 PolicySource source,
74 std::unique_ptr<base::Value> value, 74 std::unique_ptr<base::Value> value,
75 std::unique_ptr<ExternalDataFetcher> external_data_fetcher); 75 std::unique_ptr<ExternalDataFetcher> external_data_fetcher);
76 void Set(const std::string& policy, Entry entry); 76 void Set(const std::string& policy, Entry entry);
77 77
78 // For all policies, overwrite the PolicySource with |source|.
79 void SetSourceForAll(PolicySource source);
80
78 // Erase the given |policy|, if it exists in this map. 81 // Erase the given |policy|, if it exists in this map.
79 void Erase(const std::string& policy); 82 void Erase(const std::string& policy);
80 83
81 // Erase all entries for which |filter| returns true. 84 // Erase all entries for which |filter| returns true.
82 void EraseMatching(const base::Callback<bool(const const_iterator)>& filter); 85 void EraseMatching(const base::Callback<bool(const const_iterator)>& filter);
83 86
84 // Erase all entries for which |filter| returns false. 87 // Erase all entries for which |filter| returns false.
85 void EraseNonmatching( 88 void EraseNonmatching(
86 const base::Callback<bool(const const_iterator)>& filter); 89 const base::Callback<bool(const const_iterator)>& filter);
87 90
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 bool deletion_value); 136 bool deletion_value);
134 137
135 PolicyMapType map_; 138 PolicyMapType map_;
136 139
137 DISALLOW_COPY_AND_ASSIGN(PolicyMap); 140 DISALLOW_COPY_AND_ASSIGN(PolicyMap);
138 }; 141 };
139 142
140 } // namespace policy 143 } // namespace policy
141 144
142 #endif // COMPONENTS_POLICY_CORE_COMMON_POLICY_MAP_H_ 145 #endif // COMPONENTS_POLICY_CORE_COMMON_POLICY_MAP_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698