| Index: chrome/browser/policy/configuration_policy_reader.cc
|
| diff --git a/chrome/browser/policy/configuration_policy_reader.cc b/chrome/browser/policy/configuration_policy_reader.cc
|
| index 472a151a70abdfdea0b83956d33b475c1e4a9171..e6c0914758fd63774db7772b71f7affd28acb0db 100644
|
| --- a/chrome/browser/policy/configuration_policy_reader.cc
|
| +++ b/chrome/browser/policy/configuration_policy_reader.cc
|
| @@ -103,6 +103,14 @@ void ConfigurationPolicyReader::OnProviderGoingAway() {
|
| provider_ = NULL;
|
| }
|
|
|
| +void ConfigurationPolicyReader::AddObserver(Observer* observer) {
|
| + observers_.AddObserver(observer);
|
| +}
|
| +
|
| +void ConfigurationPolicyReader::RemoveObserver(Observer* observer) {
|
| + observers_.RemoveObserver(observer);
|
| +}
|
| +
|
| // static
|
| ConfigurationPolicyReader*
|
| ConfigurationPolicyReader::CreateManagedPlatformPolicyReader() {
|
| @@ -172,6 +180,8 @@ void ConfigurationPolicyReader::Refresh() {
|
| scoped_ptr<ConfigurationPolicyStatusKeeper> new_keeper(
|
| new ConfigurationPolicyStatusKeeper(provider_, policy_level_));
|
| policy_keeper_.reset(new_keeper.release());
|
| +
|
| + FOR_EACH_OBSERVER(Observer, observers_, OnPolicyValuesChanged());
|
| }
|
|
|
| // PolicyStatus
|
| @@ -188,6 +198,20 @@ PolicyStatus::PolicyStatus(ConfigurationPolicyReader* managed_platform,
|
| PolicyStatus::~PolicyStatus() {
|
| }
|
|
|
| +void PolicyStatus::AddObserver(Observer* observer) const {
|
| + managed_platform_->AddObserver(observer);
|
| + managed_cloud_->AddObserver(observer);
|
| + recommended_platform_->AddObserver(observer);
|
| + recommended_cloud_->AddObserver(observer);
|
| +}
|
| +
|
| +void PolicyStatus::RemoveObserver(Observer* observer) const {
|
| + managed_platform_->RemoveObserver(observer);
|
| + managed_cloud_->RemoveObserver(observer);
|
| + recommended_platform_->RemoveObserver(observer);
|
| + recommended_cloud_->RemoveObserver(observer);
|
| +}
|
| +
|
| ListValue* PolicyStatus::GetPolicyStatusList(bool* any_policies_sent) const {
|
| ListValue* result = new ListValue();
|
| std::vector<DictionaryValue*> unsent_policies;
|
|
|