Chromium Code Reviews| Index: components/policy/core/common/cloud/cloud_policy_manager.cc |
| diff --git a/components/policy/core/common/cloud/cloud_policy_manager.cc b/components/policy/core/common/cloud/cloud_policy_manager.cc |
| index 4069e98cf6ffc491db23826dea10ddb1bebbd363..6de355e17383f2fd5c5221b3f604d189a6cfa6f5 100644 |
| --- a/components/policy/core/common/cloud/cloud_policy_manager.cc |
| +++ b/components/policy/core/common/cloud/cloud_policy_manager.cc |
| @@ -16,6 +16,7 @@ |
| #include "components/policy/core/common/policy_bundle.h" |
| #include "components/policy/core/common/policy_map.h" |
| #include "components/policy/core/common/policy_switches.h" |
| +#include "components/policy/policy_constants.h" |
| #include "components/prefs/pref_service.h" |
| #include "net/url_request/url_request_context_getter.h" |
| @@ -107,6 +108,12 @@ void CloudPolicyManager::CheckAndPublishPolicy() { |
| void CloudPolicyManager::GetChromePolicy(PolicyMap* policy_map) { |
| policy_map->CopyFrom(store()->policy_map()); |
| + |
| + // If the store has a verified policy blob received from the server then apply |
| + // the defaults for policies that haven't been configured by the administrator |
| + // given that this is an enterprise user. |
| + if (store()->has_policy()) |
| + SetEnterpriseUsersDefaults(policy_map); |
|
Marc Treib
2016/08/25 15:52:07
This doesn't quite match the "spec" in the bug: I'
Andrew T Wilson (Slow)
2016/08/26 07:56:50
I'm a bit concerned about this because it will now
Marc Treib
2016/08/26 09:19:19
Yup, this code duplication is what I was trying to
|
| } |
| void CloudPolicyManager::CreateComponentCloudPolicyService( |