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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 // { ::onc::vpn::kSaveCredentials, &kBoolSignature }, | 60 // { ::onc::vpn::kSaveCredentials, &kBoolSignature }, |
61 { ::onc::vpn::kUsername, shill::kL2tpIpsecUserProperty}, {NULL}}; | 61 { ::onc::vpn::kUsername, shill::kL2tpIpsecUserProperty}, {NULL}}; |
62 | 62 |
63 const FieldTranslationEntry openvpn_fields[] = { | 63 const FieldTranslationEntry openvpn_fields[] = { |
64 { ::onc::openvpn::kAuth, shill::kOpenVPNAuthProperty}, | 64 { ::onc::openvpn::kAuth, shill::kOpenVPNAuthProperty}, |
65 { ::onc::openvpn::kAuthNoCache, shill::kOpenVPNAuthNoCacheProperty}, | 65 { ::onc::openvpn::kAuthNoCache, shill::kOpenVPNAuthNoCacheProperty}, |
66 { ::onc::openvpn::kAuthRetry, shill::kOpenVPNAuthRetryProperty}, | 66 { ::onc::openvpn::kAuthRetry, shill::kOpenVPNAuthRetryProperty}, |
67 { ::onc::openvpn::kCipher, shill::kOpenVPNCipherProperty}, | 67 { ::onc::openvpn::kCipher, shill::kOpenVPNCipherProperty}, |
68 { ::onc::openvpn::kCompLZO, shill::kOpenVPNCompLZOProperty}, | 68 { ::onc::openvpn::kCompLZO, shill::kOpenVPNCompLZOProperty}, |
69 { ::onc::openvpn::kCompNoAdapt, shill::kOpenVPNCompNoAdaptProperty}, | 69 { ::onc::openvpn::kCompNoAdapt, shill::kOpenVPNCompNoAdaptProperty}, |
| 70 { ::onc::openvpn::kIgnoreDefaultRoute, |
| 71 shill::kOpenVPNIgnoreDefaultRouteProperty}, |
70 { ::onc::openvpn::kKeyDirection, shill::kOpenVPNKeyDirectionProperty}, | 72 { ::onc::openvpn::kKeyDirection, shill::kOpenVPNKeyDirectionProperty}, |
71 { ::onc::openvpn::kNsCertType, shill::kOpenVPNNsCertTypeProperty}, | 73 { ::onc::openvpn::kNsCertType, shill::kOpenVPNNsCertTypeProperty}, |
72 { ::onc::vpn::kPassword, shill::kOpenVPNPasswordProperty}, | 74 { ::onc::vpn::kPassword, shill::kOpenVPNPasswordProperty}, |
73 { ::onc::openvpn::kPort, shill::kOpenVPNPortProperty}, | 75 { ::onc::openvpn::kPort, shill::kOpenVPNPortProperty}, |
74 { ::onc::openvpn::kProto, shill::kOpenVPNProtoProperty}, | 76 { ::onc::openvpn::kProto, shill::kOpenVPNProtoProperty}, |
75 { ::onc::openvpn::kPushPeerInfo, shill::kOpenVPNPushPeerInfoProperty}, | 77 { ::onc::openvpn::kPushPeerInfo, shill::kOpenVPNPushPeerInfoProperty}, |
76 { ::onc::openvpn::kRemoteCertEKU, shill::kOpenVPNRemoteCertEKUProperty}, | 78 { ::onc::openvpn::kRemoteCertEKU, shill::kOpenVPNRemoteCertEKUProperty}, |
77 // This field is converted during translation, see onc_translator_*. | 79 // This field is converted during translation, see onc_translator_*. |
78 // { ::onc::openvpn::kRemoteCertKU, shill::kOpenVPNRemoteCertKUProperty }, | 80 // { ::onc::openvpn::kRemoteCertKU, shill::kOpenVPNRemoteCertKUProperty }, |
79 { ::onc::openvpn::kRemoteCertTLS, shill::kOpenVPNRemoteCertTLSProperty}, | 81 { ::onc::openvpn::kRemoteCertTLS, shill::kOpenVPNRemoteCertTLSProperty}, |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
331 continue; | 333 continue; |
332 *onc_value = table[i].onc_value; | 334 *onc_value = table[i].onc_value; |
333 return true; | 335 return true; |
334 } | 336 } |
335 LOG(ERROR) << "Value '" << shill_value << "' cannot be translated to ONC"; | 337 LOG(ERROR) << "Value '" << shill_value << "' cannot be translated to ONC"; |
336 return false; | 338 return false; |
337 } | 339 } |
338 | 340 |
339 } // namespace onc | 341 } // namespace onc |
340 } // namespace chromeos | 342 } // namespace chromeos |
OLD | NEW |