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/extension_management_constants.h" | 9 #include "chrome/browser/extensions/extension_management_constants.h" |
10 #include "chrome/browser/extensions/external_policy_loader.h" | 10 #include "chrome/browser/extensions/external_policy_loader.h" |
11 #include "chrome/common/pref_names.h" | |
12 #include "components/crx_file/id_util.h" | 11 #include "components/crx_file/id_util.h" |
13 #include "components/policy/core/browser/policy_error_map.h" | 12 #include "components/policy/core/browser/policy_error_map.h" |
14 #include "components/policy/core/common/policy_map.h" | 13 #include "components/policy/core/common/policy_map.h" |
15 #include "components/policy/core/common/schema.h" | 14 #include "components/policy/core/common/schema.h" |
16 #include "extensions/browser/pref_names.h" | 15 #include "extensions/browser/pref_names.h" |
17 #include "extensions/common/extension.h" | 16 #include "extensions/common/extension.h" |
18 #include "grit/components_strings.h" | 17 #include "grit/components_strings.h" |
19 #include "policy/policy_constants.h" | 18 #include "policy/policy_constants.h" |
20 #include "url/gurl.h" | 19 #include "url/gurl.h" |
21 | 20 |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 void ExtensionSettingsPolicyHandler::ApplyPolicySettings( | 317 void ExtensionSettingsPolicyHandler::ApplyPolicySettings( |
319 const policy::PolicyMap& policies, | 318 const policy::PolicyMap& policies, |
320 PrefValueMap* prefs) { | 319 PrefValueMap* prefs) { |
321 scoped_ptr<base::Value> policy_value; | 320 scoped_ptr<base::Value> policy_value; |
322 if (!CheckAndGetValue(policies, NULL, &policy_value) || !policy_value) | 321 if (!CheckAndGetValue(policies, NULL, &policy_value) || !policy_value) |
323 return; | 322 return; |
324 prefs->SetValue(pref_names::kExtensionManagement, policy_value.release()); | 323 prefs->SetValue(pref_names::kExtensionManagement, policy_value.release()); |
325 } | 324 } |
326 | 325 |
327 } // namespace extensions | 326 } // namespace extensions |
OLD | NEW |