Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(158)

Side by Side Diff: chromeos/network/onc/onc_signature.cc

Issue 1019033002: Add an ONC property for the third-party VPN provider extension ID (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed browser tests. Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 { ::onc::openvpn::kTLSAuthContents, &kStringSignature}, 144 { ::onc::openvpn::kTLSAuthContents, &kStringSignature},
145 { ::onc::openvpn::kTLSRemote, &kStringSignature}, 145 { ::onc::openvpn::kTLSRemote, &kStringSignature},
146 { ::onc::openvpn::kUserAuthenticationType, &kStringSignature}, 146 { ::onc::openvpn::kUserAuthenticationType, &kStringSignature},
147 { ::onc::vpn::kUsername, &kStringSignature}, 147 { ::onc::vpn::kUsername, &kStringSignature},
148 // Not supported, yet. 148 // Not supported, yet.
149 { ::onc::openvpn::kVerb, &kStringSignature}, 149 { ::onc::openvpn::kVerb, &kStringSignature},
150 { ::onc::openvpn::kVerifyHash, &kStringSignature}, 150 { ::onc::openvpn::kVerifyHash, &kStringSignature},
151 { ::onc::openvpn::kVerifyX509, &kVerifyX509Signature}, 151 { ::onc::openvpn::kVerifyX509, &kVerifyX509Signature},
152 {NULL}}; 152 {NULL}};
153 153
154 const OncFieldSignature third_party_vpn_fields[] = {
155 { ::onc::kRecommended, &kRecommendedSignature},
156 { ::onc::third_party_vpn::kExtensionID, &kStringSignature},
157 {NULL}};
158
154 const OncFieldSignature verify_x509_fields[] = { 159 const OncFieldSignature verify_x509_fields[] = {
155 { ::onc::verify_x509::kName, &kStringSignature}, 160 { ::onc::verify_x509::kName, &kStringSignature},
156 { ::onc::verify_x509::kType, &kStringSignature}, 161 { ::onc::verify_x509::kType, &kStringSignature},
157 {NULL}}; 162 {NULL}};
158 163
159 const OncFieldSignature vpn_fields[] = { 164 const OncFieldSignature vpn_fields[] = {
160 { ::onc::kRecommended, &kRecommendedSignature}, 165 { ::onc::kRecommended, &kRecommendedSignature},
161 { ::onc::vpn::kAutoConnect, &kBoolSignature}, 166 { ::onc::vpn::kAutoConnect, &kBoolSignature},
162 { ::onc::vpn::kHost, &kStringSignature}, 167 { ::onc::vpn::kHost, &kStringSignature},
163 { ::onc::vpn::kIPsec, &kIPsecSignature}, 168 { ::onc::vpn::kIPsec, &kIPsecSignature},
164 { ::onc::vpn::kL2TP, &kL2TPSignature}, 169 { ::onc::vpn::kL2TP, &kL2TPSignature},
165 { ::onc::vpn::kOpenVPN, &kOpenVPNSignature}, 170 { ::onc::vpn::kOpenVPN, &kOpenVPNSignature},
171 { ::onc::vpn::kThirdPartyVpn, &kThirdPartyVPNSignature},
166 { ::onc::vpn::kType, &kStringSignature}, 172 { ::onc::vpn::kType, &kStringSignature},
167 {NULL}}; 173 {NULL}};
168 174
169 const OncFieldSignature ethernet_fields[] = { 175 const OncFieldSignature ethernet_fields[] = {
170 { ::onc::kRecommended, &kRecommendedSignature}, 176 { ::onc::kRecommended, &kRecommendedSignature},
171 { ::onc::ethernet::kAuthentication, &kStringSignature}, 177 { ::onc::ethernet::kAuthentication, &kStringSignature},
172 { ::onc::ethernet::kEAP, &kEAPSignature}, 178 { ::onc::ethernet::kEAP, &kEAPSignature},
173 {NULL}}; 179 {NULL}};
174 180
175 const OncFieldSignature ipconfig_fields[] = { 181 const OncFieldSignature ipconfig_fields[] = {
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 }; 384 };
379 const OncValueSignature kXAUTHSignature = { 385 const OncValueSignature kXAUTHSignature = {
380 base::Value::TYPE_DICTIONARY, xauth_fields, NULL 386 base::Value::TYPE_DICTIONARY, xauth_fields, NULL
381 }; 387 };
382 const OncValueSignature kL2TPSignature = { 388 const OncValueSignature kL2TPSignature = {
383 base::Value::TYPE_DICTIONARY, l2tp_fields, NULL 389 base::Value::TYPE_DICTIONARY, l2tp_fields, NULL
384 }; 390 };
385 const OncValueSignature kOpenVPNSignature = { 391 const OncValueSignature kOpenVPNSignature = {
386 base::Value::TYPE_DICTIONARY, openvpn_fields, NULL 392 base::Value::TYPE_DICTIONARY, openvpn_fields, NULL
387 }; 393 };
394 const OncValueSignature kThirdPartyVPNSignature = {
395 base::Value::TYPE_DICTIONARY, third_party_vpn_fields, NULL
396 };
388 const OncValueSignature kVerifyX509Signature = { 397 const OncValueSignature kVerifyX509Signature = {
389 base::Value::TYPE_DICTIONARY, verify_x509_fields, NULL 398 base::Value::TYPE_DICTIONARY, verify_x509_fields, NULL
390 }; 399 };
391 const OncValueSignature kVPNSignature = { 400 const OncValueSignature kVPNSignature = {
392 base::Value::TYPE_DICTIONARY, vpn_fields, NULL 401 base::Value::TYPE_DICTIONARY, vpn_fields, NULL
393 }; 402 };
394 const OncValueSignature kEthernetSignature = { 403 const OncValueSignature kEthernetSignature = {
395 base::Value::TYPE_DICTIONARY, ethernet_fields, NULL 404 base::Value::TYPE_DICTIONARY, ethernet_fields, NULL
396 }; 405 };
397 const OncValueSignature kIPConfigSignature = { 406 const OncValueSignature kIPConfigSignature = {
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 if (&signature == entry->value_signature && 518 if (&signature == entry->value_signature &&
510 onc_field_name == entry->field_name) { 519 onc_field_name == entry->field_name) {
511 return true; 520 return true;
512 } 521 }
513 } 522 }
514 return false; 523 return false;
515 } 524 }
516 525
517 } // namespace onc 526 } // namespace onc
518 } // namespace chromeos 527 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/network/onc/onc_signature.h ('k') | chromeos/network/onc/onc_translator_onc_to_shill.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698