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

Unified Diff: chromeos/network/managed_network_configuration_handler_impl.cc

Issue 884013007: MNCH: Check result before accessing validated_user_settings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/network/managed_network_configuration_handler_impl.cc
diff --git a/chromeos/network/managed_network_configuration_handler_impl.cc b/chromeos/network/managed_network_configuration_handler_impl.cc
index 04669f79638efe50562e0b76939667ca880b2cd6..be67c522d1f869fa55fdf5f039b1c7374e91d25a 100644
--- a/chromeos/network/managed_network_configuration_handler_impl.cc
+++ b/chromeos/network/managed_network_configuration_handler_impl.cc
@@ -288,14 +288,6 @@ void ManagedNetworkConfigurationHandlerImpl::SetProperties(
&onc::kNetworkConfigurationSignature,
*user_settings_copy,
&validation_result);
-
- // Fill in HexSSID field from contents of SSID field if not set already.
- if (user_settings_copy) {
- onc::FillInHexSSIDFieldsInOncObject(
- onc::kNetworkConfigurationSignature, validated_user_settings.get());
- }
-
-
if (validation_result == onc::Validator::INVALID) {
InvokeErrorCallback(service_path, error_callback, kInvalidUserSettings);
return;
@@ -303,6 +295,12 @@ void ManagedNetworkConfigurationHandlerImpl::SetProperties(
if (validation_result == onc::Validator::VALID_WITH_WARNINGS)
LOG(WARNING) << "Validation of ONC user settings produced warnings.";
+ // Fill in HexSSID field from contents of SSID field if not set already.
+ if (user_settings_copy) {
+ onc::FillInHexSSIDFieldsInOncObject(onc::kNetworkConfigurationSignature,
+ validated_user_settings.get());
+ }
+
const base::DictionaryValue* network_policy =
GetByGUID(policies->per_network_config, guid);
VLOG(2) << "This configuration is " << (network_policy ? "" : "not ")
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698