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_SCHEMA_REGISTRY_H_ | 5 #ifndef COMPONENTS_POLICY_CORE_COMMON_SCHEMA_REGISTRY_H_ |
6 #define COMPONENTS_POLICY_CORE_COMMON_SCHEMA_REGISTRY_H_ | 6 #define COMPONENTS_POLICY_CORE_COMMON_SCHEMA_REGISTRY_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/observer_list.h" | 13 #include "base/observer_list.h" |
14 #include "base/threading/non_thread_safe.h" | 14 #include "base/threading/non_thread_safe.h" |
15 #include "components/policy/core/common/policy_namespace.h" | 15 #include "components/policy/core/common/policy_namespace.h" |
16 #include "components/policy/core/common/schema.h" | 16 #include "components/policy/core/common/schema.h" |
17 #include "components/policy/core/common/schema_map.h" | 17 #include "components/policy/core/common/schema_map.h" |
| 18 #include "components/policy/policy_export.h" |
18 | 19 |
19 namespace policy { | 20 namespace policy { |
20 | 21 |
21 class SchemaMap; | 22 class SchemaMap; |
22 | 23 |
23 // Holds the main reference to the current SchemaMap, and allows a list of | 24 // Holds the main reference to the current SchemaMap, and allows a list of |
24 // observers to get notified whenever it is updated. | 25 // observers to get notified whenever it is updated. |
25 // This object is not thread safe and must be used from the owner's thread, | 26 // This object is not thread safe and must be used from the owner's thread, |
26 // usually UI. | 27 // usually UI. |
27 class POLICY_EXPORT SchemaRegistry : public base::NonThreadSafe { | 28 class POLICY_EXPORT SchemaRegistry : public base::NonThreadSafe { |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 | 107 |
107 std::set<SchemaRegistry*> registries_; | 108 std::set<SchemaRegistry*> registries_; |
108 scoped_refptr<SchemaMap> own_schema_map_; | 109 scoped_refptr<SchemaMap> own_schema_map_; |
109 | 110 |
110 DISALLOW_COPY_AND_ASSIGN(CombinedSchemaRegistry); | 111 DISALLOW_COPY_AND_ASSIGN(CombinedSchemaRegistry); |
111 }; | 112 }; |
112 | 113 |
113 } // namespace policy | 114 } // namespace policy |
114 | 115 |
115 #endif // COMPONENTS_POLICY_CORE_COMMON_SCHEMA_REGISTRY_H_ | 116 #endif // COMPONENTS_POLICY_CORE_COMMON_SCHEMA_REGISTRY_H_ |
OLD | NEW |