| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "chrome/browser/policy/configuration_policy_provider.h" | 5 #include "chrome/browser/policy/configuration_policy_provider.h" |
| 6 | 6 |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "chrome/browser/policy/external_data_fetcher.h" | 8 #include "chrome/browser/policy/external_data_fetcher.h" |
| 9 #include "chrome/browser/policy/policy_map.h" | 9 #include "chrome/browser/policy/policy_map.h" |
| 10 #include "policy/policy_constants.h" | 10 #include "policy/policy_constants.h" |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 policy_bundle_.Swap(bundle.get()); | 100 policy_bundle_.Swap(bundle.get()); |
| 101 else | 101 else |
| 102 policy_bundle_.Clear(); | 102 policy_bundle_.Clear(); |
| 103 FixDeprecatedPolicies(&policy_bundle_.Get( | 103 FixDeprecatedPolicies(&policy_bundle_.Get( |
| 104 PolicyNamespace(POLICY_DOMAIN_CHROME, std::string()))); | 104 PolicyNamespace(POLICY_DOMAIN_CHROME, std::string()))); |
| 105 FOR_EACH_OBSERVER(ConfigurationPolicyProvider::Observer, | 105 FOR_EACH_OBSERVER(ConfigurationPolicyProvider::Observer, |
| 106 observer_list_, | 106 observer_list_, |
| 107 OnUpdatePolicy(this)); | 107 OnUpdatePolicy(this)); |
| 108 } | 108 } |
| 109 | 109 |
| 110 SchemaRegistry* ConfigurationPolicyProvider::schema_registry() const { |
| 111 return schema_registry_; |
| 112 } |
| 113 |
| 110 const scoped_refptr<SchemaMap>& | 114 const scoped_refptr<SchemaMap>& |
| 111 ConfigurationPolicyProvider::schema_map() const { | 115 ConfigurationPolicyProvider::schema_map() const { |
| 112 return schema_registry_->schema_map(); | 116 return schema_registry_->schema_map(); |
| 113 } | 117 } |
| 114 | 118 |
| 115 void ConfigurationPolicyProvider::AddObserver(Observer* observer) { | 119 void ConfigurationPolicyProvider::AddObserver(Observer* observer) { |
| 116 observer_list_.AddObserver(observer); | 120 observer_list_.AddObserver(observer); |
| 117 } | 121 } |
| 118 | 122 |
| 119 void ConfigurationPolicyProvider::RemoveObserver(Observer* observer) { | 123 void ConfigurationPolicyProvider::RemoveObserver(Observer* observer) { |
| 120 observer_list_.RemoveObserver(observer); | 124 observer_list_.RemoveObserver(observer); |
| 121 } | 125 } |
| 122 | 126 |
| 123 void ConfigurationPolicyProvider::OnSchemaRegistryUpdated( | 127 void ConfigurationPolicyProvider::OnSchemaRegistryUpdated( |
| 124 bool has_new_schemas) {} | 128 bool has_new_schemas) {} |
| 125 | 129 |
| 126 void ConfigurationPolicyProvider::OnSchemaRegistryReady() {} | 130 void ConfigurationPolicyProvider::OnSchemaRegistryReady() {} |
| 127 | 131 |
| 128 } // namespace policy | 132 } // namespace policy |
| OLD | NEW |