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 75cab26069eefc14c484f7d715857c3b02ff50c6..db06a4045ad5c0f0c15115041e37c43c0e8fe5eb 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; |
@@ -111,11 +118,20 @@ class CloudPolicyStore { |
return invalidation_version_; |
} |
+ // 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_; |