| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 const ComponentMap& components); | 67 const ComponentMap& components); |
| 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 SetDomainReady(PolicyDomain domain); |
| 78 // This is equivalent to calling |SetReady| with each of the policy domains. | 78 // This is equivalent to calling |SetDomainReady| with each of the policy |
| 79 // domains. |
| 79 void SetAllDomainsReady(); | 80 void SetAllDomainsReady(); |
| 80 // This is equivalent to calling |SetReady| with each of the domains that | 81 // This is equivalent to calling |SetDomainReady| with each of the domains |
| 81 // correspond to policy for extensions. | 82 // that correspond to policy for extensions. |
| 82 void SetExtensionsDomainsReady(); | 83 void SetExtensionsDomainsReady(); |
| 83 | 84 |
| 84 void AddObserver(Observer* observer); | 85 void AddObserver(Observer* observer); |
| 85 void RemoveObserver(Observer* observer); | 86 void RemoveObserver(Observer* observer); |
| 86 | 87 |
| 87 void AddInternalObserver(InternalObserver* observer); | 88 void AddInternalObserver(InternalObserver* observer); |
| 88 void RemoveInternalObserver(InternalObserver* observer); | 89 void RemoveInternalObserver(InternalObserver* observer); |
| 89 | 90 |
| 90 protected: | 91 protected: |
| 91 void Notify(bool has_new_schemas); | 92 void Notify(bool has_new_schemas); |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 | 156 |
| 156 private: | 157 private: |
| 157 SchemaRegistry* wrapped_; | 158 SchemaRegistry* wrapped_; |
| 158 | 159 |
| 159 DISALLOW_COPY_AND_ASSIGN(ForwardingSchemaRegistry); | 160 DISALLOW_COPY_AND_ASSIGN(ForwardingSchemaRegistry); |
| 160 }; | 161 }; |
| 161 | 162 |
| 162 } // namespace policy | 163 } // namespace policy |
| 163 | 164 |
| 164 #endif // COMPONENTS_POLICY_CORE_COMMON_SCHEMA_REGISTRY_H_ | 165 #endif // COMPONENTS_POLICY_CORE_COMMON_SCHEMA_REGISTRY_H_ |
| OLD | NEW |