OLD | NEW |
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 26 matching lines...) Expand all Loading... |
37 | 37 |
38 Entry(); | 38 Entry(); |
39 ~Entry(); | 39 ~Entry(); |
40 | 40 |
41 Entry(Entry&&); | 41 Entry(Entry&&); |
42 Entry& operator=(Entry&&); | 42 Entry& operator=(Entry&&); |
43 | 43 |
44 // Returns a copy of |this|. | 44 // Returns a copy of |this|. |
45 Entry DeepCopy() const; | 45 Entry DeepCopy() const; |
46 | 46 |
47 // Returns true if |this| has higher priority than |other|. | 47 // Returns true if |this| has higher priority than |other|. The priority of |
| 48 // the fields are |level| > |scope| > |source|. |
48 bool has_higher_priority_than(const Entry& other) const; | 49 bool has_higher_priority_than(const Entry& other) const; |
49 | 50 |
50 // Returns true if |this| equals |other|. | 51 // Returns true if |this| equals |other|. |
51 bool Equals(const Entry& other) const; | 52 bool Equals(const Entry& other) const; |
52 }; | 53 }; |
53 | 54 |
54 typedef std::map<std::string, Entry> PolicyMapType; | 55 typedef std::map<std::string, Entry> PolicyMapType; |
55 typedef PolicyMapType::const_iterator const_iterator; | 56 typedef PolicyMapType::const_iterator const_iterator; |
56 | 57 |
57 PolicyMap(); | 58 PolicyMap(); |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 bool deletion_value); | 137 bool deletion_value); |
137 | 138 |
138 PolicyMapType map_; | 139 PolicyMapType map_; |
139 | 140 |
140 DISALLOW_COPY_AND_ASSIGN(PolicyMap); | 141 DISALLOW_COPY_AND_ASSIGN(PolicyMap); |
141 }; | 142 }; |
142 | 143 |
143 } // namespace policy | 144 } // namespace policy |
144 | 145 |
145 #endif // COMPONENTS_POLICY_CORE_COMMON_POLICY_MAP_H_ | 146 #endif // COMPONENTS_POLICY_CORE_COMMON_POLICY_MAP_H_ |
OLD | NEW |