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 <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 16 matching lines...) Expand all Loading... |
27 PolicyScope scope; | 27 PolicyScope scope; |
28 base::Value* value; | 28 base::Value* value; |
29 ExternalDataFetcher* external_data_fetcher; | 29 ExternalDataFetcher* external_data_fetcher; |
30 | 30 |
31 Entry() | 31 Entry() |
32 : level(POLICY_LEVEL_RECOMMENDED), | 32 : level(POLICY_LEVEL_RECOMMENDED), |
33 scope(POLICY_SCOPE_USER), | 33 scope(POLICY_SCOPE_USER), |
34 value(NULL), | 34 value(NULL), |
35 external_data_fetcher(NULL) {} | 35 external_data_fetcher(NULL) {} |
36 | 36 |
| 37 // Deletes all members owned by |this|. |
| 38 void DeleteOwnedMembers(); |
| 39 |
| 40 // Returns a copy of |this|. |
| 41 scoped_ptr<Entry> DeepCopy() const; |
| 42 |
37 // Returns true if |this| has higher priority than |other|. | 43 // Returns true if |this| has higher priority than |other|. |
38 bool has_higher_priority_than(const Entry& other) const; | 44 bool has_higher_priority_than(const Entry& other) const; |
39 | 45 |
40 // Returns true if |this| equals |other|. | 46 // Returns true if |this| equals |other|. |
41 bool Equals(const Entry& other) const; | 47 bool Equals(const Entry& other) const; |
42 }; | 48 }; |
43 | 49 |
44 typedef std::map<std::string, Entry> PolicyMapType; | 50 typedef std::map<std::string, Entry> PolicyMapType; |
45 typedef PolicyMapType::const_iterator const_iterator; | 51 typedef PolicyMapType::const_iterator const_iterator; |
46 | 52 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 const PolicyMapType::value_type& b); | 122 const PolicyMapType::value_type& b); |
117 | 123 |
118 PolicyMapType map_; | 124 PolicyMapType map_; |
119 | 125 |
120 DISALLOW_COPY_AND_ASSIGN(PolicyMap); | 126 DISALLOW_COPY_AND_ASSIGN(PolicyMap); |
121 }; | 127 }; |
122 | 128 |
123 } // namespace policy | 129 } // namespace policy |
124 | 130 |
125 #endif // COMPONENTS_POLICY_CORE_COMMON_POLICY_MAP_H_ | 131 #endif // COMPONENTS_POLICY_CORE_COMMON_POLICY_MAP_H_ |
OLD | NEW |