Chromium Code Reviews| 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_signature.h" | 5 #include "chromeos/network/onc/onc_signature.h" |
| 6 | 6 |
| 7 #include "components/onc/onc_constants.h" | 7 #include "components/onc/onc_constants.h" |
| 8 #include "third_party/cros_system_api/dbus/service_constants.h" | 8 #include "third_party/cros_system_api/dbus/service_constants.h" |
| 9 | 9 |
| 10 using base::Value; | 10 using base::Value; |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 119 { ::onc::openvpn::kServerCertPEM, &kStringSignature}, | 119 { ::onc::openvpn::kServerCertPEM, &kStringSignature}, |
| 120 { ::onc::openvpn::kServerCertRef, &kStringSignature}, | 120 { ::onc::openvpn::kServerCertRef, &kStringSignature}, |
| 121 { ::onc::openvpn::kServerPollTimeout, &kIntegerSignature}, | 121 { ::onc::openvpn::kServerPollTimeout, &kIntegerSignature}, |
| 122 { ::onc::openvpn::kShaper, &kIntegerSignature}, | 122 { ::onc::openvpn::kShaper, &kIntegerSignature}, |
| 123 { ::onc::openvpn::kStaticChallenge, &kStringSignature}, | 123 { ::onc::openvpn::kStaticChallenge, &kStringSignature}, |
| 124 { ::onc::openvpn::kTLSAuthContents, &kStringSignature}, | 124 { ::onc::openvpn::kTLSAuthContents, &kStringSignature}, |
| 125 { ::onc::openvpn::kTLSRemote, &kStringSignature}, | 125 { ::onc::openvpn::kTLSRemote, &kStringSignature}, |
| 126 { ::onc::vpn::kUsername, &kStringSignature}, | 126 { ::onc::vpn::kUsername, &kStringSignature}, |
| 127 // Not supported, yet. | 127 // Not supported, yet. |
| 128 { ::onc::openvpn::kVerb, &kStringSignature}, | 128 { ::onc::openvpn::kVerb, &kStringSignature}, |
| 129 { ::onc::openvpn::kVerifyHash, &kStringSignature}, | |
| 130 { ::onc::openvpn::kVerifyX509, &kVerifyX509Signature}, | |
| 129 {NULL}}; | 131 {NULL}}; |
| 130 | 132 |
| 133 const OncFieldSignature verify_x509_fields[] = { | |
| 134 { ::onc::verify_x509::kName, &kStringSignature}, | |
| 135 { ::onc::verify_x509::kType, &kStringSignature}, {NULL}}; | |
|
bartfab (slow)
2013/11/07 10:48:56
Nit: Add line break before {NULL}
pneubeck (no reviews)
2013/11/11 11:53:43
Done.
| |
| 136 | |
| 131 const OncFieldSignature vpn_fields[] = { | 137 const OncFieldSignature vpn_fields[] = { |
| 132 { ::onc::kRecommended, &kRecommendedSignature}, | 138 { ::onc::kRecommended, &kRecommendedSignature}, |
| 133 { ::onc::vpn::kAutoConnect, &kBoolSignature}, | 139 { ::onc::vpn::kAutoConnect, &kBoolSignature}, |
| 134 { ::onc::vpn::kHost, &kStringSignature}, | 140 { ::onc::vpn::kHost, &kStringSignature}, |
| 135 { ::onc::vpn::kIPsec, &kIPsecSignature}, | 141 { ::onc::vpn::kIPsec, &kIPsecSignature}, |
| 136 { ::onc::vpn::kL2TP, &kL2TPSignature}, | 142 { ::onc::vpn::kL2TP, &kL2TPSignature}, |
| 137 { ::onc::vpn::kOpenVPN, &kOpenVPNSignature}, | 143 { ::onc::vpn::kOpenVPN, &kOpenVPNSignature}, |
| 138 { ::onc::vpn::kType, &kStringSignature}, | 144 { ::onc::vpn::kType, &kStringSignature}, |
| 139 {NULL}}; | 145 {NULL}}; |
| 140 | 146 |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 309 }; | 315 }; |
| 310 const OncValueSignature kIPsecSignature = { | 316 const OncValueSignature kIPsecSignature = { |
| 311 Value::TYPE_DICTIONARY, ipsec_fields, NULL | 317 Value::TYPE_DICTIONARY, ipsec_fields, NULL |
| 312 }; | 318 }; |
| 313 const OncValueSignature kL2TPSignature = { | 319 const OncValueSignature kL2TPSignature = { |
| 314 Value::TYPE_DICTIONARY, l2tp_fields, NULL | 320 Value::TYPE_DICTIONARY, l2tp_fields, NULL |
| 315 }; | 321 }; |
| 316 const OncValueSignature kOpenVPNSignature = { | 322 const OncValueSignature kOpenVPNSignature = { |
| 317 Value::TYPE_DICTIONARY, openvpn_fields, NULL | 323 Value::TYPE_DICTIONARY, openvpn_fields, NULL |
| 318 }; | 324 }; |
| 325 const OncValueSignature kVerifyX509Signature = { | |
| 326 Value::TYPE_DICTIONARY, verify_x509_fields, NULL | |
| 327 }; | |
| 319 const OncValueSignature kVPNSignature = { | 328 const OncValueSignature kVPNSignature = { |
| 320 Value::TYPE_DICTIONARY, vpn_fields, NULL | 329 Value::TYPE_DICTIONARY, vpn_fields, NULL |
| 321 }; | 330 }; |
| 322 const OncValueSignature kEthernetSignature = { | 331 const OncValueSignature kEthernetSignature = { |
| 323 Value::TYPE_DICTIONARY, ethernet_fields, NULL | 332 Value::TYPE_DICTIONARY, ethernet_fields, NULL |
| 324 }; | 333 }; |
| 325 const OncValueSignature kIPConfigSignature = { | 334 const OncValueSignature kIPConfigSignature = { |
| 326 Value::TYPE_DICTIONARY, ipconfig_fields, NULL | 335 Value::TYPE_DICTIONARY, ipconfig_fields, NULL |
| 327 }; | 336 }; |
| 328 const OncValueSignature kProxyLocationSignature = { | 337 const OncValueSignature kProxyLocationSignature = { |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 417 if (&signature == entry->value_signature && | 426 if (&signature == entry->value_signature && |
| 418 onc_field_name == entry->field_name) { | 427 onc_field_name == entry->field_name) { |
| 419 return true; | 428 return true; |
| 420 } | 429 } |
| 421 } | 430 } |
| 422 return false; | 431 return false; |
| 423 } | 432 } |
| 424 | 433 |
| 425 } // namespace onc | 434 } // namespace onc |
| 426 } // namespace chromeos | 435 } // namespace chromeos |
| OLD | NEW |