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/extensions/policy_handlers.h" | 5 #include "chrome/browser/extensions/policy_handlers.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/prefs/pref_value_map.h" | 8 #include "base/prefs/pref_value_map.h" |
9 #include "chrome/browser/extensions/external_policy_loader.h" | 9 #include "chrome/browser/extensions/external_policy_loader.h" |
10 #include "chrome/browser/policy/policy_error_map.h" | 10 #include "chrome/browser/policy/policy_error_map.h" |
11 #include "chrome/browser/policy/policy_map.h" | |
12 #include "chrome/common/pref_names.h" | 11 #include "chrome/common/pref_names.h" |
| 12 #include "components/policy/core/common/policy_map.h" |
13 #include "extensions/common/extension.h" | 13 #include "extensions/common/extension.h" |
14 #include "grit/generated_resources.h" | 14 #include "grit/generated_resources.h" |
15 #include "policy/policy_constants.h" | 15 #include "policy/policy_constants.h" |
16 | 16 |
17 namespace extensions { | 17 namespace extensions { |
18 | 18 |
19 // ExtensionListPolicyHandler implementation ----------------------------------- | 19 // ExtensionListPolicyHandler implementation ----------------------------------- |
20 | 20 |
21 ExtensionListPolicyHandler::ExtensionListPolicyHandler(const char* policy_name, | 21 ExtensionListPolicyHandler::ExtensionListPolicyHandler(const char* policy_name, |
22 const char* pref_path, | 22 const char* pref_path, |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 const policy::PolicyMap& policies, | 238 const policy::PolicyMap& policies, |
239 PrefValueMap* prefs) { | 239 PrefValueMap* prefs) { |
240 if (!pref_path_) | 240 if (!pref_path_) |
241 return; | 241 return; |
242 const Value* value = policies.GetValue(policy_name()); | 242 const Value* value = policies.GetValue(policy_name()); |
243 if (value) | 243 if (value) |
244 prefs->SetValue(pref_path_, value->DeepCopy()); | 244 prefs->SetValue(pref_path_, value->DeepCopy()); |
245 } | 245 } |
246 | 246 |
247 } // namespace extensions | 247 } // namespace extensions |
OLD | NEW |