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 a2a58caeeb1f2d646ea909cef1e8c1a6187aca75..5fae2ed7058456d4ad32b3f60b19d396869366eb 100644 |
| --- a/chromeos/network/managed_network_configuration_handler_impl.cc |
| +++ b/chromeos/network/managed_network_configuration_handler_impl.cc |
| @@ -127,12 +127,14 @@ void ManagedNetworkConfigurationHandlerImpl::GetManagedProperties( |
| base::Bind( |
| &ManagedNetworkConfigurationHandlerImpl::SendManagedProperties, |
| weak_ptr_factory_.GetWeakPtr(), |
| + userhash, |
| callback, |
| error_callback)), |
| error_callback); |
| } |
| void ManagedNetworkConfigurationHandlerImpl::SendManagedProperties( |
| + const std::string& userhash, |
| const network_handler::DictionaryResultCallback& callback, |
| const network_handler::ErrorCallback& error_callback, |
| const std::string& service_path, |
| @@ -159,14 +161,14 @@ void ManagedNetworkConfigurationHandlerImpl::SendManagedProperties( |
| // properties _might_ be user configured. |
| } |
| + std::string guid; |
| + shill_properties->GetStringWithoutPathExpansion(shill::kGuidProperty, &guid); |
| + |
| + ::onc::ONCSource onc_source; |
| + FindPolicyByGUID(userhash, guid, &onc_source); |
| scoped_ptr<base::DictionaryValue> active_settings( |
| onc::TranslateShillServiceToONCPart( |
| - *shill_properties, |
| - &onc::kNetworkWithStateSignature)); |
| - |
| - std::string guid; |
| - active_settings->GetStringWithoutPathExpansion(::onc::network_config::kGUID, |
| - &guid); |
| + *shill_properties, onc_source, &onc::kNetworkWithStateSignature)); |
| const base::DictionaryValue* network_policy = NULL; |
| const base::DictionaryValue* global_policy = NULL; |
| @@ -215,8 +217,9 @@ void ManagedNetworkConfigurationHandlerImpl::SendProperties( |
| const std::string& service_path, |
| scoped_ptr<base::DictionaryValue> shill_properties) { |
| scoped_ptr<base::DictionaryValue> onc_network( |
| - onc::TranslateShillServiceToONCPart(*shill_properties, |
| - &onc::kNetworkWithStateSignature)); |
| + onc::TranslateShillServiceToONCPart( |
| + *shill_properties, ::onc::ONC_SOURCE_NONE, |
|
pneubeck (no reviews)
2014/09/10 10:49:38
See next comment. This leads to incorrect 'Source'
stevenjb
2014/09/10 17:32:15
Acknowledged.
|
| + &onc::kNetworkWithStateSignature)); |
| callback.Run(service_path, *onc_network); |
| } |