| 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/network_type_pattern.h" | 10 #include "chromeos/network/network_type_pattern.h" |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 const FieldTranslationEntry vpn_fields[] = { | 107 const FieldTranslationEntry vpn_fields[] = { |
| 108 {::onc::vpn::kAutoConnect, shill::kAutoConnectProperty}, | 108 {::onc::vpn::kAutoConnect, shill::kAutoConnectProperty}, |
| 109 // These fields are converted during translation, see onc_translator_*. | 109 // These fields are converted during translation, see onc_translator_*. |
| 110 // { ::onc::vpn::kHost, shill::kProviderHostProperty}, | 110 // { ::onc::vpn::kHost, shill::kProviderHostProperty}, |
| 111 // { ::onc::vpn::kType, shill::kProviderTypeProperty }, | 111 // { ::onc::vpn::kType, shill::kProviderTypeProperty }, |
| 112 {NULL}}; | 112 {NULL}}; |
| 113 | 113 |
| 114 const FieldTranslationEntry tether_fields[] = { | 114 const FieldTranslationEntry tether_fields[] = { |
| 115 {::onc::tether::kBatteryPercentage, kTetherBatteryPercentage}, | 115 {::onc::tether::kBatteryPercentage, kTetherBatteryPercentage}, |
| 116 {::onc::tether::kCarrier, kTetherCarrier}, | 116 {::onc::tether::kCarrier, kTetherCarrier}, |
| 117 {::onc::tether::kHasConnectedToHost, kTetherHasConnectedToHost}, |
| 117 {::onc::tether::kSignalStrength, kTetherSignalStrength}, | 118 {::onc::tether::kSignalStrength, kTetherSignalStrength}, |
| 118 {NULL}}; | 119 {NULL}}; |
| 119 | 120 |
| 120 const FieldTranslationEntry wifi_fields[] = { | 121 const FieldTranslationEntry wifi_fields[] = { |
| 121 {::onc::wifi::kAutoConnect, shill::kAutoConnectProperty}, | 122 {::onc::wifi::kAutoConnect, shill::kAutoConnectProperty}, |
| 122 {::onc::wifi::kBSSID, shill::kWifiBSsid}, | 123 {::onc::wifi::kBSSID, shill::kWifiBSsid}, |
| 123 // This dictionary is converted during translation, see onc_translator_*. | 124 // This dictionary is converted during translation, see onc_translator_*. |
| 124 // { ::onc::wifi::kEAP, shill::kEap*}, | 125 // { ::onc::wifi::kEAP, shill::kEap*}, |
| 125 {::onc::wifi::kFrequency, shill::kWifiFrequency}, | 126 {::onc::wifi::kFrequency, shill::kWifiFrequency}, |
| 126 {::onc::wifi::kFrequencyList, shill::kWifiFrequencyListProperty}, | 127 {::onc::wifi::kFrequencyList, shill::kWifiFrequencyListProperty}, |
| (...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 continue; | 451 continue; |
| 451 *onc_value = table[i].onc_value; | 452 *onc_value = table[i].onc_value; |
| 452 return true; | 453 return true; |
| 453 } | 454 } |
| 454 LOG(ERROR) << "Value '" << shill_value << "' cannot be translated to ONC"; | 455 LOG(ERROR) << "Value '" << shill_value << "' cannot be translated to ONC"; |
| 455 return false; | 456 return false; |
| 456 } | 457 } |
| 457 | 458 |
| 458 } // namespace onc | 459 } // namespace onc |
| 459 } // namespace chromeos | 460 } // namespace chromeos |
| OLD | NEW |