| 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 { ::onc::network_config::kErrorState, shill::kErrorProperty }, |
| 174 {NULL}}; | 175 {NULL}}; |
| 175 | 176 |
| 176 const FieldTranslationEntry ipconfig_fields[] = { | 177 const FieldTranslationEntry ipconfig_fields[] = { |
| 177 { ::onc::ipconfig::kIPAddress, shill::kAddressProperty}, | 178 { ::onc::ipconfig::kIPAddress, shill::kAddressProperty}, |
| 178 { ::onc::ipconfig::kGateway, shill::kGatewayProperty}, | 179 { ::onc::ipconfig::kGateway, shill::kGatewayProperty}, |
| 179 { ::onc::ipconfig::kRoutingPrefix, shill::kPrefixlenProperty}, | 180 { ::onc::ipconfig::kRoutingPrefix, shill::kPrefixlenProperty}, |
| 180 { ::onc::ipconfig::kNameServers, shill::kNameServersProperty}, | 181 { ::onc::ipconfig::kNameServers, shill::kNameServersProperty}, |
| 181 {NULL}}; | 182 {NULL}}; |
| 182 | 183 |
| 183 struct OncValueTranslationEntry { | 184 struct OncValueTranslationEntry { |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 continue; | 326 continue; |
| 326 *onc_value = table[i].onc_value; | 327 *onc_value = table[i].onc_value; |
| 327 return true; | 328 return true; |
| 328 } | 329 } |
| 329 LOG(ERROR) << "Value '" << shill_value << "' cannot be translated to ONC"; | 330 LOG(ERROR) << "Value '" << shill_value << "' cannot be translated to ONC"; |
| 330 return false; | 331 return false; |
| 331 } | 332 } |
| 332 | 333 |
| 333 } // namespace onc | 334 } // namespace onc |
| 334 } // namespace chromeos | 335 } // namespace chromeos |
| OLD | NEW |