Chromium Code Reviews| Index: chromeos/network/onc/onc_translator_shill_to_onc.cc |
| diff --git a/chromeos/network/onc/onc_translator_shill_to_onc.cc b/chromeos/network/onc/onc_translator_shill_to_onc.cc |
| index f91950f534e12ab10524246e4ade547b386b820f..31ac0b62e1ca5b5e8d786945a6cd30cb3a0ccd33 100644 |
| --- a/chromeos/network/onc/onc_translator_shill_to_onc.cc |
| +++ b/chromeos/network/onc/onc_translator_shill_to_onc.cc |
| @@ -27,6 +27,8 @@ namespace onc { |
| namespace { |
| +const char kKeyManagementIEEE8021X[] = "IEEE8021X"; |
|
stevenjb
2015/11/04 18:36:00
nit: TODO
|
| + |
| // Converts |str| to a base::Value of the given |type|. If the conversion fails, |
| // returns NULL. |
| scoped_ptr<base::Value> ConvertStringToValue(const std::string& str, |
| @@ -329,8 +331,21 @@ void ShillToONCTranslator::TranslateVPN() { |
| } |
| void ShillToONCTranslator::TranslateWiFiWithState() { |
| - TranslateWithTableAndSet(shill::kSecurityClassProperty, kWiFiSecurityTable, |
| - ::onc::wifi::kSecurity); |
| + std::string shill_security; |
| + std::string shill_key_mgmt; |
| + if (shill_dictionary_->GetStringWithoutPathExpansion( |
| + shill::kSecurityClassProperty, &shill_security) && |
| + shill_security == shill::kSecurityWep && |
| + shill_dictionary_->GetStringWithoutPathExpansion( |
| + shill::kEapKeyMgmtProperty, &shill_key_mgmt) && |
| + shill_key_mgmt == kKeyManagementIEEE8021X) { |
| + onc_object_->SetStringWithoutPathExpansion(::onc::wifi::kSecurity, |
| + ::onc::wifi::kWEP_8021X); |
| + } else { |
| + TranslateWithTableAndSet(shill::kSecurityClassProperty, kWiFiSecurityTable, |
| + ::onc::wifi::kSecurity); |
| + } |
| + |
| bool unknown_encoding = true; |
| std::string ssid = shill_property_util::GetSSIDFromProperties( |
| *shill_dictionary_, false /* verbose_logging */, &unknown_encoding); |