Chromium Code Reviews| 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 e750dda3d4c77ddd62db079f4bc85212dd896d9b..aead3f14cd650ffdba015f9f3aee1fbed8479f7b 100644 |
| --- a/chromeos/network/managed_network_configuration_handler_impl.cc |
| +++ b/chromeos/network/managed_network_configuration_handler_impl.cc |
| @@ -739,6 +739,23 @@ void ManagedNetworkConfigurationHandlerImpl::GetPropertiesCallback( |
| scoped_ptr<base::DictionaryValue> shill_properties_copy( |
| shill_properties.DeepCopy()); |
| + std::string guid; |
| + shill_properties.GetStringWithoutPathExpansion(shill::kGuidProperty, &guid); |
| + if (guid.empty()) { |
| + // Unmanaged networks are assigned a GUID in NetworkState. Provide this |
| + // value in the ONC dictionary. |
| + const NetworkState* state = |
| + network_state_handler_->GetNetworkState(service_path); |
| + if (state && !state->guid().empty()) { |
| + guid = state->guid(); |
|
pneubeck (no reviews)
2015/01/14 17:47:10
nit: inlining this is clearer as the original valu
stevenjb
2015/01/14 18:07:44
I'm not sure I agree. Currently guid is unused, bu
pneubeck (no reviews)
2015/01/15 09:45:12
sounds ok.
|
| + shill_properties_copy->SetStringWithoutPathExpansion(shill::kGuidProperty, |
| + guid); |
| + } else { |
| + LOG(ERROR) << "Network has no GUID specified: " << service_path; |
| + } |
| + } |
| + |
| + |
| std::string type; |
| shill_properties_copy->GetStringWithoutPathExpansion(shill::kTypeProperty, |
| &type); |