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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 | 171 |
172 // Type is converted during translation, see onc_translator_*. | 172 // Type is converted during translation, see onc_translator_*. |
173 // { ::onc::network_config::kType, shill::kTypeProperty }, | 173 // { ::onc::network_config::kType, shill::kTypeProperty }, |
174 | 174 |
175 // These fields are converted during translation, see | 175 // These fields are converted during translation, see |
176 // onc_translator_shill_to_onc.cc. They are only converted when going from | 176 // onc_translator_shill_to_onc.cc. They are only converted when going from |
177 // Shill->ONC, and ignored otherwise. | 177 // Shill->ONC, and ignored otherwise. |
178 // { ::onc::network_config::kConnectionState, shill::kStateProperty }, | 178 // { ::onc::network_config::kConnectionState, shill::kStateProperty }, |
179 // { ::onc::network_config::kRestrictedConnectivity, | 179 // { ::onc::network_config::kRestrictedConnectivity, |
180 // shill::kStateProperty }, | 180 // shill::kStateProperty }, |
| 181 // { ::onc::network_config::kSource, shill::kProfileProperty }, |
181 // { ::onc::network_config::kMacAddress, shill::kAddressProperty }, | 182 // { ::onc::network_config::kMacAddress, shill::kAddressProperty }, |
182 {NULL}}; | 183 {NULL}}; |
183 | 184 |
184 const FieldTranslationEntry ipconfig_fields[] = { | 185 const FieldTranslationEntry ipconfig_fields[] = { |
185 { ::onc::ipconfig::kIPAddress, shill::kAddressProperty}, | 186 { ::onc::ipconfig::kIPAddress, shill::kAddressProperty}, |
186 { ::onc::ipconfig::kGateway, shill::kGatewayProperty}, | 187 { ::onc::ipconfig::kGateway, shill::kGatewayProperty}, |
187 { ::onc::ipconfig::kRoutingPrefix, shill::kPrefixlenProperty}, | 188 { ::onc::ipconfig::kRoutingPrefix, shill::kPrefixlenProperty}, |
188 { ::onc::ipconfig::kNameServers, shill::kNameServersProperty}, | 189 { ::onc::ipconfig::kNameServers, shill::kNameServersProperty}, |
189 // This field is converted during translation, see ShillToONCTranslator:: | 190 // This field is converted during translation, see ShillToONCTranslator:: |
190 // TranslateIPConfig. It is only converted from Shill->ONC. | 191 // TranslateIPConfig. It is only converted from Shill->ONC. |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
405 continue; | 406 continue; |
406 *onc_value = table[i].onc_value; | 407 *onc_value = table[i].onc_value; |
407 return true; | 408 return true; |
408 } | 409 } |
409 LOG(ERROR) << "Value '" << shill_value << "' cannot be translated to ONC"; | 410 LOG(ERROR) << "Value '" << shill_value << "' cannot be translated to ONC"; |
410 return false; | 411 return false; |
411 } | 412 } |
412 | 413 |
413 } // namespace onc | 414 } // namespace onc |
414 } // namespace chromeos | 415 } // namespace chromeos |
OLD | NEW |