OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/forwarding_policy_provider.h" | 5 #include "chrome/browser/policy/forwarding_policy_provider.h" |
6 | 6 |
7 #include "chrome/browser/policy/schema_map.h" | 7 #include "components/policy/core/common/schema_map.h" |
8 #include "chrome/browser/policy/schema_registry.h" | 8 #include "components/policy/core/common/schema_registry.h" |
9 | 9 |
10 namespace policy { | 10 namespace policy { |
11 | 11 |
12 ForwardingPolicyProvider::ForwardingPolicyProvider( | 12 ForwardingPolicyProvider::ForwardingPolicyProvider( |
13 ConfigurationPolicyProvider* delegate) | 13 ConfigurationPolicyProvider* delegate) |
14 : delegate_(delegate), state_(WAITING_FOR_REGISTRY_READY) { | 14 : delegate_(delegate), state_(WAITING_FOR_REGISTRY_READY) { |
15 delegate_->AddObserver(this); | 15 delegate_->AddObserver(this); |
16 // Serve the initial |delegate_| policies. | 16 // Serve the initial |delegate_| policies. |
17 OnUpdatePolicy(delegate_); | 17 OnUpdatePolicy(delegate_); |
18 } | 18 } |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 // Always forward the Chrome policy, even if the components are not ready | 80 // Always forward the Chrome policy, even if the components are not ready |
81 // yet. | 81 // yet. |
82 const PolicyNamespace chrome_ns(POLICY_DOMAIN_CHROME, ""); | 82 const PolicyNamespace chrome_ns(POLICY_DOMAIN_CHROME, ""); |
83 bundle->Get(chrome_ns).CopyFrom(delegate_->policies().Get(chrome_ns)); | 83 bundle->Get(chrome_ns).CopyFrom(delegate_->policies().Get(chrome_ns)); |
84 } | 84 } |
85 | 85 |
86 UpdatePolicy(bundle.Pass()); | 86 UpdatePolicy(bundle.Pass()); |
87 } | 87 } |
88 | 88 |
89 } // namespace policy | 89 } // namespace policy |
OLD | NEW |