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/chromeos/policy/login_profile_policy_provider.h" | 5 #include "chrome/browser/chromeos/policy/login_profile_policy_provider.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
83 } | 83 } |
84 } | 84 } |
85 | 85 |
86 } // namespace | 86 } // namespace |
87 | 87 |
88 LoginProfilePolicyProvider::LoginProfilePolicyProvider( | 88 LoginProfilePolicyProvider::LoginProfilePolicyProvider( |
89 PolicyService* device_policy_service) | 89 PolicyService* device_policy_service) |
90 : device_policy_service_(device_policy_service), | 90 : device_policy_service_(device_policy_service), |
91 waiting_for_device_policy_refresh_(false), | 91 waiting_for_device_policy_refresh_(false), |
92 weak_factory_(this) { | 92 weak_factory_(this) { |
93 source_ = POLICY_SOURCE_CLOUD; | |
Thiemo Nagel
2015/09/04 20:15:53
I'd suggest to add a comment why this always is cl
fhorschig
2015/09/07 14:09:33
Done.
| |
93 } | 94 } |
94 | 95 |
95 LoginProfilePolicyProvider::~LoginProfilePolicyProvider() { | 96 LoginProfilePolicyProvider::~LoginProfilePolicyProvider() { |
96 } | 97 } |
97 | 98 |
98 void LoginProfilePolicyProvider::Init(SchemaRegistry* registry) { | 99 void LoginProfilePolicyProvider::Init(SchemaRegistry* registry) { |
99 ConfigurationPolicyProvider::Init(registry); | 100 ConfigurationPolicyProvider::Init(registry); |
100 device_policy_service_->AddObserver(POLICY_DOMAIN_CHROME, this); | 101 device_policy_service_->AddObserver(POLICY_DOMAIN_CHROME, this); |
101 if (device_policy_service_->IsInitializationComplete(POLICY_DOMAIN_CHROME)) | 102 if (device_policy_service_->IsInitializationComplete(POLICY_DOMAIN_CHROME)) |
102 UpdateFromDevicePolicy(); | 103 UpdateFromDevicePolicy(); |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
197 ApplyValueAsMandatoryPolicy(policy_value.get(), | 198 ApplyValueAsMandatoryPolicy(policy_value.get(), |
198 key::kPowerManagementIdleSettings, | 199 key::kPowerManagementIdleSettings, |
199 &user_policy_map); | 200 &user_policy_map); |
200 } | 201 } |
201 } | 202 } |
202 | 203 |
203 UpdatePolicy(bundle.Pass()); | 204 UpdatePolicy(bundle.Pass()); |
204 } | 205 } |
205 | 206 |
206 } // namespace policy | 207 } // namespace policy |
OLD | NEW |