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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 // This field is conditionally translated, see onc_translator_*. | 166 // This field is conditionally translated, see onc_translator_*. |
167 // { ::onc::network_config::kName, shill::kNameProperty }, | 167 // { ::onc::network_config::kName, shill::kNameProperty }, |
168 { ::onc::network_config::kGUID, shill::kGuidProperty}, | 168 { ::onc::network_config::kGUID, shill::kGuidProperty}, |
169 // This field is converted during translation, see onc_translator_*. | 169 // This field is converted during translation, see onc_translator_*. |
170 // { ::onc::network_config::kType, shill::kTypeProperty }, | 170 // { ::onc::network_config::kType, shill::kTypeProperty }, |
171 | 171 |
172 // This field is converted during translation, see | 172 // This field is converted during translation, see |
173 // onc_translator_shill_to_onc.cc. It is only converted when going from | 173 // onc_translator_shill_to_onc.cc. It is only converted when going from |
174 // Shill->ONC, and ignored otherwise. | 174 // Shill->ONC, and ignored otherwise. |
175 // { ::onc::network_config::kConnectionState, shill::kStateProperty }, | 175 // { ::onc::network_config::kConnectionState, shill::kStateProperty }, |
| 176 { ::onc::network_config::kErrorState, shill::kErrorProperty }, |
176 {NULL}}; | 177 {NULL}}; |
177 | 178 |
178 struct OncValueTranslationEntry { | 179 struct OncValueTranslationEntry { |
179 const OncValueSignature* onc_signature; | 180 const OncValueSignature* onc_signature; |
180 const FieldTranslationEntry* field_translation_table; | 181 const FieldTranslationEntry* field_translation_table; |
181 }; | 182 }; |
182 | 183 |
183 const OncValueTranslationEntry onc_value_translation_table[] = { | 184 const OncValueTranslationEntry onc_value_translation_table[] = { |
184 { &kEAPSignature, eap_fields }, | 185 { &kEAPSignature, eap_fields }, |
185 { &kIPsecSignature, ipsec_fields }, | 186 { &kIPsecSignature, ipsec_fields }, |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 continue; | 320 continue; |
320 *onc_value = table[i].onc_value; | 321 *onc_value = table[i].onc_value; |
321 return true; | 322 return true; |
322 } | 323 } |
323 LOG(ERROR) << "Value '" << shill_value << "' cannot be translated to ONC"; | 324 LOG(ERROR) << "Value '" << shill_value << "' cannot be translated to ONC"; |
324 return false; | 325 return false; |
325 } | 326 } |
326 | 327 |
327 } // namespace onc | 328 } // namespace onc |
328 } // namespace chromeos | 329 } // namespace chromeos |
OLD | NEW |