| 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/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 | 68 |
| 69 virtual void UnregisterComponent(const PolicyNamespace& ns); | 69 virtual void UnregisterComponent(const PolicyNamespace& ns); |
| 70 | 70 |
| 71 // Returns true if all domains have registered the initial components. | 71 // Returns true if all domains have registered the initial components. |
| 72 bool IsReady() const; | 72 bool IsReady() const; |
| 73 | 73 |
| 74 // This indicates that the initial components for |domain| have all been | 74 // This indicates that the initial components for |domain| have all been |
| 75 // registered. It must be invoked at least once for each policy domain; | 75 // registered. It must be invoked at least once for each policy domain; |
| 76 // subsequent calls for the same domain are ignored. | 76 // subsequent calls for the same domain are ignored. |
| 77 void SetReady(PolicyDomain domain); | 77 void SetReady(PolicyDomain domain); |
| 78 // This is equivalent to calling |SetReady| with each of the policy domains. |
| 79 void SetAllDomainsReady(); |
| 80 // This is equivalent to calling |SetReady| with each of the domains that |
| 81 // correspond to policy for extensions. |
| 82 void SetExtensionsDomainsReady(); |
| 78 | 83 |
| 79 void AddObserver(Observer* observer); | 84 void AddObserver(Observer* observer); |
| 80 void RemoveObserver(Observer* observer); | 85 void RemoveObserver(Observer* observer); |
| 81 | 86 |
| 82 void AddInternalObserver(InternalObserver* observer); | 87 void AddInternalObserver(InternalObserver* observer); |
| 83 void RemoveInternalObserver(InternalObserver* observer); | 88 void RemoveInternalObserver(InternalObserver* observer); |
| 84 | 89 |
| 85 protected: | 90 protected: |
| 86 void Notify(bool has_new_schemas); | 91 void Notify(bool has_new_schemas); |
| 87 | 92 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 | 155 |
| 151 private: | 156 private: |
| 152 SchemaRegistry* wrapped_; | 157 SchemaRegistry* wrapped_; |
| 153 | 158 |
| 154 DISALLOW_COPY_AND_ASSIGN(ForwardingSchemaRegistry); | 159 DISALLOW_COPY_AND_ASSIGN(ForwardingSchemaRegistry); |
| 155 }; | 160 }; |
| 156 | 161 |
| 157 } // namespace policy | 162 } // namespace policy |
| 158 | 163 |
| 159 #endif // COMPONENTS_POLICY_CORE_COMMON_SCHEMA_REGISTRY_H_ | 164 #endif // COMPONENTS_POLICY_CORE_COMMON_SCHEMA_REGISTRY_H_ |
| OLD | NEW |