OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/extensions/extension_management_test_util.h" | 5 #include "chrome/browser/extensions/extension_management_test_util.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "components/crx_file/id_util.h" | 9 #include "components/crx_file/id_util.h" |
10 #include "components/policy/core/common/configuration_policy_provider.h" | 10 #include "components/policy/core/common/configuration_policy_provider.h" |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 if (policy_value && policy_value->GetAsDictionary(&dict_value)) | 256 if (policy_value && policy_value->GetAsDictionary(&dict_value)) |
257 SetPref(dict_value->DeepCopy()); | 257 SetPref(dict_value->DeepCopy()); |
258 else | 258 else |
259 SetPref(new base::DictionaryValue); | 259 SetPref(new base::DictionaryValue); |
260 } | 260 } |
261 | 261 |
262 ExtensionManagementPolicyUpdater::~ExtensionManagementPolicyUpdater() { | 262 ExtensionManagementPolicyUpdater::~ExtensionManagementPolicyUpdater() { |
263 policies_->Get(policy::PolicyNamespace(policy::POLICY_DOMAIN_CHROME, | 263 policies_->Get(policy::PolicyNamespace(policy::POLICY_DOMAIN_CHROME, |
264 std::string())) | 264 std::string())) |
265 .Set(policy::key::kExtensionSettings, policy::POLICY_LEVEL_MANDATORY, | 265 .Set(policy::key::kExtensionSettings, policy::POLICY_LEVEL_MANDATORY, |
266 policy::POLICY_SCOPE_USER, TakePref().release(), nullptr); | 266 policy::POLICY_SCOPE_USER, policy::POLICY_SOURCE_CLOUD, |
| 267 TakePref().release(), nullptr); |
267 provider_->UpdatePolicy(policies_.Pass()); | 268 provider_->UpdatePolicy(policies_.Pass()); |
268 } | 269 } |
269 | 270 |
270 } // namespace extensions | 271 } // namespace extensions |
OLD | NEW |