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 "chrome/browser/policy/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 "chrome/browser/policy/configuration_policy_pref_store.h" | 16 #include "components/policy/core/browser/configuration_policy_pref_store.h" |
17 #include "components/policy/core/browser/policy_error_map.h" | 17 #include "components/policy/core/browser/policy_error_map.h" |
18 #include "components/policy/core/common/policy_map.h" | 18 #include "components/policy/core/common/policy_map.h" |
19 #include "grit/component_strings.h" | 19 #include "grit/component_strings.h" |
20 #include "url/gurl.h" | 20 #include "url/gurl.h" |
21 | 21 |
22 namespace policy { | 22 namespace policy { |
23 | 23 |
24 // ConfigurationPolicyHandler implementation ----------------------------------- | 24 // ConfigurationPolicyHandler implementation ----------------------------------- |
25 | 25 |
26 // static | 26 // static |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 void SimplePolicyHandler::ApplyPolicySettings(const PolicyMap& policies, | 289 void SimplePolicyHandler::ApplyPolicySettings(const PolicyMap& policies, |
290 PrefValueMap* prefs) { | 290 PrefValueMap* prefs) { |
291 if (!pref_path_) | 291 if (!pref_path_) |
292 return; | 292 return; |
293 const Value* value = policies.GetValue(policy_name()); | 293 const Value* value = policies.GetValue(policy_name()); |
294 if (value) | 294 if (value) |
295 prefs->SetValue(pref_path_, value->DeepCopy()); | 295 prefs->SetValue(pref_path_, value->DeepCopy()); |
296 } | 296 } |
297 | 297 |
298 } // namespace policy | 298 } // namespace policy |
OLD | NEW |