| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 return true; | 177 return true; |
| 178 | 178 |
| 179 const base::ListValue* list_value = NULL; | 179 const base::ListValue* list_value = NULL; |
| 180 if (!input->GetAsList(&list_value)) { | 180 if (!input->GetAsList(&list_value)) { |
| 181 NOTREACHED(); | 181 NOTREACHED(); |
| 182 return false; | 182 return false; |
| 183 } | 183 } |
| 184 | 184 |
| 185 for (auto entry = list_value->begin(); entry != list_value->end(); ++entry) { | 185 for (auto entry = list_value->begin(); entry != list_value->end(); ++entry) { |
| 186 std::string entry_value; | 186 std::string entry_value; |
| 187 if (!(*entry)->GetAsString(&entry_value)) { | 187 if (!entry->GetAsString(&entry_value)) { |
| 188 if (errors) { | 188 if (errors) { |
| 189 errors->AddError(policy_name(), entry - list_value->begin(), | 189 errors->AddError(policy_name(), entry - list_value->begin(), |
| 190 IDS_POLICY_TYPE_ERROR, | 190 IDS_POLICY_TYPE_ERROR, |
| 191 base::Value::GetTypeName(base::Value::Type::STRING)); | 191 base::Value::GetTypeName(base::Value::Type::STRING)); |
| 192 } | 192 } |
| 193 continue; | 193 continue; |
| 194 } | 194 } |
| 195 | 195 |
| 196 std::unique_ptr<base::Value> mapped_value = Map(entry_value); | 196 std::unique_ptr<base::Value> mapped_value = Map(entry_value); |
| 197 if (mapped_value) { | 197 if (mapped_value) { |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 452 } | 452 } |
| 453 } | 453 } |
| 454 | 454 |
| 455 void LegacyPoliciesDeprecatingPolicyHandler::ApplyPolicySettings( | 455 void LegacyPoliciesDeprecatingPolicyHandler::ApplyPolicySettings( |
| 456 const policy::PolicyMap& /* policies */, | 456 const policy::PolicyMap& /* policies */, |
| 457 PrefValueMap* /* prefs */) { | 457 PrefValueMap* /* prefs */) { |
| 458 NOTREACHED(); | 458 NOTREACHED(); |
| 459 } | 459 } |
| 460 | 460 |
| 461 } // namespace policy | 461 } // namespace policy |
| OLD | NEW |