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 "components/policy/core/common/cloud/user_cloud_policy_manager.h" | 5 #include "components/policy/core/common/cloud/user_cloud_policy_manager.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 void UserCloudPolicyManager::GetChromePolicy(PolicyMap* policy_map) { | 101 void UserCloudPolicyManager::GetChromePolicy(PolicyMap* policy_map) { |
102 CloudPolicyManager::GetChromePolicy(policy_map); | 102 CloudPolicyManager::GetChromePolicy(policy_map); |
103 | 103 |
104 // If the store has a verified policy blob received from the server then apply | 104 // If the store has a verified policy blob received from the server then apply |
105 // the defaults for policies that haven't been configured by the administrator | 105 // the defaults for policies that haven't been configured by the administrator |
106 // given that this is an enterprise user. | 106 // given that this is an enterprise user. |
107 // TODO(treib,atwilson): We should just call SetEnterpriseUsersDefaults here, | 107 // TODO(treib,atwilson): We should just call SetEnterpriseUsersDefaults here, |
108 // see crbug.com/640950. | 108 // see crbug.com/640950. |
109 if (store()->has_policy() && | 109 if (store()->has_policy() && |
110 !policy_map->Get(key::kNTPContentSuggestionsEnabled)) { | 110 !policy_map->Get(key::kNTPContentSuggestionsEnabled)) { |
111 policy_map->Set(key::kNTPContentSuggestionsEnabled, | 111 policy_map->Set(key::kNTPContentSuggestionsEnabled, POLICY_LEVEL_MANDATORY, |
112 POLICY_LEVEL_MANDATORY, | 112 POLICY_SCOPE_USER, POLICY_SOURCE_ENTERPRISE_DEFAULT, |
113 POLICY_SCOPE_USER, | 113 base::MakeUnique<base::Value>(false), |
114 POLICY_SOURCE_ENTERPRISE_DEFAULT, | |
115 base::MakeUnique<base::FundamentalValue>(false), | |
116 nullptr /* external_data_fetcher */); | 114 nullptr /* external_data_fetcher */); |
117 } | 115 } |
118 } | 116 } |
119 | 117 |
120 } // namespace policy | 118 } // namespace policy |
OLD | NEW |