Chromium Code Reviews| 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 101 const FieldTranslationEntry vpn_fields[] = { | 101 const FieldTranslationEntry vpn_fields[] = { |
| 102 { ::onc::vpn::kAutoConnect, shill::kAutoConnectProperty}, | 102 { ::onc::vpn::kAutoConnect, shill::kAutoConnectProperty}, |
| 103 // These fields are converted during translation, see onc_translator_*. | 103 // These fields are converted during translation, see onc_translator_*. |
| 104 // { ::onc::vpn::kHost, shill::kProviderHostProperty}, | 104 // { ::onc::vpn::kHost, shill::kProviderHostProperty}, |
| 105 // { ::onc::vpn::kType, shill::kProviderTypeProperty }, | 105 // { ::onc::vpn::kType, shill::kProviderTypeProperty }, |
| 106 {NULL}}; | 106 {NULL}}; |
| 107 | 107 |
| 108 const FieldTranslationEntry wifi_fields[] = { | 108 const FieldTranslationEntry wifi_fields[] = { |
| 109 { ::onc::wifi::kAutoConnect, shill::kAutoConnectProperty}, | 109 { ::onc::wifi::kAutoConnect, shill::kAutoConnectProperty}, |
| 110 { ::onc::wifi::kBSSID, shill::kWifiBSsid}, | 110 { ::onc::wifi::kBSSID, shill::kWifiBSsid}, |
| 111 // This dictionary is converted during translation, see onc_translator_*. | |
|
pneubeck (no reviews)
2014/09/19 07:39:23
usually, I didn't list dictionaries. but I'm ok wi
stevenjb
2014/09/19 17:37:20
Hmm, you're right, we don't, but... this was the f
pneubeck (no reviews)
2014/09/19 17:44:23
sounds good.
| |
| 112 // { ::onc::wifi::kEAP, shill::kEap*}, | |
| 111 { ::onc::wifi::kFrequency, shill::kWifiFrequency}, | 113 { ::onc::wifi::kFrequency, shill::kWifiFrequency}, |
| 112 { ::onc::wifi::kFrequencyList, shill::kWifiFrequencyListProperty}, | 114 { ::onc::wifi::kFrequencyList, shill::kWifiFrequencyListProperty}, |
| 113 { ::onc::wifi::kHiddenSSID, shill::kWifiHiddenSsid}, | 115 { ::onc::wifi::kHiddenSSID, shill::kWifiHiddenSsid}, |
| 114 { ::onc::wifi::kPassphrase, shill::kPassphraseProperty}, | 116 { ::onc::wifi::kPassphrase, shill::kPassphraseProperty}, |
| 115 // This field is converted during translation, see onc_translator_*. | 117 // This field is converted during translation, see onc_translator_*. |
| 116 // { ::onc::wifi::kSSID, shill::kWifiHexSsid}, | 118 // { ::onc::wifi::kSSID, shill::kWifiHexSsid}, |
| 117 // This field is converted during translation, see onc_translator_*. | 119 // This field is converted during translation, see onc_translator_*. |
| 118 // { ::onc::wifi::kSecurity, shill::kSecurityProperty }, | 120 // { ::onc::wifi::kSecurity, shill::kSecurityProperty }, |
| 119 { ::onc::wifi::kSignalStrength, shill::kSignalStrengthProperty}, | 121 { ::onc::wifi::kSignalStrength, shill::kSignalStrengthProperty}, |
| 120 {NULL}}; | 122 {NULL}}; |
| 121 | 123 |
| 122 const FieldTranslationEntry wimax_fields[] = { | 124 const FieldTranslationEntry wimax_fields[] = { |
| 123 { ::onc::wimax::kAutoConnect, shill::kAutoConnectProperty}, | 125 { ::onc::wimax::kAutoConnect, shill::kAutoConnectProperty}, |
| 126 // This dictionary is converted during translation, see onc_translator_*. | |
| 127 // { ::onc::wimax::kEAP, shill::kEap*}, | |
| 124 { ::onc::wimax::kSignalStrength, shill::kSignalStrengthProperty}, | 128 { ::onc::wimax::kSignalStrength, shill::kSignalStrengthProperty}, |
| 125 {NULL}}; | 129 {NULL}}; |
| 126 | 130 |
| 127 const FieldTranslationEntry cellular_apn_fields[] = { | 131 const FieldTranslationEntry cellular_apn_fields[] = { |
| 128 { ::onc::cellular_apn::kAccessPointName, shill::kApnProperty}, | 132 { ::onc::cellular_apn::kAccessPointName, shill::kApnProperty}, |
| 129 { ::onc::cellular_apn::kName, shill::kApnNameProperty}, | 133 { ::onc::cellular_apn::kName, shill::kApnNameProperty}, |
| 130 { ::onc::cellular_apn::kUsername, shill::kApnUsernameProperty}, | 134 { ::onc::cellular_apn::kUsername, shill::kApnUsernameProperty}, |
| 131 { ::onc::cellular_apn::kPassword, shill::kApnPasswordProperty}, | 135 { ::onc::cellular_apn::kPassword, shill::kApnPasswordProperty}, |
| 132 { ::onc::cellular_apn::kLocalizedName, shill::kApnLocalizedNameProperty}, | 136 { ::onc::cellular_apn::kLocalizedName, shill::kApnLocalizedNameProperty}, |
| 133 { ::onc::cellular_apn::kLanguage, shill::kApnLanguageProperty}, | 137 { ::onc::cellular_apn::kLanguage, shill::kApnLanguageProperty}, |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 413 continue; | 417 continue; |
| 414 *onc_value = table[i].onc_value; | 418 *onc_value = table[i].onc_value; |
| 415 return true; | 419 return true; |
| 416 } | 420 } |
| 417 LOG(ERROR) << "Value '" << shill_value << "' cannot be translated to ONC"; | 421 LOG(ERROR) << "Value '" << shill_value << "' cannot be translated to ONC"; |
| 418 return false; | 422 return false; |
| 419 } | 423 } |
| 420 | 424 |
| 421 } // namespace onc | 425 } // namespace onc |
| 422 } // namespace chromeos | 426 } // namespace chromeos |
| OLD | NEW |