Index: chromeos/network/onc/onc_validator.cc |
diff --git a/chromeos/network/onc/onc_validator.cc b/chromeos/network/onc/onc_validator.cc |
index cb320970521437e9babba2e5add883260db60723..bba2d904faace43c606013f8ca09e383bfe68a2d 100644 |
--- a/chromeos/network/onc/onc_validator.cc |
+++ b/chromeos/network/onc/onc_validator.cc |
@@ -177,6 +177,24 @@ scoped_ptr<base::Value> Validator::MapField( |
return result.Pass(); |
} |
+scoped_ptr<base::ListValue> Validator::MapArray( |
+ const OncValueSignature& array_signature, |
+ const base::ListValue& onc_array, |
+ bool* nested_error) { |
+ bool nested_error_in_current_array = false; |
+ scoped_ptr<base::ListValue> result = Mapper::MapArray( |
+ array_signature, onc_array, &nested_error_in_current_array); |
+ |
+ // Drop individual networks and certificates instead of rejecting all of |
+ // the configuration. |
+ if (nested_error_in_current_array && |
+ &array_signature != &kNetworkConfigurationListSignature && |
+ &array_signature != &kCertificateListSignature) { |
+ *nested_error = nested_error_in_current_array; |
stevenjb
2012/12/14 01:06:36
It seems odd that nested_error is only sometimes s
pneubeck (no reviews)
2012/12/14 18:55:46
That's currently the behavior of all other methods
stevenjb
2012/12/14 20:21:40
OK, as long as the comment is clear that's fine.
|
+ } |
+ return result.Pass(); |
+} |
+ |
scoped_ptr<base::Value> Validator::MapEntry(int index, |
const OncValueSignature& signature, |
const base::Value& onc_value, |
@@ -229,6 +247,7 @@ bool Validator::ValidateRecommendedField( |
recommended.reset(recommended_list); |
if (!managed_onc_) { |
+ error_or_warning_found_ = true; |
LOG(WARNING) << WarningHeader() << "Found the field '" << onc::kRecommended |
<< "' in an unmanaged ONC. Removing it."; |
return true; |