Supervised user import: Listen for profile creation/deletion
[chromium-blink-merge.git] / chromeos / network / onc / onc_translation_tables.cc
blobd3d00a0c5e38d3548be9e17777ca7f8dd735c5f1
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
3 // found in the LICENSE file.
5 #include "chromeos/network/onc/onc_translation_tables.h"
7 #include <cstddef>
9 #include "base/logging.h"
10 #include "components/onc/onc_constants.h"
11 #include "third_party/cros_system_api/dbus/service_constants.h"
13 namespace chromeos {
14 namespace onc {
16 // CertificatePattern is converted with function CreateUIData(...) to UIData
17 // stored in Shill.
19 // Proxy settings are converted to Shill by function
20 // ConvertOncProxySettingsToProxyConfig(...).
22 namespace {
24 const FieldTranslationEntry eap_fields[] = {
25 {::onc::eap::kAnonymousIdentity, shill::kEapAnonymousIdentityProperty},
26 {::onc::eap::kIdentity, shill::kEapIdentityProperty},
27 // This field is converted during translation, see onc_translator_*.
28 // { ::onc::eap::kInner, shill::kEapPhase2AuthProperty },
30 // This field is converted during translation, see onc_translator_*.
31 // { ::onc::eap::kOuter, shill::kEapMethodProperty },
32 {::onc::eap::kPassword, shill::kEapPasswordProperty},
33 {::onc::eap::kSaveCredentials, shill::kSaveCredentialsProperty},
34 {::onc::eap::kServerCAPEMs, shill::kEapCaCertPemProperty},
35 {::onc::eap::kUseSystemCAs, shill::kEapUseSystemCasProperty},
36 {::onc::eap::kUseProactiveKeyCaching,
37 shill::kEapUseProactiveKeyCachingProperty},
38 {NULL}};
40 const FieldTranslationEntry ipsec_fields[] = {
41 // This field is converted during translation, see onc_translator_*.
42 // { ::onc::ipsec::kAuthenticationType, shill::kL2tpIpsecAuthenticationType
43 // },
44 {::onc::ipsec::kGroup, shill::kL2tpIpsecTunnelGroupProperty},
45 // Ignored by Shill, not necessary to synchronize.
46 // { ::onc::ipsec::kIKEVersion, shill::kL2tpIpsecIkeVersion },
47 {::onc::ipsec::kPSK, shill::kL2tpIpsecPskProperty},
48 // This field is converted during translation, see onc_translator_*.
49 // { ::onc::vpn::kSaveCredentials, shill::kSaveCredentialsProperty},
50 {::onc::ipsec::kServerCAPEMs, shill::kL2tpIpsecCaCertPemProperty},
51 {NULL}};
53 const FieldTranslationEntry xauth_fields[] = {
54 {::onc::vpn::kPassword, shill::kL2tpIpsecXauthPasswordProperty},
55 {::onc::vpn::kUsername, shill::kL2tpIpsecXauthUserProperty},
56 {NULL}};
58 const FieldTranslationEntry l2tp_fields[] = {
59 {::onc::l2tp::kPassword, shill::kL2tpIpsecPasswordProperty},
60 // We don't synchronize l2tp's SaveCredentials field for now, as Shill
61 // doesn't support separate settings for ipsec and l2tp.
62 // { ::onc::l2tp::kSaveCredentials, &kBoolSignature },
63 {::onc::l2tp::kUsername, shill::kL2tpIpsecUserProperty},
64 {::onc::l2tp::kLcpEchoDisabled, shill::kL2tpIpsecLcpEchoDisabledProperty},
65 {NULL}};
67 const FieldTranslationEntry openvpn_fields[] = {
68 {::onc::openvpn::kAuth, shill::kOpenVPNAuthProperty},
69 {::onc::openvpn::kAuthNoCache, shill::kOpenVPNAuthNoCacheProperty},
70 {::onc::openvpn::kAuthRetry, shill::kOpenVPNAuthRetryProperty},
71 {::onc::openvpn::kCipher, shill::kOpenVPNCipherProperty},
72 {::onc::openvpn::kCompLZO, shill::kOpenVPNCompLZOProperty},
73 {::onc::openvpn::kCompNoAdapt, shill::kOpenVPNCompNoAdaptProperty},
74 {::onc::openvpn::kIgnoreDefaultRoute,
75 shill::kOpenVPNIgnoreDefaultRouteProperty},
76 {::onc::openvpn::kKeyDirection, shill::kOpenVPNKeyDirectionProperty},
77 {::onc::openvpn::kNsCertType, shill::kOpenVPNNsCertTypeProperty},
78 // This field is converted during translation, see onc_translator_*.
79 // { ::onc::vpn::kOTP, shill::kOpenVPNTokenProperty or kOpenVPNOTPProperty},
80 // This field is converted during translation, see onc_translator_*.
81 // { ::onc::vpn::kPassword, shill::kOpenVPNPasswordProperty},
82 {::onc::openvpn::kPort, shill::kOpenVPNPortProperty},
83 {::onc::openvpn::kProto, shill::kOpenVPNProtoProperty},
84 {::onc::openvpn::kPushPeerInfo, shill::kOpenVPNPushPeerInfoProperty},
85 {::onc::openvpn::kRemoteCertEKU, shill::kOpenVPNRemoteCertEKUProperty},
86 // This field is converted during translation, see onc_translator_*.
87 // { ::onc::openvpn::kRemoteCertKU, shill::kOpenVPNRemoteCertKUProperty },
88 {::onc::openvpn::kRemoteCertTLS, shill::kOpenVPNRemoteCertTLSProperty},
89 {::onc::openvpn::kRenegSec, shill::kOpenVPNRenegSecProperty},
90 // This field is converted during translation, see onc_translator_*.
91 // { ::onc::vpn::kSaveCredentials, shill::kSaveCredentialsProperty},
92 {::onc::openvpn::kServerCAPEMs, shill::kOpenVPNCaCertPemProperty},
93 {::onc::openvpn::kServerPollTimeout,
94 shill::kOpenVPNServerPollTimeoutProperty},
95 {::onc::openvpn::kShaper, shill::kOpenVPNShaperProperty},
96 {::onc::openvpn::kStaticChallenge, shill::kOpenVPNStaticChallengeProperty},
97 {::onc::openvpn::kTLSAuthContents, shill::kOpenVPNTLSAuthContentsProperty},
98 {::onc::openvpn::kTLSRemote, shill::kOpenVPNTLSRemoteProperty},
99 {::onc::vpn::kUsername, shill::kOpenVPNUserProperty},
100 {::onc::openvpn::kVerifyHash, shill::kOpenVPNVerifyHashProperty},
101 {NULL}};
103 const FieldTranslationEntry verify_x509_fields[] = {
104 {::onc::verify_x509::kName, shill::kOpenVPNVerifyX509NameProperty},
105 {::onc::verify_x509::kType, shill::kOpenVPNVerifyX509TypeProperty},
106 {NULL}};
108 const FieldTranslationEntry vpn_fields[] = {
109 {::onc::vpn::kAutoConnect, shill::kAutoConnectProperty},
110 // These fields are converted during translation, see onc_translator_*.
111 // { ::onc::vpn::kHost, shill::kProviderHostProperty},
112 // { ::onc::vpn::kType, shill::kProviderTypeProperty },
113 {NULL}};
115 const FieldTranslationEntry wifi_fields[] = {
116 {::onc::wifi::kAutoConnect, shill::kAutoConnectProperty},
117 {::onc::wifi::kBSSID, shill::kWifiBSsid},
118 // This dictionary is converted during translation, see onc_translator_*.
119 // { ::onc::wifi::kEAP, shill::kEap*},
120 {::onc::wifi::kFrequency, shill::kWifiFrequency},
121 {::onc::wifi::kFrequencyList, shill::kWifiFrequencyListProperty},
122 {::onc::wifi::kHexSSID, shill::kWifiHexSsid},
123 {::onc::wifi::kHiddenSSID, shill::kWifiHiddenSsid},
124 {::onc::wifi::kPassphrase, shill::kPassphraseProperty},
125 {::onc::wifi::kRoamThreshold, shill::kWifiRoamThresholdProperty},
126 // This field is converted during translation, see onc_translator_*.
127 // { ::onc::wifi::kSecurity, shill::kSecurityClassProperty },
128 {::onc::wifi::kSignalStrength, shill::kSignalStrengthProperty},
129 {NULL}};
131 const FieldTranslationEntry wimax_fields[] = {
132 {::onc::wimax::kAutoConnect, shill::kAutoConnectProperty},
133 // This dictionary is converted during translation, see onc_translator_*.
134 // { ::onc::wimax::kEAP, shill::kEap*},
135 {::onc::wimax::kSignalStrength, shill::kSignalStrengthProperty},
136 {NULL}};
138 const FieldTranslationEntry cellular_apn_fields[] = {
139 {::onc::cellular_apn::kAccessPointName, shill::kApnProperty},
140 {::onc::cellular_apn::kName, shill::kApnNameProperty},
141 {::onc::cellular_apn::kUsername, shill::kApnUsernameProperty},
142 {::onc::cellular_apn::kPassword, shill::kApnPasswordProperty},
143 {::onc::cellular_apn::kLocalizedName, shill::kApnLocalizedNameProperty},
144 {::onc::cellular_apn::kLanguage, shill::kApnLanguageProperty},
145 {NULL}};
147 const FieldTranslationEntry cellular_found_network_fields[] = {
148 {::onc::cellular_found_network::kNetworkId, shill::kNetworkIdProperty},
149 {::onc::cellular_found_network::kStatus, shill::kStatusProperty},
150 {::onc::cellular_found_network::kTechnology, shill::kTechnologyProperty},
151 {::onc::cellular_found_network::kShortName, shill::kShortNameProperty},
152 {::onc::cellular_found_network::kLongName, shill::kLongNameProperty},
153 {NULL}};
155 const FieldTranslationEntry cellular_payment_portal_fields[] = {
156 {::onc::cellular_payment_portal::kMethod, shill::kPaymentPortalMethod},
157 {::onc::cellular_payment_portal::kPostData, shill::kPaymentPortalPostData},
158 {::onc::cellular_payment_portal::kUrl, shill::kPaymentPortalURL},
159 {NULL}};
161 const FieldTranslationEntry cellular_provider_fields[] = {
162 {::onc::cellular_provider::kCode, shill::kOperatorCodeKey},
163 {::onc::cellular_provider::kCountry, shill::kOperatorCountryKey},
164 {::onc::cellular_provider::kName, shill::kOperatorNameKey},
165 {NULL}};
167 const FieldTranslationEntry sim_lock_status_fields[] = {
168 {::onc::sim_lock_status::kLockEnabled, shill::kSIMLockEnabledProperty},
169 {::onc::sim_lock_status::kLockType, shill::kSIMLockTypeProperty},
170 {::onc::sim_lock_status::kRetriesLeft, shill::kSIMLockRetriesLeftProperty},
171 {NULL}};
173 // This must only contain Service properties and not Device properties.
174 // For Device properties see kCellularDeviceTable.
175 const FieldTranslationEntry cellular_fields[] = {
176 {::onc::cellular::kActivationType, shill::kActivationTypeProperty},
177 // This field is converted during translation, see onc_translator_*.
178 // { ::onc::cellular::kActivationState, shill::kActivationStateProperty},
179 {::onc::cellular::kAutoConnect, shill::kAutoConnectProperty},
180 // This field is converted during translation, see onc_translator_*.
181 // { ::onc::cellular::kNetworkTechnology,
182 // shill::kNetworkTechnologyProperty},
183 // This field is converted during translation, see onc_translator_*.
184 // { ::onc::cellular::kPaymentPortal, shill::kPaymentPortal},
185 // This field is converted during translation, see onc_translator_*.
186 // { ::onc::cellular::kRoamingState, shill::kRoamingStateProperty},
187 {::onc::cellular::kSignalStrength, shill::kSignalStrengthProperty},
188 {NULL}};
190 const FieldTranslationEntry network_fields[] = {
191 {::onc::network_config::kGUID, shill::kGuidProperty},
192 {::onc::network_config::kConnectable, shill::kConnectableProperty},
193 {::onc::network_config::kPriority, shill::kPriorityProperty},
195 // Shill doesn't allow setting the name for non-VPN networks.
196 // Name is conditionally translated, see onc_translator_*.
197 // {::onc::network_config::kName, shill::kNameProperty },
199 // Type is converted during translation, see onc_translator_*.
200 // {::onc::network_config::kType, shill::kTypeProperty },
202 // These fields are converted during translation, see
203 // onc_translator_shill_to_onc.cc. They are only converted when going from
204 // Shill->ONC, and ignored otherwise.
205 // {::onc::network_config::kConnectionState, shill::kStateProperty },
206 // {::onc::network_config::kErrorState, shill::kErrorProperty},
207 // {::onc::network_config::kRestrictedConnectivity, shill::kStateProperty },
208 // {::onc::network_config::kSource, shill::kProfileProperty },
209 // {::onc::network_config::kMacAddress, shill::kAddressProperty },
210 {NULL}};
212 const FieldTranslationEntry ipconfig_fields[] = {
213 {::onc::ipconfig::kIPAddress, shill::kAddressProperty},
214 {::onc::ipconfig::kGateway, shill::kGatewayProperty},
215 {::onc::ipconfig::kRoutingPrefix, shill::kPrefixlenProperty},
216 {::onc::ipconfig::kNameServers, shill::kNameServersProperty},
217 // This field is converted during translation, see ShillToONCTranslator::
218 // TranslateIPConfig. It is only converted from Shill->ONC.
219 // { ::onc::ipconfig::kType, shill::kMethodProperty},
220 {::onc::ipconfig::kWebProxyAutoDiscoveryUrl,
221 shill::kWebProxyAutoDiscoveryUrlProperty},
222 {NULL}};
224 const FieldTranslationEntry static_or_saved_ipconfig_fields[] = {
225 {::onc::ipconfig::kIPAddress, shill::kAddressProperty},
226 {::onc::ipconfig::kGateway, shill::kGatewayProperty},
227 {::onc::ipconfig::kRoutingPrefix, shill::kPrefixlenProperty},
228 {::onc::ipconfig::kNameServers, shill::kNameServersProperty},
229 {NULL}};
231 struct OncValueTranslationEntry {
232 const OncValueSignature* onc_signature;
233 const FieldTranslationEntry* field_translation_table;
236 const OncValueTranslationEntry onc_value_translation_table[] = {
237 {&kEAPSignature, eap_fields},
238 {&kIPsecSignature, ipsec_fields},
239 {&kL2TPSignature, l2tp_fields},
240 {&kXAUTHSignature, xauth_fields},
241 {&kOpenVPNSignature, openvpn_fields},
242 {&kVerifyX509Signature, verify_x509_fields},
243 {&kVPNSignature, vpn_fields},
244 {&kWiFiSignature, wifi_fields},
245 {&kWiFiWithStateSignature, wifi_fields},
246 {&kWiMAXSignature, wimax_fields},
247 {&kWiMAXWithStateSignature, wimax_fields},
248 {&kCellularApnSignature, cellular_apn_fields},
249 {&kCellularFoundNetworkSignature, cellular_found_network_fields},
250 {&kCellularPaymentPortalSignature, cellular_payment_portal_fields},
251 {&kCellularProviderSignature, cellular_provider_fields},
252 {&kSIMLockStatusSignature, sim_lock_status_fields},
253 {&kCellularSignature, cellular_fields},
254 {&kCellularWithStateSignature, cellular_fields},
255 {&kNetworkWithStateSignature, network_fields},
256 {&kNetworkConfigurationSignature, network_fields},
257 {&kIPConfigSignature, ipconfig_fields},
258 {&kSavedIPConfigSignature, static_or_saved_ipconfig_fields},
259 {&kStaticIPConfigSignature, static_or_saved_ipconfig_fields},
260 {NULL}};
262 struct NestedShillDictionaryEntry {
263 const OncValueSignature* onc_signature;
264 // NULL terminated list of Shill property keys.
265 const char* const* shill_property_path;
268 const char* cellular_apn_path_entries[] = {shill::kCellularApnProperty, NULL};
270 const char* static_ip_config_path_entries[] = {shill::kStaticIPConfigProperty,
271 NULL};
273 const NestedShillDictionaryEntry nested_shill_dictionaries[] = {
274 {&kCellularApnSignature, cellular_apn_path_entries},
275 {&kStaticIPConfigSignature, static_ip_config_path_entries},
276 {NULL}};
278 } // namespace
280 const StringTranslationEntry kNetworkTypeTable[] = {
281 // This mapping is ensured in the translation code.
282 // { network_type::kEthernet, shill::kTypeEthernet },
283 // { network_type::kEthernet, shill::kTypeEthernetEap },
284 {::onc::network_type::kWiFi, shill::kTypeWifi},
285 {::onc::network_type::kWimax, shill::kTypeWimax},
286 {::onc::network_type::kCellular, shill::kTypeCellular},
287 {::onc::network_type::kVPN, shill::kTypeVPN},
288 {NULL}};
290 const StringTranslationEntry kVPNTypeTable[] = {
291 {::onc::vpn::kTypeL2TP_IPsec, shill::kProviderL2tpIpsec},
292 {::onc::vpn::kOpenVPN, shill::kProviderOpenVpn},
293 {::onc::vpn::kThirdPartyVpn, shill::kProviderThirdPartyVpn},
294 {NULL}};
296 const StringTranslationEntry kWiFiSecurityTable[] = {
297 {::onc::wifi::kSecurityNone, shill::kSecurityNone},
298 {::onc::wifi::kWEP_PSK, shill::kSecurityWep},
299 {::onc::wifi::kWPA_PSK, shill::kSecurityPsk},
300 {::onc::wifi::kWPA_EAP, shill::kSecurity8021x},
301 {NULL}};
303 const StringTranslationEntry kEAPOuterTable[] = {
304 {::onc::eap::kPEAP, shill::kEapMethodPEAP},
305 {::onc::eap::kEAP_TLS, shill::kEapMethodTLS},
306 {::onc::eap::kEAP_TTLS, shill::kEapMethodTTLS},
307 {::onc::eap::kLEAP, shill::kEapMethodLEAP},
308 {NULL}};
310 // Translation of the EAP.Inner field in case of EAP.Outer == PEAP
311 const StringTranslationEntry kEAP_PEAP_InnerTable[] = {
312 {::onc::eap::kMD5, shill::kEapPhase2AuthPEAPMD5},
313 {::onc::eap::kMSCHAPv2, shill::kEapPhase2AuthPEAPMSCHAPV2},
314 {NULL}};
316 // Translation of the EAP.Inner field in case of EAP.Outer == TTLS
317 const StringTranslationEntry kEAP_TTLS_InnerTable[] = {
318 {::onc::eap::kMD5, shill::kEapPhase2AuthTTLSMD5},
319 {::onc::eap::kMSCHAPv2, shill::kEapPhase2AuthTTLSMSCHAPV2},
320 {::onc::eap::kPAP, shill::kEapPhase2AuthTTLSPAP},
321 {NULL}};
323 const StringTranslationEntry kActivationStateTable[] = {
324 {::onc::cellular::kActivated, shill::kActivationStateActivated},
325 {::onc::cellular::kActivating, shill::kActivationStateActivating},
326 {::onc::cellular::kNotActivated, shill::kActivationStateNotActivated},
327 {::onc::cellular::kPartiallyActivated,
328 shill::kActivationStatePartiallyActivated},
329 {NULL}};
331 const StringTranslationEntry kNetworkTechnologyTable[] = {
332 {::onc::cellular::kTechnologyCdma1Xrtt, shill::kNetworkTechnology1Xrtt},
333 {::onc::cellular::kTechnologyGsm, shill::kNetworkTechnologyGsm},
334 {::onc::cellular::kTechnologyEdge, shill::kNetworkTechnologyEdge},
335 {::onc::cellular::kTechnologyEvdo, shill::kNetworkTechnologyEvdo},
336 {::onc::cellular::kTechnologyGprs, shill::kNetworkTechnologyGprs},
337 {::onc::cellular::kTechnologyHspa, shill::kNetworkTechnologyHspa},
338 {::onc::cellular::kTechnologyHspaPlus, shill::kNetworkTechnologyHspaPlus},
339 {::onc::cellular::kTechnologyLte, shill::kNetworkTechnologyLte},
340 {::onc::cellular::kTechnologyLteAdvanced,
341 shill::kNetworkTechnologyLteAdvanced},
342 {::onc::cellular::kTechnologyUmts, shill::kNetworkTechnologyUmts},
343 {NULL}};
345 const StringTranslationEntry kRoamingStateTable[] = {
346 {::onc::cellular::kRoamingHome, shill::kRoamingStateHome},
347 {::onc::cellular::kRoamingRoaming, shill::kRoamingStateRoaming},
348 {NULL}};
350 // This must contain only Shill Device properties and no Service properties.
351 // For Service properties see cellular_fields.
352 const FieldTranslationEntry kCellularDeviceTable[] = {
353 // This field is converted during translation, see onc_translator_*.
354 // { ::onc::cellular::kAPNList, shill::kCellularApnListProperty},
355 {::onc::cellular::kAllowRoaming, shill::kCellularAllowRoamingProperty},
356 {::onc::cellular::kCarrier, shill::kCarrierProperty},
357 {::onc::cellular::kESN, shill::kEsnProperty},
358 {::onc::cellular::kFamily, shill::kTechnologyFamilyProperty},
359 {::onc::cellular::kFirmwareRevision, shill::kFirmwareRevisionProperty},
360 // This field is converted during translation, see onc_translator_*.
361 // { ::onc::cellular::kFoundNetworks, shill::kFoundNetworksProperty},
362 {::onc::cellular::kHardwareRevision, shill::kHardwareRevisionProperty},
363 // This field is converted during translation, see onc_translator_*.
364 // { ::onc::cellular::kHomeProvider, shill::kHomeProviderProperty},
365 {::onc::cellular::kICCID, shill::kIccidProperty},
366 {::onc::cellular::kIMEI, shill::kImeiProperty},
367 {::onc::cellular::kIMSI, shill::kImsiProperty},
368 {::onc::cellular::kManufacturer, shill::kManufacturerProperty},
369 {::onc::cellular::kMDN, shill::kMdnProperty},
370 {::onc::cellular::kMEID, shill::kMeidProperty},
371 {::onc::cellular::kMIN, shill::kMinProperty},
372 {::onc::cellular::kModelID, shill::kModelIDProperty},
373 {::onc::cellular::kPRLVersion, shill::kPRLVersionProperty},
374 // This field is converted during translation, see onc_translator_*.
375 // { ::onc::cellular::kSIMLockStatus, shill::kSIMLockStatusProperty},
376 {::onc::cellular::kSIMPresent, shill::kSIMPresentProperty},
377 {::onc::cellular::kSupportedCarriers, shill::kSupportedCarriersProperty},
378 {::onc::cellular::kSupportNetworkScan, shill::kSupportNetworkScanProperty},
379 {NULL}};
381 const FieldTranslationEntry* GetFieldTranslationTable(
382 const OncValueSignature& onc_signature) {
383 for (const OncValueTranslationEntry* it = onc_value_translation_table;
384 it->onc_signature != NULL; ++it) {
385 if (it->onc_signature == &onc_signature)
386 return it->field_translation_table;
388 return NULL;
391 std::vector<std::string> GetPathToNestedShillDictionary(
392 const OncValueSignature& onc_signature) {
393 std::vector<std::string> shill_property_path;
394 for (const NestedShillDictionaryEntry* it = nested_shill_dictionaries;
395 it->onc_signature != NULL; ++it) {
396 if (it->onc_signature == &onc_signature) {
397 for (const char* const* key = it->shill_property_path; *key != NULL;
398 ++key) {
399 shill_property_path.push_back(std::string(*key));
401 break;
404 return shill_property_path;
407 bool GetShillPropertyName(const std::string& onc_field_name,
408 const FieldTranslationEntry table[],
409 std::string* shill_property_name) {
410 for (const FieldTranslationEntry* it = table; it->onc_field_name != NULL;
411 ++it) {
412 if (it->onc_field_name != onc_field_name)
413 continue;
414 *shill_property_name = it->shill_property_name;
415 return true;
417 return false;
420 bool TranslateStringToShill(const StringTranslationEntry table[],
421 const std::string& onc_value,
422 std::string* shill_value) {
423 for (int i = 0; table[i].onc_value != NULL; ++i) {
424 if (onc_value != table[i].onc_value)
425 continue;
426 *shill_value = table[i].shill_value;
427 return true;
429 LOG(ERROR) << "Value '" << onc_value << "' cannot be translated to Shill";
430 return false;
433 bool TranslateStringToONC(const StringTranslationEntry table[],
434 const std::string& shill_value,
435 std::string* onc_value) {
436 for (int i = 0; table[i].shill_value != NULL; ++i) {
437 if (shill_value != table[i].shill_value)
438 continue;
439 *onc_value = table[i].onc_value;
440 return true;
442 LOG(ERROR) << "Value '" << shill_value << "' cannot be translated to ONC";
443 return false;
446 } // namespace onc
447 } // namespace chromeos