| Index: chrome/browser/policy/cloud/cloud_policy_store.h
|
| diff --git a/chrome/browser/policy/cloud/cloud_policy_store.h b/chrome/browser/policy/cloud/cloud_policy_store.h
|
| index fee92b7218d9a30f3d35901cd2dc2ff838138904..bd7e27193d3e0525d17492e2f0b5f54af60ac2f4 100644
|
| --- a/chrome/browser/policy/cloud/cloud_policy_store.h
|
| +++ b/chrome/browser/policy/cloud/cloud_policy_store.h
|
| @@ -7,6 +7,7 @@
|
|
|
| #include "base/basictypes.h"
|
| #include "base/memory/scoped_ptr.h"
|
| +#include "base/memory/weak_ptr.h"
|
| #include "base/observer_list.h"
|
| #include "chrome/browser/policy/cloud/cloud_policy_validator.h"
|
| #include "chrome/browser/policy/policy_map.h"
|
| @@ -14,6 +15,8 @@
|
|
|
| namespace policy {
|
|
|
| +class CloudExternalDataManager;
|
| +
|
| // Defines the low-level interface used by the cloud policy code to:
|
| // 1. Validate policy blobs that should be applied locally
|
| // 2. Persist policy blobs
|
| @@ -57,6 +60,10 @@ class CloudPolicyStore {
|
| // accomplished by calling Load() after startup.
|
| bool is_initialized() const { return is_initialized_; }
|
|
|
| + base::WeakPtr<CloudExternalDataManager> external_data_manager() const {
|
| + return external_data_manager_;
|
| + }
|
| +
|
| const PolicyMap& policy_map() const { return policy_map_; }
|
| bool has_policy() const {
|
| return policy_.get() != NULL;
|
| @@ -93,11 +100,20 @@ class CloudPolicyStore {
|
| // Removes the specified observer.
|
| void RemoveObserver(Observer* observer);
|
|
|
| + // Indicate that external data referenced by policies in this store is managed
|
| + // by |external_data_manager|. The |external_data_manager| will be notified
|
| + // about policy changes before any other observers.
|
| + void SetExternalDataManager(
|
| + base::WeakPtr<CloudExternalDataManager> external_data_manager);
|
| +
|
| protected:
|
| // Invokes the corresponding callback on all registered observers.
|
| void NotifyStoreLoaded();
|
| void NotifyStoreError();
|
|
|
| + // Manages external data referenced by policies.
|
| + base::WeakPtr<CloudExternalDataManager> external_data_manager_;
|
| +
|
| // Decoded version of the currently effective policy.
|
| PolicyMap policy_map_;
|
|
|
|
|