| 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 <string> | 7 #include <string> |
| 8 | 8 |
| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 } | 61 } |
| 62 } | 62 } |
| 63 | 63 |
| 64 } // namespace | 64 } // namespace |
| 65 | 65 |
| 66 ConfigurationPolicyProvider::Observer::~Observer() {} | 66 ConfigurationPolicyProvider::Observer::~Observer() {} |
| 67 | 67 |
| 68 void ConfigurationPolicyProvider::Observer::OnProviderGoingAway( | 68 void ConfigurationPolicyProvider::Observer::OnProviderGoingAway( |
| 69 ConfigurationPolicyProvider* provider) {} | 69 ConfigurationPolicyProvider* provider) {} |
| 70 | 70 |
| 71 ConfigurationPolicyProvider::ConfigurationPolicyProvider( | 71 ConfigurationPolicyProvider::ConfigurationPolicyProvider() {} |
| 72 const PolicyDefinitionList* policy_list) | |
| 73 : policy_definition_list_(policy_list) { | |
| 74 } | |
| 75 | 72 |
| 76 ConfigurationPolicyProvider::~ConfigurationPolicyProvider() { | 73 ConfigurationPolicyProvider::~ConfigurationPolicyProvider() { |
| 77 FOR_EACH_OBSERVER(ConfigurationPolicyProvider::Observer, | 74 FOR_EACH_OBSERVER(ConfigurationPolicyProvider::Observer, |
| 78 observer_list_, | 75 observer_list_, |
| 79 OnProviderGoingAway(this)); | 76 OnProviderGoingAway(this)); |
| 80 } | 77 } |
| 81 | 78 |
| 82 bool ConfigurationPolicyProvider::IsInitializationComplete() const { | 79 bool ConfigurationPolicyProvider::IsInitializationComplete() const { |
| 83 return true; | 80 return true; |
| 84 } | 81 } |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 // be set to NULL. So we set |observer_| to NULL instead to signal that | 137 // be set to NULL. So we set |observer_| to NULL instead to signal that |
| 141 // we're not observing the provider anymore. | 138 // we're not observing the provider anymore. |
| 142 ConfigurationPolicyProvider::Observer* observer = observer_; | 139 ConfigurationPolicyProvider::Observer* observer = observer_; |
| 143 observer_ = NULL; | 140 observer_ = NULL; |
| 144 provider_->RemoveObserver(this); | 141 provider_->RemoveObserver(this); |
| 145 | 142 |
| 146 observer->OnProviderGoingAway(provider); | 143 observer->OnProviderGoingAway(provider); |
| 147 } | 144 } |
| 148 | 145 |
| 149 } // namespace policy | 146 } // namespace policy |
| OLD | NEW |