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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 { ::onc::cellular::kActivationType, shill::kActivationTypeProperty}, | 152 { ::onc::cellular::kActivationType, shill::kActivationTypeProperty}, |
153 { ::onc::cellular::kActivationState, shill::kActivationStateProperty}, | 153 { ::onc::cellular::kActivationState, shill::kActivationStateProperty}, |
154 { ::onc::cellular::kNetworkTechnology, shill::kNetworkTechnologyProperty}, | 154 { ::onc::cellular::kNetworkTechnology, shill::kNetworkTechnologyProperty}, |
155 { ::onc::cellular::kRoamingState, shill::kRoamingStateProperty}, | 155 { ::onc::cellular::kRoamingState, shill::kRoamingStateProperty}, |
156 {NULL}}; | 156 {NULL}}; |
157 | 157 |
158 const FieldTranslationEntry network_fields[] = { | 158 const FieldTranslationEntry network_fields[] = { |
159 { ::onc::network_config::kGUID, shill::kGuidProperty}, | 159 { ::onc::network_config::kGUID, shill::kGuidProperty}, |
160 { ::onc::network_config::kConnectable, shill::kConnectableProperty }, | 160 { ::onc::network_config::kConnectable, shill::kConnectableProperty }, |
161 { ::onc::network_config::kErrorState, shill::kErrorProperty }, | 161 { ::onc::network_config::kErrorState, shill::kErrorProperty }, |
| 162 { ::onc::network_config::kPriority, shill::kPriorityProperty }, |
162 | 163 |
163 // Shill doesn't allow setting the name for non-VPN networks. | 164 // Shill doesn't allow setting the name for non-VPN networks. |
164 // Name is conditionally translated, see onc_translator_*. | 165 // Name is conditionally translated, see onc_translator_*. |
165 // { ::onc::network_config::kName, shill::kNameProperty }, | 166 // { ::onc::network_config::kName, shill::kNameProperty }, |
166 | 167 |
167 // Type is converted during translation, see onc_translator_*. | 168 // Type is converted during translation, see onc_translator_*. |
168 // { ::onc::network_config::kType, shill::kTypeProperty }, | 169 // { ::onc::network_config::kType, shill::kTypeProperty }, |
169 | 170 |
170 // These fields are converted during translation, see | 171 // These fields are converted during translation, see |
171 // onc_translator_shill_to_onc.cc. They are only converted when going from | 172 // onc_translator_shill_to_onc.cc. They are only converted when going from |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
365 continue; | 366 continue; |
366 *onc_value = table[i].onc_value; | 367 *onc_value = table[i].onc_value; |
367 return true; | 368 return true; |
368 } | 369 } |
369 LOG(ERROR) << "Value '" << shill_value << "' cannot be translated to ONC"; | 370 LOG(ERROR) << "Value '" << shill_value << "' cannot be translated to ONC"; |
370 return false; | 371 return false; |
371 } | 372 } |
372 | 373 |
373 } // namespace onc | 374 } // namespace onc |
374 } // namespace chromeos | 375 } // namespace chromeos |
OLD | NEW |