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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
181 {NULL}}; | 181 {NULL}}; |
182 | 182 |
183 const FieldTranslationEntry ipconfig_fields[] = { | 183 const FieldTranslationEntry ipconfig_fields[] = { |
184 { ::onc::ipconfig::kIPAddress, shill::kAddressProperty}, | 184 { ::onc::ipconfig::kIPAddress, shill::kAddressProperty}, |
185 { ::onc::ipconfig::kGateway, shill::kGatewayProperty}, | 185 { ::onc::ipconfig::kGateway, shill::kGatewayProperty}, |
186 { ::onc::ipconfig::kRoutingPrefix, shill::kPrefixlenProperty}, | 186 { ::onc::ipconfig::kRoutingPrefix, shill::kPrefixlenProperty}, |
187 { ::onc::ipconfig::kNameServers, shill::kNameServersProperty}, | 187 { ::onc::ipconfig::kNameServers, shill::kNameServersProperty}, |
188 // This field is converted during translation, see ShillToONCTranslator:: | 188 // This field is converted during translation, see ShillToONCTranslator:: |
189 // TranslateIPConfig. It is only converted from Shill->ONC. | 189 // TranslateIPConfig. It is only converted from Shill->ONC. |
190 // { ::onc::ipconfig::kType, shill::kMethodProperty}, | 190 // { ::onc::ipconfig::kType, shill::kMethodProperty}, |
191 { ::onc::ipconfig::kWebProxyAutoDiscoveryUrl, | |
pneubeck (no reviews)
2014/09/03 15:14:28
add this only to the saved_ipconfig_fields array a
stevenjb
2014/09/03 21:28:06
Acknowledged.
| |
192 shill::kWebProxyAutoDiscoveryUrlProperty}, | |
191 {NULL}}; | 193 {NULL}}; |
192 | 194 |
193 struct OncValueTranslationEntry { | 195 struct OncValueTranslationEntry { |
194 const OncValueSignature* onc_signature; | 196 const OncValueSignature* onc_signature; |
195 const FieldTranslationEntry* field_translation_table; | 197 const FieldTranslationEntry* field_translation_table; |
196 }; | 198 }; |
197 | 199 |
198 const OncValueTranslationEntry onc_value_translation_table[] = { | 200 const OncValueTranslationEntry onc_value_translation_table[] = { |
199 { &kEAPSignature, eap_fields }, | 201 { &kEAPSignature, eap_fields }, |
200 { &kIPsecSignature, ipsec_fields }, | 202 { &kIPsecSignature, ipsec_fields }, |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
384 continue; | 386 continue; |
385 *onc_value = table[i].onc_value; | 387 *onc_value = table[i].onc_value; |
386 return true; | 388 return true; |
387 } | 389 } |
388 LOG(ERROR) << "Value '" << shill_value << "' cannot be translated to ONC"; | 390 LOG(ERROR) << "Value '" << shill_value << "' cannot be translated to ONC"; |
389 return false; | 391 return false; |
390 } | 392 } |
391 | 393 |
392 } // namespace onc | 394 } // namespace onc |
393 } // namespace chromeos | 395 } // namespace chromeos |
OLD | NEW |