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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 // This field is conditionally translated, see onc_translator_*. | 164 // This field is conditionally translated, see onc_translator_*. |
165 // { ::onc::network_config::kName, shill::kNameProperty }, | 165 // { ::onc::network_config::kName, shill::kNameProperty }, |
166 { ::onc::network_config::kGUID, shill::kGuidProperty}, | 166 { ::onc::network_config::kGUID, shill::kGuidProperty}, |
167 // This field is converted during translation, see onc_translator_*. | 167 // This field is converted during translation, see onc_translator_*. |
168 // { ::onc::network_config::kType, shill::kTypeProperty }, | 168 // { ::onc::network_config::kType, shill::kTypeProperty }, |
169 | 169 |
170 // This field is converted during translation, see | 170 // This field is converted during translation, see |
171 // onc_translator_shill_to_onc.cc. It is only converted when going from | 171 // onc_translator_shill_to_onc.cc. It is only converted when going from |
172 // Shill->ONC, and ignored otherwise. | 172 // Shill->ONC, and ignored otherwise. |
173 // { ::onc::network_config::kConnectionState, shill::kStateProperty }, | 173 // { ::onc::network_config::kConnectionState, shill::kStateProperty }, |
| 174 |
| 175 { ::onc::network_config::kConnectable, shill::kConnectableProperty }, |
| 176 { ::onc::network_config::kErrorState, shill::kErrorProperty }, |
174 {NULL}}; | 177 {NULL}}; |
175 | 178 |
176 const FieldTranslationEntry ipconfig_fields[] = { | 179 const FieldTranslationEntry ipconfig_fields[] = { |
177 { ::onc::ipconfig::kIPAddress, shill::kAddressProperty}, | 180 { ::onc::ipconfig::kIPAddress, shill::kAddressProperty}, |
178 { ::onc::ipconfig::kGateway, shill::kGatewayProperty}, | 181 { ::onc::ipconfig::kGateway, shill::kGatewayProperty}, |
179 { ::onc::ipconfig::kRoutingPrefix, shill::kPrefixlenProperty}, | 182 { ::onc::ipconfig::kRoutingPrefix, shill::kPrefixlenProperty}, |
180 { ::onc::ipconfig::kNameServers, shill::kNameServersProperty}, | 183 { ::onc::ipconfig::kNameServers, shill::kNameServersProperty}, |
181 // This field is converted during translation, see ShillToONCTranslator:: | 184 // This field is converted during translation, see ShillToONCTranslator:: |
182 // TranslateIPConfig It is only converted from Shill->ONC. | 185 // TranslateIPConfig It is only converted from Shill->ONC. |
183 // { ::onc::ipconfig::kType, shill::kMethodProperty}, | 186 // { ::onc::ipconfig::kType, shill::kMethodProperty}, |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 continue; | 331 continue; |
329 *onc_value = table[i].onc_value; | 332 *onc_value = table[i].onc_value; |
330 return true; | 333 return true; |
331 } | 334 } |
332 LOG(ERROR) << "Value '" << shill_value << "' cannot be translated to ONC"; | 335 LOG(ERROR) << "Value '" << shill_value << "' cannot be translated to ONC"; |
333 return false; | 336 return false; |
334 } | 337 } |
335 | 338 |
336 } // namespace onc | 339 } // namespace onc |
337 } // namespace chromeos | 340 } // namespace chromeos |
OLD | NEW |