Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_CLOUD_COMPONENT_CLOUD_POLICY_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_POLICY_CLOUD_COMPONENT_CLOUD_POLICY_SERVICE_H_ |
| 6 #define CHROME_BROWSER_POLICY_CLOUD_COMPONENT_CLOUD_POLICY_SERVICE_H_ | 6 #define CHROME_BROWSER_POLICY_CLOUD_COMPONENT_CLOUD_POLICY_SERVICE_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 "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 85 // Returns true if |domain| is supported by the service. | 85 // Returns true if |domain| is supported by the service. |
| 86 static bool SupportsDomain(PolicyDomain domain); | 86 static bool SupportsDomain(PolicyDomain domain); |
| 87 | 87 |
| 88 // Returns true if the backend is initialized, and the initial policies and | 88 // Returns true if the backend is initialized, and the initial policies and |
| 89 // components are being served. | 89 // components are being served. |
| 90 bool is_initialized() const { return loaded_initial_policy_; } | 90 bool is_initialized() const { return loaded_initial_policy_; } |
| 91 | 91 |
| 92 // Returns the current policies for components. | 92 // Returns the current policies for components. |
| 93 const PolicyBundle& policy() const { return policy_; } | 93 const PolicyBundle& policy() const { return policy_; } |
| 94 | 94 |
| 95 // Deletes all the cached components policy. | |
|
bartfab (slow)
2013/12/02 18:08:46
Nit: s/components/component/ parses better IMHO
Joao da Silva
2013/12/03 09:02:31
Done.
| |
| 96 void ClearCache(); | |
| 97 | |
| 95 // SchemaRegistry::Observer implementation: | 98 // SchemaRegistry::Observer implementation: |
| 96 virtual void OnSchemaRegistryReady() OVERRIDE; | 99 virtual void OnSchemaRegistryReady() OVERRIDE; |
| 97 virtual void OnSchemaRegistryUpdated(bool has_new_schemas) OVERRIDE; | 100 virtual void OnSchemaRegistryUpdated(bool has_new_schemas) OVERRIDE; |
| 98 | 101 |
| 99 // CloudPolicyCore::Observer implementation: | 102 // CloudPolicyCore::Observer implementation: |
| 100 virtual void OnCoreConnected(CloudPolicyCore* core) OVERRIDE; | 103 virtual void OnCoreConnected(CloudPolicyCore* core) OVERRIDE; |
| 101 virtual void OnCoreDisconnecting(CloudPolicyCore* core) OVERRIDE; | 104 virtual void OnCoreDisconnecting(CloudPolicyCore* core) OVERRIDE; |
| 102 virtual void OnRefreshSchedulerStarted(CloudPolicyCore* core) OVERRIDE; | 105 virtual void OnRefreshSchedulerStarted(CloudPolicyCore* core) OVERRIDE; |
| 103 | 106 |
| 104 // CloudPolicyStore::Observer implementation: | 107 // CloudPolicyStore::Observer implementation: |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 165 bool is_registered_for_cloud_policy_; | 168 bool is_registered_for_cloud_policy_; |
| 166 | 169 |
| 167 base::WeakPtrFactory<ComponentCloudPolicyService> weak_ptr_factory_; | 170 base::WeakPtrFactory<ComponentCloudPolicyService> weak_ptr_factory_; |
| 168 | 171 |
| 169 DISALLOW_COPY_AND_ASSIGN(ComponentCloudPolicyService); | 172 DISALLOW_COPY_AND_ASSIGN(ComponentCloudPolicyService); |
| 170 }; | 173 }; |
| 171 | 174 |
| 172 } // namespace policy | 175 } // namespace policy |
| 173 | 176 |
| 174 #endif // CHROME_BROWSER_POLICY_CLOUD_COMPONENT_CLOUD_POLICY_SERVICE_H_ | 177 #endif // CHROME_BROWSER_POLICY_CLOUD_COMPONENT_CLOUD_POLICY_SERVICE_H_ |
| OLD | NEW |