Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(64)

Unified Diff: chromeos/network/onc/onc_validator.cc

Issue 830133003: ONC: Remove the top level fields NameServers and SearchDomains. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix IPConfig documentation and adapt validation. Created 5 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chromeos/network/onc/onc_signature.cc ('k') | components/onc/docs/onc_spec.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/network/onc/onc_validator.cc
diff --git a/chromeos/network/onc/onc_validator.cc b/chromeos/network/onc/onc_validator.cc
index fd55b296a793d34021525a67dcb61364a7f470dd..60a863c7f8064863270ed368771ab83518ed7255 100644
--- a/chromeos/network/onc/onc_validator.cc
+++ b/chromeos/network/onc/onc_validator.cc
@@ -608,8 +608,10 @@ bool Validator::ValidateIPConfig(base::DictionaryValue* result) {
}
bool all_required_exist = RequireField(*result, kIPAddress) &&
- RequireField(*result, kRoutingPrefix) &&
RequireField(*result, ::onc::ipconfig::kType);
+ if (result->HasKey(kIPAddress))
+ all_required_exist &= RequireField(*result, kRoutingPrefix);
+
return !error_on_missing_field_ || all_required_exist;
}
« no previous file with comments | « chromeos/network/onc/onc_signature.cc ('k') | components/onc/docs/onc_spec.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698