| 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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 { ::onc::network_type::kCellular, shill::kTypeCellular}, | 220 { ::onc::network_type::kCellular, shill::kTypeCellular}, |
| 221 { ::onc::network_type::kVPN, shill::kTypeVPN}, | 221 { ::onc::network_type::kVPN, shill::kTypeVPN}, |
| 222 {NULL}}; | 222 {NULL}}; |
| 223 | 223 |
| 224 const StringTranslationEntry kVPNTypeTable[] = { | 224 const StringTranslationEntry kVPNTypeTable[] = { |
| 225 { ::onc::vpn::kTypeL2TP_IPsec, shill::kProviderL2tpIpsec}, | 225 { ::onc::vpn::kTypeL2TP_IPsec, shill::kProviderL2tpIpsec}, |
| 226 { ::onc::vpn::kOpenVPN, shill::kProviderOpenVpn}, {NULL}}; | 226 { ::onc::vpn::kOpenVPN, shill::kProviderOpenVpn}, {NULL}}; |
| 227 | 227 |
| 228 // The first matching line is chosen. | 228 // The first matching line is chosen. |
| 229 const StringTranslationEntry kWiFiSecurityTable[] = { | 229 const StringTranslationEntry kWiFiSecurityTable[] = { |
| 230 { ::onc::wifi::kNone, shill::kSecurityNone}, | 230 { ::onc::wifi::kSecurityNone, shill::kSecurityNone}, |
| 231 { ::onc::wifi::kWEP_PSK, shill::kSecurityWep}, | 231 { ::onc::wifi::kWEP_PSK, shill::kSecurityWep}, |
| 232 { ::onc::wifi::kWPA_PSK, shill::kSecurityPsk}, | 232 { ::onc::wifi::kWPA_PSK, shill::kSecurityPsk}, |
| 233 { ::onc::wifi::kWPA_EAP, shill::kSecurity8021x}, | 233 { ::onc::wifi::kWPA_EAP, shill::kSecurity8021x}, |
| 234 { ::onc::wifi::kWPA_PSK, shill::kSecurityRsn}, | 234 { ::onc::wifi::kWPA_PSK, shill::kSecurityRsn}, |
| 235 { ::onc::wifi::kWPA_PSK, shill::kSecurityWpa}, | 235 { ::onc::wifi::kWPA_PSK, shill::kSecurityWpa}, |
| 236 {NULL}}; | 236 {NULL}}; |
| 237 | 237 |
| 238 const StringTranslationEntry kEAPOuterTable[] = { | 238 const StringTranslationEntry kEAPOuterTable[] = { |
| 239 { ::onc::eap::kPEAP, shill::kEapMethodPEAP}, | 239 { ::onc::eap::kPEAP, shill::kEapMethodPEAP}, |
| 240 { ::onc::eap::kEAP_TLS, shill::kEapMethodTLS}, | 240 { ::onc::eap::kEAP_TLS, shill::kEapMethodTLS}, |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 continue; | 345 continue; |
| 346 *onc_value = table[i].onc_value; | 346 *onc_value = table[i].onc_value; |
| 347 return true; | 347 return true; |
| 348 } | 348 } |
| 349 LOG(ERROR) << "Value '" << shill_value << "' cannot be translated to ONC"; | 349 LOG(ERROR) << "Value '" << shill_value << "' cannot be translated to ONC"; |
| 350 return false; | 350 return false; |
| 351 } | 351 } |
| 352 | 352 |
| 353 } // namespace onc | 353 } // namespace onc |
| 354 } // namespace chromeos | 354 } // namespace chromeos |
| OLD | NEW |