| 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 "chrome/browser/policy/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/json/json_writer.h" | 11 #include "base/json/json_writer.h" |
| 12 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "base/prefs/pref_value_map.h" | 13 #include "base/prefs/pref_value_map.h" |
| 14 #include "base/strings/string16.h" | 14 #include "base/strings/string16.h" |
| 15 #include "base/strings/string_number_conversions.h" | 15 #include "base/strings/string_number_conversions.h" |
| 16 #include "base/strings/string_util.h" | 16 #include "base/strings/string_util.h" |
| 17 #include "chrome/browser/policy/configuration_policy_pref_store.h" | 17 #include "chrome/browser/policy/configuration_policy_pref_store.h" |
| 18 #include "chrome/browser/policy/external_data_fetcher.h" | |
| 19 #include "chrome/browser/policy/policy_error_map.h" | 18 #include "chrome/browser/policy/policy_error_map.h" |
| 20 #include "chrome/browser/policy/policy_map.h" | 19 #include "components/policy/core/common/external_data_fetcher.h" |
| 20 #include "components/policy/core/common/policy_map.h" |
| 21 #include "grit/generated_resources.h" | 21 #include "grit/generated_resources.h" |
| 22 #include "url/gurl.h" | 22 #include "url/gurl.h" |
| 23 | 23 |
| 24 namespace policy { | 24 namespace policy { |
| 25 | 25 |
| 26 namespace { | 26 namespace { |
| 27 | 27 |
| 28 // Helper function ------------------------------------------------------------- | 28 // Helper function ------------------------------------------------------------- |
| 29 | 29 |
| 30 // Utility function that returns a JSON representation of the given |dict| as | 30 // Utility function that returns a JSON representation of the given |dict| as |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 void SimplePolicyHandler::ApplyPolicySettings(const PolicyMap& policies, | 333 void SimplePolicyHandler::ApplyPolicySettings(const PolicyMap& policies, |
| 334 PrefValueMap* prefs) { | 334 PrefValueMap* prefs) { |
| 335 if (!pref_path_) | 335 if (!pref_path_) |
| 336 return; | 336 return; |
| 337 const Value* value = policies.GetValue(policy_name()); | 337 const Value* value = policies.GetValue(policy_name()); |
| 338 if (value) | 338 if (value) |
| 339 prefs->SetValue(pref_path_, value->DeepCopy()); | 339 prefs->SetValue(pref_path_, value->DeepCopy()); |
| 340 } | 340 } |
| 341 | 341 |
| 342 } // namespace policy | 342 } // namespace policy |
| OLD | NEW |