| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_store_interface.h" | 5 #include "chrome/browser/policy/configuration_policy_store_interface.h" |
| 6 | 6 |
| 7 namespace { | 7 namespace { |
| 8 | 8 |
| 9 using namespace policy; | 9 using namespace policy; |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 void ObservingPolicyStoreInterface::Apply(ConfigurationPolicyType policy, | 23 void ObservingPolicyStoreInterface::Apply(ConfigurationPolicyType policy, |
| 24 Value* value) { | 24 Value* value) { |
| 25 next_->Apply(policy, value); | 25 next_->Apply(policy, value); |
| 26 | 26 |
| 27 if (IsProxyPolicy(policy)) | 27 if (IsProxyPolicy(policy)) |
| 28 proxy_policy_applied_ = true; | 28 proxy_policy_applied_ = true; |
| 29 } | 29 } |
| 30 | 30 |
| 31 void FilteringPolicyStoreInterface::Apply(ConfigurationPolicyType policy, | 31 void FilteringPolicyStoreInterface::Apply(ConfigurationPolicyType policy, |
| 32 Value* value) { | 32 Value* value) { |
| 33 // Apply() takes ownership of |value|. |
| 33 if (IsProxyPolicy(policy) && apply_proxy_policies_) | 34 if (IsProxyPolicy(policy) && apply_proxy_policies_) |
| 34 next_->Apply(policy, value); | 35 next_->Apply(policy, value); |
| 36 else |
| 37 delete value; |
| 35 } | 38 } |
| 36 | 39 |
| 37 } // namespace policy | 40 } // namespace policy |
| OLD | NEW |