| 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/chromeos/policy/proxy_policy_provider.h" | 5 #include "components/policy/core/common/proxy_policy_provider.h" |
| 6 |
| 7 #include "base/logging.h" |
| 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "components/policy/core/common/policy_bundle.h" |
| 6 | 10 |
| 7 namespace policy { | 11 namespace policy { |
| 8 | 12 |
| 9 ProxyPolicyProvider::ProxyPolicyProvider() : delegate_(NULL) {} | 13 ProxyPolicyProvider::ProxyPolicyProvider() : delegate_(NULL) {} |
| 10 | 14 |
| 11 ProxyPolicyProvider::~ProxyPolicyProvider() { | 15 ProxyPolicyProvider::~ProxyPolicyProvider() { |
| 12 DCHECK(!delegate_); | 16 DCHECK(!delegate_); |
| 13 } | 17 } |
| 14 | 18 |
| 15 void ProxyPolicyProvider::SetDelegate(ConfigurationPolicyProvider* delegate) { | 19 void ProxyPolicyProvider::SetDelegate(ConfigurationPolicyProvider* delegate) { |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 | 54 |
| 51 void ProxyPolicyProvider::OnUpdatePolicy( | 55 void ProxyPolicyProvider::OnUpdatePolicy( |
| 52 ConfigurationPolicyProvider* provider) { | 56 ConfigurationPolicyProvider* provider) { |
| 53 DCHECK_EQ(delegate_, provider); | 57 DCHECK_EQ(delegate_, provider); |
| 54 scoped_ptr<PolicyBundle> bundle(new PolicyBundle()); | 58 scoped_ptr<PolicyBundle> bundle(new PolicyBundle()); |
| 55 bundle->CopyFrom(delegate_->policies()); | 59 bundle->CopyFrom(delegate_->policies()); |
| 56 UpdatePolicy(bundle.Pass()); | 60 UpdatePolicy(bundle.Pass()); |
| 57 } | 61 } |
| 58 | 62 |
| 59 } // namespace policy | 63 } // namespace policy |
| OLD | NEW |