Chromium Code Reviews| Index: components/policy/core/common/schema_map.cc |
| diff --git a/components/policy/core/common/schema_map.cc b/components/policy/core/common/schema_map.cc |
| index 488af8d0f5168ee62cf973a4c00c11a6f89b9fd8..56411fabd7e758538d247bb8c7c58e0443540e4f 100644 |
| --- a/components/policy/core/common/schema_map.cc |
| +++ b/components/policy/core/common/schema_map.cc |
| @@ -4,6 +4,7 @@ |
| #include "components/policy/core/common/schema_map.h" |
| +#include "base/logging.h" |
| #include "base/values.h" |
| #include "components/policy/core/common/policy_bundle.h" |
| #include "components/policy/core/common/policy_map.h" |
| @@ -63,8 +64,13 @@ void SchemaMap::FilterBundle(PolicyBundle* bundle) const { |
| const base::Value* policy_value = it_map->second.value; |
| Schema policy_schema = schema->GetProperty(policy_name); |
| ++it_map; |
| - if (!policy_value || !policy_schema.Validate(*policy_value)) |
| + std::string error; |
| + if (!policy_value || !policy_schema.Validate(*policy_value, |
| + SCHEMA_STRICT, &error)) { |
|
Joao da Silva
2014/01/23 15:52:36
Try formatting this line with clang-format:
binjin
2014/01/23 17:20:13
Done.
|
| + LOG(ERROR) << "Dropping policy " << policy_name << " for " << |
| + it->first.component_id << " because it's not valid: " << error; |
|
Joao da Silva
2014/01/23 15:52:36
Run clang-format on this one too; I didn't format
binjin
2014/01/23 17:20:13
Done.
|
| map->Erase(policy_name); |
| + } |
| } |
| } |
| } |