| 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 {::onc::vpn::kThirdPartyVpn, &kThirdPartyVPNSignature}, | 159 {::onc::vpn::kThirdPartyVpn, &kThirdPartyVPNSignature}, |
| 160 {::onc::vpn::kType, &kStringSignature}, | 160 {::onc::vpn::kType, &kStringSignature}, |
| 161 {NULL}}; | 161 {NULL}}; |
| 162 | 162 |
| 163 const OncFieldSignature ethernet_fields[] = { | 163 const OncFieldSignature ethernet_fields[] = { |
| 164 {::onc::kRecommended, &kRecommendedSignature}, | 164 {::onc::kRecommended, &kRecommendedSignature}, |
| 165 {::onc::ethernet::kAuthentication, &kStringSignature}, | 165 {::onc::ethernet::kAuthentication, &kStringSignature}, |
| 166 {::onc::ethernet::kEAP, &kEAPSignature}, | 166 {::onc::ethernet::kEAP, &kEAPSignature}, |
| 167 {NULL}}; | 167 {NULL}}; |
| 168 | 168 |
| 169 const OncFieldSignature tether_fields[] = { |
| 170 {::onc::tether::kBatteryPercentage, &kIntegerSignature}, |
| 171 {::onc::tether::kCarrier, &kStringSignature}, |
| 172 {::onc::tether::kSignalStrength, &kIntegerSignature}, |
| 173 {NULL}}; |
| 174 |
| 169 const OncFieldSignature ipconfig_fields[] = { | 175 const OncFieldSignature ipconfig_fields[] = { |
| 170 {::onc::ipconfig::kGateway, &kStringSignature}, | 176 {::onc::ipconfig::kGateway, &kStringSignature}, |
| 171 {::onc::ipconfig::kIPAddress, &kStringSignature}, | 177 {::onc::ipconfig::kIPAddress, &kStringSignature}, |
| 172 {::onc::ipconfig::kNameServers, &kStringListSignature}, | 178 {::onc::ipconfig::kNameServers, &kStringListSignature}, |
| 173 {::onc::ipconfig::kRoutingPrefix, &kIntegerSignature}, | 179 {::onc::ipconfig::kRoutingPrefix, &kIntegerSignature}, |
| 174 {::onc::ipconfig::kSearchDomains, &kStringListSignature}, | 180 {::onc::ipconfig::kSearchDomains, &kStringListSignature}, |
| 175 {::onc::ipconfig::kType, &kStringSignature}, | 181 {::onc::ipconfig::kType, &kStringSignature}, |
| 176 {::onc::ipconfig::kWebProxyAutoDiscoveryUrl, &kStringSignature}, | 182 {::onc::ipconfig::kWebProxyAutoDiscoveryUrl, &kStringSignature}, |
| 177 {NULL}}; | 183 {NULL}}; |
| 178 | 184 |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 const OncFieldSignature network_with_state_fields[] = { | 327 const OncFieldSignature network_with_state_fields[] = { |
| 322 {::onc::network_config::kCellular, &kCellularWithStateSignature}, | 328 {::onc::network_config::kCellular, &kCellularWithStateSignature}, |
| 323 {::onc::network_config::kConnectionState, &kStringSignature}, | 329 {::onc::network_config::kConnectionState, &kStringSignature}, |
| 324 {::onc::network_config::kConnectable, &kBoolSignature}, | 330 {::onc::network_config::kConnectable, &kBoolSignature}, |
| 325 {::onc::network_config::kErrorState, &kStringSignature}, | 331 {::onc::network_config::kErrorState, &kStringSignature}, |
| 326 {::onc::network_config::kIPConfigs, &kIPConfigListSignature}, | 332 {::onc::network_config::kIPConfigs, &kIPConfigListSignature}, |
| 327 {::onc::network_config::kMacAddress, &kStringSignature}, | 333 {::onc::network_config::kMacAddress, &kStringSignature}, |
| 328 {::onc::network_config::kRestrictedConnectivity, &kBoolSignature}, | 334 {::onc::network_config::kRestrictedConnectivity, &kBoolSignature}, |
| 329 {::onc::network_config::kSavedIPConfig, &kSavedIPConfigSignature}, | 335 {::onc::network_config::kSavedIPConfig, &kSavedIPConfigSignature}, |
| 330 {::onc::network_config::kSource, &kStringSignature}, | 336 {::onc::network_config::kSource, &kStringSignature}, |
| 337 {::onc::network_config::kTether, &kTetherSignature}, |
| 331 {::onc::network_config::kWiFi, &kWiFiWithStateSignature}, | 338 {::onc::network_config::kWiFi, &kWiFiWithStateSignature}, |
| 332 {::onc::network_config::kWimax, &kWiMAXWithStateSignature}, | 339 {::onc::network_config::kWimax, &kWiMAXWithStateSignature}, |
| 333 {NULL}}; | 340 {NULL}}; |
| 334 | 341 |
| 335 const OncFieldSignature global_network_configuration_fields[] = { | 342 const OncFieldSignature global_network_configuration_fields[] = { |
| 336 {::onc::global_network_config::kAllowOnlyPolicyNetworksToAutoconnect, | 343 {::onc::global_network_config::kAllowOnlyPolicyNetworksToAutoconnect, |
| 337 &kBoolSignature}, | 344 &kBoolSignature}, |
| 338 {::onc::global_network_config::kAllowOnlyPolicyNetworksToConnect, | 345 {::onc::global_network_config::kAllowOnlyPolicyNetworksToConnect, |
| 339 &kBoolSignature}, | 346 &kBoolSignature}, |
| 340 {::onc::global_network_config::kDisableNetworkTypes, &kStringListSignature}, | 347 {::onc::global_network_config::kDisableNetworkTypes, &kStringListSignature}, |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 385 const OncValueSignature kOpenVPNSignature = {base::Value::Type::DICTIONARY, | 392 const OncValueSignature kOpenVPNSignature = {base::Value::Type::DICTIONARY, |
| 386 openvpn_fields, NULL}; | 393 openvpn_fields, NULL}; |
| 387 const OncValueSignature kThirdPartyVPNSignature = { | 394 const OncValueSignature kThirdPartyVPNSignature = { |
| 388 base::Value::Type::DICTIONARY, third_party_vpn_fields, NULL}; | 395 base::Value::Type::DICTIONARY, third_party_vpn_fields, NULL}; |
| 389 const OncValueSignature kVerifyX509Signature = {base::Value::Type::DICTIONARY, | 396 const OncValueSignature kVerifyX509Signature = {base::Value::Type::DICTIONARY, |
| 390 verify_x509_fields, NULL}; | 397 verify_x509_fields, NULL}; |
| 391 const OncValueSignature kVPNSignature = {base::Value::Type::DICTIONARY, | 398 const OncValueSignature kVPNSignature = {base::Value::Type::DICTIONARY, |
| 392 vpn_fields, NULL}; | 399 vpn_fields, NULL}; |
| 393 const OncValueSignature kEthernetSignature = {base::Value::Type::DICTIONARY, | 400 const OncValueSignature kEthernetSignature = {base::Value::Type::DICTIONARY, |
| 394 ethernet_fields, NULL}; | 401 ethernet_fields, NULL}; |
| 402 const OncValueSignature kTetherSignature = {base::Value::Type::DICTIONARY, |
| 403 tether_fields, NULL}; |
| 395 const OncValueSignature kIPConfigSignature = {base::Value::Type::DICTIONARY, | 404 const OncValueSignature kIPConfigSignature = {base::Value::Type::DICTIONARY, |
| 396 ipconfig_fields, NULL}; | 405 ipconfig_fields, NULL}; |
| 397 const OncValueSignature kSavedIPConfigSignature = { | 406 const OncValueSignature kSavedIPConfigSignature = { |
| 398 base::Value::Type::DICTIONARY, ipconfig_fields, NULL}; | 407 base::Value::Type::DICTIONARY, ipconfig_fields, NULL}; |
| 399 const OncValueSignature kStaticIPConfigSignature = { | 408 const OncValueSignature kStaticIPConfigSignature = { |
| 400 base::Value::Type::DICTIONARY, ipconfig_fields, NULL}; | 409 base::Value::Type::DICTIONARY, ipconfig_fields, NULL}; |
| 401 const OncValueSignature kProxyLocationSignature = { | 410 const OncValueSignature kProxyLocationSignature = { |
| 402 base::Value::Type::DICTIONARY, proxy_location_fields, NULL}; | 411 base::Value::Type::DICTIONARY, proxy_location_fields, NULL}; |
| 403 const OncValueSignature kProxyManualSignature = {base::Value::Type::DICTIONARY, | 412 const OncValueSignature kProxyManualSignature = {base::Value::Type::DICTIONARY, |
| 404 proxy_manual_fields, NULL}; | 413 proxy_manual_fields, NULL}; |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 488 if (&signature == entry->value_signature && | 497 if (&signature == entry->value_signature && |
| 489 onc_field_name == entry->field_name) { | 498 onc_field_name == entry->field_name) { |
| 490 return true; | 499 return true; |
| 491 } | 500 } |
| 492 } | 501 } |
| 493 return false; | 502 return false; |
| 494 } | 503 } |
| 495 | 504 |
| 496 } // namespace onc | 505 } // namespace onc |
| 497 } // namespace chromeos | 506 } // namespace chromeos |
| OLD | NEW |