| 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 "chromeos/network/onc/onc_constants.h" | 10 #include "chromeos/network/onc/onc_constants.h" |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 { network_type::kVPN, flimflam::kTypeVPN }, | 183 { network_type::kVPN, flimflam::kTypeVPN }, |
| 184 { NULL } | 184 { NULL } |
| 185 }; | 185 }; |
| 186 | 186 |
| 187 const StringTranslationEntry kVPNTypeTable[] = { | 187 const StringTranslationEntry kVPNTypeTable[] = { |
| 188 { vpn::kTypeL2TP_IPsec, flimflam::kProviderL2tpIpsec }, | 188 { vpn::kTypeL2TP_IPsec, flimflam::kProviderL2tpIpsec }, |
| 189 { vpn::kOpenVPN, flimflam::kProviderOpenVpn }, | 189 { vpn::kOpenVPN, flimflam::kProviderOpenVpn }, |
| 190 { NULL } | 190 { NULL } |
| 191 }; | 191 }; |
| 192 | 192 |
| 193 // The first matching line is chosen. |
| 193 const StringTranslationEntry kWiFiSecurityTable[] = { | 194 const StringTranslationEntry kWiFiSecurityTable[] = { |
| 194 { wifi::kNone, flimflam::kSecurityNone }, | 195 { wifi::kNone, flimflam::kSecurityNone }, |
| 195 { wifi::kWEP_PSK, flimflam::kSecurityWep }, | 196 { wifi::kWEP_PSK, flimflam::kSecurityWep }, |
| 196 { wifi::kWPA_PSK, flimflam::kSecurityPsk }, | 197 { wifi::kWPA_PSK, flimflam::kSecurityPsk }, |
| 197 { wifi::kWPA_EAP, flimflam::kSecurity8021x }, | 198 { wifi::kWPA_EAP, flimflam::kSecurity8021x }, |
| 199 { wifi::kWPA_PSK, flimflam::kSecurityRsn }, |
| 198 { NULL } | 200 { NULL } |
| 199 }; | 201 }; |
| 200 | 202 |
| 201 const StringTranslationEntry kEAPOuterTable[] = { | 203 const StringTranslationEntry kEAPOuterTable[] = { |
| 202 { eap::kPEAP, flimflam::kEapMethodPEAP }, | 204 { eap::kPEAP, flimflam::kEapMethodPEAP }, |
| 203 { eap::kEAP_TLS, flimflam::kEapMethodTLS }, | 205 { eap::kEAP_TLS, flimflam::kEapMethodTLS }, |
| 204 { eap::kEAP_TTLS, flimflam::kEapMethodTTLS }, | 206 { eap::kEAP_TTLS, flimflam::kEapMethodTTLS }, |
| 205 { eap::kLEAP, flimflam::kEapMethodLEAP }, | 207 { eap::kLEAP, flimflam::kEapMethodLEAP }, |
| 206 { NULL } | 208 { NULL } |
| 207 }; | 209 }; |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 continue; | 268 continue; |
| 267 *onc_value = table[i].onc_value; | 269 *onc_value = table[i].onc_value; |
| 268 return true; | 270 return true; |
| 269 } | 271 } |
| 270 LOG(ERROR) << "Value '" << shill_value << "' cannot be translated to ONC"; | 272 LOG(ERROR) << "Value '" << shill_value << "' cannot be translated to ONC"; |
| 271 return false; | 273 return false; |
| 272 } | 274 } |
| 273 | 275 |
| 274 } // namespace onc | 276 } // namespace onc |
| 275 } // namespace chromeos | 277 } // namespace chromeos |
| OLD | NEW |