| 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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 { ::onc::kRecommended, &kRecommendedSignature}, | 170 { ::onc::kRecommended, &kRecommendedSignature}, |
| 171 { ::onc::ethernet::kAuthentication, &kStringSignature}, | 171 { ::onc::ethernet::kAuthentication, &kStringSignature}, |
| 172 { ::onc::ethernet::kEAP, &kEAPSignature}, | 172 { ::onc::ethernet::kEAP, &kEAPSignature}, |
| 173 {NULL}}; | 173 {NULL}}; |
| 174 | 174 |
| 175 const OncFieldSignature ipconfig_fields[] = { | 175 const OncFieldSignature ipconfig_fields[] = { |
| 176 { ::onc::ipconfig::kGateway, &kStringSignature}, | 176 { ::onc::ipconfig::kGateway, &kStringSignature}, |
| 177 { ::onc::ipconfig::kIPAddress, &kStringSignature}, | 177 { ::onc::ipconfig::kIPAddress, &kStringSignature}, |
| 178 { ::onc::ipconfig::kNameServers, &kStringListSignature}, | 178 { ::onc::ipconfig::kNameServers, &kStringListSignature}, |
| 179 { ::onc::ipconfig::kRoutingPrefix, &kIntegerSignature}, | 179 { ::onc::ipconfig::kRoutingPrefix, &kIntegerSignature}, |
| 180 { ::onc::network_config::kSearchDomains, &kStringListSignature}, | 180 { ::onc::ipconfig::kSearchDomains, &kStringListSignature}, |
| 181 { ::onc::ipconfig::kType, &kStringSignature}, | 181 { ::onc::ipconfig::kType, &kStringSignature}, |
| 182 { ::onc::ipconfig::kWebProxyAutoDiscoveryUrl, &kStringSignature}, | 182 { ::onc::ipconfig::kWebProxyAutoDiscoveryUrl, &kStringSignature}, |
| 183 {NULL}}; | 183 {NULL}}; |
| 184 | 184 |
| 185 const OncFieldSignature proxy_location_fields[] = { | 185 const OncFieldSignature proxy_location_fields[] = { |
| 186 { ::onc::proxy::kHost, &kStringSignature}, | 186 { ::onc::proxy::kHost, &kStringSignature}, |
| 187 { ::onc::proxy::kPort, &kIntegerSignature}, {NULL}}; | 187 { ::onc::proxy::kPort, &kIntegerSignature}, {NULL}}; |
| 188 | 188 |
| 189 const OncFieldSignature proxy_manual_fields[] = { | 189 const OncFieldSignature proxy_manual_fields[] = { |
| 190 { ::onc::proxy::kFtp, &kProxyLocationSignature}, | 190 { ::onc::proxy::kFtp, &kProxyLocationSignature}, |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 { ::onc::cellular::kSIMLockStatus, &kSIMLockStatusSignature}, | 294 { ::onc::cellular::kSIMLockStatus, &kSIMLockStatusSignature}, |
| 295 { ::onc::cellular::kSIMPresent, &kBoolSignature}, | 295 { ::onc::cellular::kSIMPresent, &kBoolSignature}, |
| 296 { ::onc::cellular::kSupportNetworkScan, &kBoolSignature}, | 296 { ::onc::cellular::kSupportNetworkScan, &kBoolSignature}, |
| 297 { ::onc::cellular::kSupportedCarriers, &kStringListSignature}, | 297 { ::onc::cellular::kSupportedCarriers, &kStringListSignature}, |
| 298 {NULL}}; | 298 {NULL}}; |
| 299 | 299 |
| 300 const OncFieldSignature network_configuration_fields[] = { | 300 const OncFieldSignature network_configuration_fields[] = { |
| 301 { ::onc::network_config::kCellular, &kCellularSignature}, | 301 { ::onc::network_config::kCellular, &kCellularSignature}, |
| 302 { ::onc::network_config::kEthernet, &kEthernetSignature}, | 302 { ::onc::network_config::kEthernet, &kEthernetSignature}, |
| 303 { ::onc::network_config::kGUID, &kStringSignature}, | 303 { ::onc::network_config::kGUID, &kStringSignature}, |
| 304 | |
| 305 { ::onc::network_config::kName, &kStringSignature}, | 304 { ::onc::network_config::kName, &kStringSignature}, |
| 306 | |
| 307 // Not supported, yet. | |
| 308 { ::onc::network_config::kNameServers, &kStringListSignature}, | |
| 309 | |
| 310 { ::onc::network_config::kPriority, &kIntegerSignature}, | 305 { ::onc::network_config::kPriority, &kIntegerSignature}, |
| 311 { ::onc::network_config::kProxySettings, &kProxySettingsSignature}, | 306 { ::onc::network_config::kProxySettings, &kProxySettingsSignature}, |
| 312 { ::onc::kRecommended, &kRecommendedSignature}, | 307 { ::onc::kRecommended, &kRecommendedSignature}, |
| 313 { ::onc::kRemove, &kBoolSignature}, | 308 { ::onc::kRemove, &kBoolSignature}, |
| 314 | |
| 315 // Not supported, yet. | |
| 316 { ::onc::network_config::kSearchDomains, &kStringListSignature}, | |
| 317 | |
| 318 { ::onc::network_config::kStaticIPConfig, &kStaticIPConfigSignature}, | 309 { ::onc::network_config::kStaticIPConfig, &kStaticIPConfigSignature}, |
| 319 { ::onc::network_config::kType, &kStringSignature}, | 310 { ::onc::network_config::kType, &kStringSignature}, |
| 320 { ::onc::network_config::kVPN, &kVPNSignature}, | 311 { ::onc::network_config::kVPN, &kVPNSignature}, |
| 321 { ::onc::network_config::kWiFi, &kWiFiSignature}, | 312 { ::onc::network_config::kWiFi, &kWiFiSignature}, |
| 322 { ::onc::network_config::kWimax, &kWiMAXSignature}, | 313 { ::onc::network_config::kWimax, &kWiMAXSignature}, |
| 323 {NULL}}; | 314 {NULL}}; |
| 324 | 315 |
| 325 const OncFieldSignature network_with_state_fields[] = { | 316 const OncFieldSignature network_with_state_fields[] = { |
| 326 { ::onc::network_config::kCellular, &kCellularWithStateSignature}, | 317 { ::onc::network_config::kCellular, &kCellularWithStateSignature}, |
| 327 { ::onc::network_config::kConnectionState, &kStringSignature}, | 318 { ::onc::network_config::kConnectionState, &kStringSignature}, |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 516 if (&signature == entry->value_signature && | 507 if (&signature == entry->value_signature && |
| 517 onc_field_name == entry->field_name) { | 508 onc_field_name == entry->field_name) { |
| 518 return true; | 509 return true; |
| 519 } | 510 } |
| 520 } | 511 } |
| 521 return false; | 512 return false; |
| 522 } | 513 } |
| 523 | 514 |
| 524 } // namespace onc | 515 } // namespace onc |
| 525 } // namespace chromeos | 516 } // namespace chromeos |
| OLD | NEW |