| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/browser/configuration_policy_handler.h" | 5 #include "components/policy/core/browser/configuration_policy_handler.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/prefs/pref_value_map.h" | 12 #include "base/prefs/pref_value_map.h" |
| 13 #include "base/strings/string16.h" | 13 #include "base/strings/string16.h" |
| 14 #include "base/strings/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
| 15 #include "base/strings/string_util.h" | 15 #include "base/strings/string_util.h" |
| 16 #include "components/policy/core/browser/configuration_policy_pref_store.h" | |
| 17 #include "components/policy/core/browser/policy_error_map.h" | 16 #include "components/policy/core/browser/policy_error_map.h" |
| 18 #include "components/policy/core/common/policy_map.h" | 17 #include "components/policy/core/common/policy_map.h" |
| 19 #include "grit/component_strings.h" | 18 #include "grit/component_strings.h" |
| 20 #include "url/gurl.h" | 19 #include "url/gurl.h" |
| 21 | 20 |
| 22 namespace policy { | 21 namespace policy { |
| 23 | 22 |
| 24 // ConfigurationPolicyHandler implementation ----------------------------------- | 23 // ConfigurationPolicyHandler implementation ----------------------------------- |
| 25 | 24 |
| 26 // static | 25 // static |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 void SimplePolicyHandler::ApplyPolicySettings(const PolicyMap& policies, | 289 void SimplePolicyHandler::ApplyPolicySettings(const PolicyMap& policies, |
| 291 PrefValueMap* prefs) { | 290 PrefValueMap* prefs) { |
| 292 if (!pref_path_) | 291 if (!pref_path_) |
| 293 return; | 292 return; |
| 294 const base::Value* value = policies.GetValue(policy_name()); | 293 const base::Value* value = policies.GetValue(policy_name()); |
| 295 if (value) | 294 if (value) |
| 296 prefs->SetValue(pref_path_, value->DeepCopy()); | 295 prefs->SetValue(pref_path_, value->DeepCopy()); |
| 297 } | 296 } |
| 298 | 297 |
| 299 } // namespace policy | 298 } // namespace policy |
| OLD | NEW |