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

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

Issue 2641343002: Use source parameter to determine policy priority. (Closed)
Patch Set: Fix comment format. Created 3 years, 11 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 unified diff | Download patch
« no previous file with comments | « no previous file | components/policy/core/common/policy_map.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 26 matching lines...) Expand all
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
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_
OLDNEW
« no previous file with comments | « no previous file | components/policy/core/common/policy_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698