Chromium Code Reviews| Index: components/policy/core/common/configuration_policy_provider.cc |
| diff --git a/components/policy/core/common/configuration_policy_provider.cc b/components/policy/core/common/configuration_policy_provider.cc |
| index 03fd8d7dd2accc22da17dec26372dcc034bebed8..7c56454ddd9e59206bc70f934d7d56058af1278e 100644 |
| --- a/components/policy/core/common/configuration_policy_provider.cc |
| +++ b/components/policy/core/common/configuration_policy_provider.cc |
| @@ -43,15 +43,24 @@ bool ConfigurationPolicyProvider::IsInitializationComplete( |
| void ConfigurationPolicyProvider::UpdatePolicy( |
| scoped_ptr<PolicyBundle> bundle) { |
| - if (bundle.get()) |
| + if (bundle.get()) { |
| policy_bundle_.Swap(bundle.get()); |
| - else |
| + SetSources(source()); |
|
Thiemo Nagel
2015/09/01 17:40:37
Not sure whether that makes any difference (can th
fhorschig
2015/09/04 06:53:54
The poorly named function SetSources sets the sour
|
| + } else { |
| policy_bundle_.Clear(); |
| + } |
| FOR_EACH_OBSERVER(ConfigurationPolicyProvider::Observer, |
| observer_list_, |
| OnUpdatePolicy(this)); |
| } |
| +void ConfigurationPolicyProvider::SetSources(PolicySource source) { |
| + for (PolicyBundle::iterator it = policy_bundle_.begin(); |
| + it != policy_bundle_.end(); ++it) { |
| + it->second->SetSources(source); |
| + } |
| +} |
| + |
| SchemaRegistry* ConfigurationPolicyProvider::schema_registry() const { |
| return schema_registry_; |
| } |