Chromium Code Reviews| Index: chromeos/network/onc/onc_translator_onc_to_shill.cc |
| diff --git a/chromeos/network/onc/onc_translator_onc_to_shill.cc b/chromeos/network/onc/onc_translator_onc_to_shill.cc |
| index 8e30af55446f6889b6c35922c488bf602039aae8..c43677aec17495e438f49f7caa1b60411392d3ba 100644 |
| --- a/chromeos/network/onc/onc_translator_onc_to_shill.cc |
| +++ b/chromeos/network/onc/onc_translator_onc_to_shill.cc |
| @@ -257,6 +257,25 @@ void LocalTranslator::TranslateNetworkConfiguration() { |
| if (type == ::onc::network_type::kVPN) |
| CopyFieldFromONCToShill(::onc::network_config::kName, shill::kNameProperty); |
| + std::string ipconfig_type; |
| + onc_object_->GetStringWithoutPathExpansion( |
| + ::onc::network_config::kIPConfigType, &ipconfig_type); |
| + |
| + if (ipconfig_type == ::onc::network_config::kIPConfigTypeDHCP) { |
| + // Clear the properties of StaticIPConfig. |
| + scoped_ptr<base::DictionaryValue> static_ipconfig( |
| + new base::DictionaryValue); |
| + static_ipconfig->SetWithoutPathExpansion(shill::kAddressProperty, |
| + base::Value::CreateNullValue()); |
| + static_ipconfig->SetWithoutPathExpansion(shill::kGatewayProperty, |
| + base::Value::CreateNullValue()); |
| + static_ipconfig->SetWithoutPathExpansion(shill::kPrefixlenProperty, |
| + base::Value::CreateNullValue()); |
|
stevenjb
2014/12/05 00:37:08
So, this it turns out is incorrect. When setting k
|
| + shill_dictionary_->SetWithoutPathExpansion(shill::kStaticIPConfigProperty, |
| + static_ipconfig.release()); |
| + } |
| + // Otherwise, the StaticIPConfig is set and translated. |
| + |
| CopyFieldsAccordingToSignature(); |
| } |