| 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 CHROME_BROWSER_POLICY_SCHEMA_MAP_H_ | 5 #ifndef CHROME_BROWSER_POLICY_SCHEMA_MAP_H_ |
| 6 #define CHROME_BROWSER_POLICY_SCHEMA_MAP_H_ | 6 #define CHROME_BROWSER_POLICY_SCHEMA_MAP_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 const Schema* GetSchema(const PolicyNamespace& ns) const; | 35 const Schema* GetSchema(const PolicyNamespace& ns) const; |
| 36 | 36 |
| 37 // Removes all the policies in |bundle| that don't match the known schemas. | 37 // Removes all the policies in |bundle| that don't match the known schemas. |
| 38 // Unknown components are also dropped. | 38 // Unknown components are also dropped. |
| 39 void FilterBundle(PolicyBundle* bundle) const; | 39 void FilterBundle(PolicyBundle* bundle) const; |
| 40 | 40 |
| 41 // Returns true if this map contains at least one component of a domain other | 41 // Returns true if this map contains at least one component of a domain other |
| 42 // than POLICY_DOMAIN_CHROME. | 42 // than POLICY_DOMAIN_CHROME. |
| 43 bool HasComponents() const; | 43 bool HasComponents() const; |
| 44 | 44 |
| 45 void GetChanges(const scoped_refptr<SchemaMap>& older, |
| 46 PolicyNamespaceList* removed, |
| 47 PolicyNamespaceList* added) const; |
| 48 |
| 45 private: | 49 private: |
| 46 friend class base::RefCountedThreadSafe<SchemaMap>; | 50 friend class base::RefCountedThreadSafe<SchemaMap>; |
| 47 | 51 |
| 52 void GetNamespacesNotInOther(const SchemaMap* other, |
| 53 PolicyNamespaceList* list) const; |
| 54 |
| 48 ~SchemaMap(); | 55 ~SchemaMap(); |
| 49 | 56 |
| 50 DomainMap map_; | 57 DomainMap map_; |
| 51 | 58 |
| 52 DISALLOW_COPY_AND_ASSIGN(SchemaMap); | 59 DISALLOW_COPY_AND_ASSIGN(SchemaMap); |
| 53 }; | 60 }; |
| 54 | 61 |
| 55 } // namespace policy | 62 } // namespace policy |
| 56 | 63 |
| 57 #endif // CHROME_BROWSER_POLICY_SCHEMA_MAP_H_ | 64 #endif // CHROME_BROWSER_POLICY_SCHEMA_MAP_H_ |
| OLD | NEW |