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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 {::onc::sim_lock_status::kLockType, shill::kSIMLockTypeProperty}, | 159 {::onc::sim_lock_status::kLockType, shill::kSIMLockTypeProperty}, |
160 {::onc::sim_lock_status::kRetriesLeft, shill::kSIMLockRetriesLeftProperty}, | 160 {::onc::sim_lock_status::kRetriesLeft, shill::kSIMLockRetriesLeftProperty}, |
161 {NULL}}; | 161 {NULL}}; |
162 | 162 |
163 // This must only contain Service properties and not Device properties. | 163 // This must only contain Service properties and not Device properties. |
164 // For Device properties see kCellularDeviceTable. | 164 // For Device properties see kCellularDeviceTable. |
165 const FieldTranslationEntry cellular_fields[] = { | 165 const FieldTranslationEntry cellular_fields[] = { |
166 {::onc::cellular::kActivationType, shill::kActivationTypeProperty}, | 166 {::onc::cellular::kActivationType, shill::kActivationTypeProperty}, |
167 // This field is converted during translation, see onc_translator_*. | 167 // This field is converted during translation, see onc_translator_*. |
168 // { ::onc::cellular::kActivationState, shill::kActivationStateProperty}, | 168 // { ::onc::cellular::kActivationState, shill::kActivationStateProperty}, |
169 {::onc::vpn::kAutoConnect, shill::kAutoConnectProperty}, | 169 {::onc::cellular::kAutoConnect, shill::kAutoConnectProperty}, |
170 // This field is converted during translation, see onc_translator_*. | 170 // This field is converted during translation, see onc_translator_*. |
171 // { ::onc::cellular::kNetworkTechnology, | 171 // { ::onc::cellular::kNetworkTechnology, |
172 // shill::kNetworkTechnologyProperty}, | 172 // shill::kNetworkTechnologyProperty}, |
173 // This field is converted during translation, see onc_translator_*. | 173 // This field is converted during translation, see onc_translator_*. |
174 // { ::onc::cellular::kRoamingState, shill::kRoamingStateProperty}, | 174 // { ::onc::cellular::kRoamingState, shill::kRoamingStateProperty}, |
175 {::onc::cellular::kSignalStrength, shill::kSignalStrengthProperty}, | 175 {::onc::cellular::kSignalStrength, shill::kSignalStrengthProperty}, |
176 {NULL}}; | 176 {NULL}}; |
177 | 177 |
178 const FieldTranslationEntry network_fields[] = { | 178 const FieldTranslationEntry network_fields[] = { |
179 {::onc::network_config::kGUID, shill::kGuidProperty}, | 179 {::onc::network_config::kGUID, shill::kGuidProperty}, |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
426 continue; | 426 continue; |
427 *onc_value = table[i].onc_value; | 427 *onc_value = table[i].onc_value; |
428 return true; | 428 return true; |
429 } | 429 } |
430 LOG(ERROR) << "Value '" << shill_value << "' cannot be translated to ONC"; | 430 LOG(ERROR) << "Value '" << shill_value << "' cannot be translated to ONC"; |
431 return false; | 431 return false; |
432 } | 432 } |
433 | 433 |
434 } // namespace onc | 434 } // namespace onc |
435 } // namespace chromeos | 435 } // namespace chromeos |
OLD | NEW |