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_FORWARDING_POLICY_PROVIDER_H_ | 5 #ifndef COMPONENTS_POLICY_CORE_COMMON_FORWARDING_POLICY_PROVIDER_H_ |
6 #define COMPONENTS_POLICY_CORE_COMMON_FORWARDING_POLICY_PROVIDER_H_ | 6 #define COMPONENTS_POLICY_CORE_COMMON_FORWARDING_POLICY_PROVIDER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "components/policy/core/common/configuration_policy_provider.h" | 10 #include "components/policy/core/common/configuration_policy_provider.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 // that doesn't match the |delegate_|'s; therefore OnSchemaRegistryUpdated() | 36 // that doesn't match the |delegate_|'s; therefore OnSchemaRegistryUpdated() |
37 // and OnSchemaRegistryReady() are not forwarded either. It is assumed that | 37 // and OnSchemaRegistryReady() are not forwarded either. It is assumed that |
38 // the |delegate_|'s SchemaRegistry contains a superset of this provider's | 38 // the |delegate_|'s SchemaRegistry contains a superset of this provider's |
39 // SchemaRegistry though (i.e. it's a CombinedSchemaRegistry that contains | 39 // SchemaRegistry though (i.e. it's a CombinedSchemaRegistry that contains |
40 // this provider's SchemaRegistry). | 40 // this provider's SchemaRegistry). |
41 // | 41 // |
42 // This provider manages its own initialization state for all policy domains | 42 // This provider manages its own initialization state for all policy domains |
43 // except POLICY_DOMAIN_CHROME, whose status is always queried from the | 43 // except POLICY_DOMAIN_CHROME, whose status is always queried from the |
44 // |delegate_|. RefreshPolicies() calls are also forwarded, since this | 44 // |delegate_|. RefreshPolicies() calls are also forwarded, since this |
45 // provider doesn't have a "real" policy source of its own. | 45 // provider doesn't have a "real" policy source of its own. |
46 virtual void Init(SchemaRegistry* registry) OVERRIDE; | 46 virtual void Init(SchemaRegistry* registry) override; |
47 virtual bool IsInitializationComplete(PolicyDomain domain) const OVERRIDE; | 47 virtual bool IsInitializationComplete(PolicyDomain domain) const override; |
48 virtual void RefreshPolicies() OVERRIDE; | 48 virtual void RefreshPolicies() override; |
49 virtual void OnSchemaRegistryReady() OVERRIDE; | 49 virtual void OnSchemaRegistryReady() override; |
50 virtual void OnSchemaRegistryUpdated(bool has_new_schemas) OVERRIDE; | 50 virtual void OnSchemaRegistryUpdated(bool has_new_schemas) override; |
51 | 51 |
52 // ConfigurationPolicyProvider::Observer: | 52 // ConfigurationPolicyProvider::Observer: |
53 virtual void OnUpdatePolicy(ConfigurationPolicyProvider* provider) OVERRIDE; | 53 virtual void OnUpdatePolicy(ConfigurationPolicyProvider* provider) override; |
54 | 54 |
55 private: | 55 private: |
56 enum InitializationState { | 56 enum InitializationState { |
57 WAITING_FOR_REGISTRY_READY, | 57 WAITING_FOR_REGISTRY_READY, |
58 WAITING_FOR_REFRESH, | 58 WAITING_FOR_REFRESH, |
59 READY, | 59 READY, |
60 }; | 60 }; |
61 | 61 |
62 ConfigurationPolicyProvider* delegate_; | 62 ConfigurationPolicyProvider* delegate_; |
63 InitializationState state_; | 63 InitializationState state_; |
64 | 64 |
65 DISALLOW_COPY_AND_ASSIGN(ForwardingPolicyProvider); | 65 DISALLOW_COPY_AND_ASSIGN(ForwardingPolicyProvider); |
66 }; | 66 }; |
67 | 67 |
68 } // namespace policy | 68 } // namespace policy |
69 | 69 |
70 #endif // COMPONENTS_POLICY_CORE_COMMON_FORWARDING_POLICY_PROVIDER_H_ | 70 #endif // COMPONENTS_POLICY_CORE_COMMON_FORWARDING_POLICY_PROVIDER_H_ |
OLD | NEW |