| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chromeos/network/onc/onc_translation_tables.h" | 5 #include "chromeos/network/onc/onc_translation_tables.h" |
| 6 | 6 |
| 7 #include <cstddef> | 7 #include <cstddef> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "components/onc/onc_constants.h" | 10 #include "components/onc/onc_constants.h" |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 {::onc::vpn::kTypeL2TP_IPsec, shill::kProviderL2tpIpsec}, | 289 {::onc::vpn::kTypeL2TP_IPsec, shill::kProviderL2tpIpsec}, |
| 290 {::onc::vpn::kOpenVPN, shill::kProviderOpenVpn}, | 290 {::onc::vpn::kOpenVPN, shill::kProviderOpenVpn}, |
| 291 {::onc::vpn::kThirdPartyVpn, shill::kProviderThirdPartyVpn}, | 291 {::onc::vpn::kThirdPartyVpn, shill::kProviderThirdPartyVpn}, |
| 292 {NULL}}; | 292 {NULL}}; |
| 293 | 293 |
| 294 const StringTranslationEntry kWiFiSecurityTable[] = { | 294 const StringTranslationEntry kWiFiSecurityTable[] = { |
| 295 {::onc::wifi::kSecurityNone, shill::kSecurityNone}, | 295 {::onc::wifi::kSecurityNone, shill::kSecurityNone}, |
| 296 {::onc::wifi::kWEP_PSK, shill::kSecurityWep}, | 296 {::onc::wifi::kWEP_PSK, shill::kSecurityWep}, |
| 297 {::onc::wifi::kWPA_PSK, shill::kSecurityPsk}, | 297 {::onc::wifi::kWPA_PSK, shill::kSecurityPsk}, |
| 298 {::onc::wifi::kWPA_EAP, shill::kSecurity8021x}, | 298 {::onc::wifi::kWPA_EAP, shill::kSecurity8021x}, |
| 299 {::onc::wifi::kWEP_8021X, shill::kSecurityWep}, |
| 299 {NULL}}; | 300 {NULL}}; |
| 300 | 301 |
| 301 const StringTranslationEntry kEAPOuterTable[] = { | 302 const StringTranslationEntry kEAPOuterTable[] = { |
| 302 {::onc::eap::kPEAP, shill::kEapMethodPEAP}, | 303 {::onc::eap::kPEAP, shill::kEapMethodPEAP}, |
| 303 {::onc::eap::kEAP_TLS, shill::kEapMethodTLS}, | 304 {::onc::eap::kEAP_TLS, shill::kEapMethodTLS}, |
| 304 {::onc::eap::kEAP_TTLS, shill::kEapMethodTTLS}, | 305 {::onc::eap::kEAP_TTLS, shill::kEapMethodTTLS}, |
| 305 {::onc::eap::kLEAP, shill::kEapMethodLEAP}, | 306 {::onc::eap::kLEAP, shill::kEapMethodLEAP}, |
| 306 {NULL}}; | 307 {NULL}}; |
| 307 | 308 |
| 308 // Translation of the EAP.Inner field in case of EAP.Outer == PEAP | 309 // Translation of the EAP.Inner field in case of EAP.Outer == PEAP |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 438 continue; | 439 continue; |
| 439 *onc_value = table[i].onc_value; | 440 *onc_value = table[i].onc_value; |
| 440 return true; | 441 return true; |
| 441 } | 442 } |
| 442 LOG(ERROR) << "Value '" << shill_value << "' cannot be translated to ONC"; | 443 LOG(ERROR) << "Value '" << shill_value << "' cannot be translated to ONC"; |
| 443 return false; | 444 return false; |
| 444 } | 445 } |
| 445 | 446 |
| 446 } // namespace onc | 447 } // namespace onc |
| 447 } // namespace chromeos | 448 } // namespace chromeos |
| OLD | NEW |