| 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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 {NULL}}; | 171 {NULL}}; |
| 172 | 172 |
| 173 // Not supported for policy but for reading network state. | 173 // Not supported for policy but for reading network state. |
| 174 const OncFieldSignature ipconfig_fields[] = { | 174 const OncFieldSignature ipconfig_fields[] = { |
| 175 { ::onc::ipconfig::kGateway, &kStringSignature}, | 175 { ::onc::ipconfig::kGateway, &kStringSignature}, |
| 176 { ::onc::ipconfig::kIPAddress, &kStringSignature}, | 176 { ::onc::ipconfig::kIPAddress, &kStringSignature}, |
| 177 { ::onc::ipconfig::kNameServers, &kStringListSignature}, | 177 { ::onc::ipconfig::kNameServers, &kStringListSignature}, |
| 178 { ::onc::ipconfig::kRoutingPrefix, &kIntegerSignature}, | 178 { ::onc::ipconfig::kRoutingPrefix, &kIntegerSignature}, |
| 179 { ::onc::network_config::kSearchDomains, &kStringListSignature}, | 179 { ::onc::network_config::kSearchDomains, &kStringListSignature}, |
| 180 { ::onc::ipconfig::kType, &kStringSignature}, | 180 { ::onc::ipconfig::kType, &kStringSignature}, |
| 181 { ::onc::ipconfig::kWebProxyAutoDiscoveryUrl, &kStringSignature}, |
| 181 {NULL}}; | 182 {NULL}}; |
| 182 | 183 |
| 183 const OncFieldSignature proxy_location_fields[] = { | 184 const OncFieldSignature proxy_location_fields[] = { |
| 184 { ::onc::proxy::kHost, &kStringSignature}, | 185 { ::onc::proxy::kHost, &kStringSignature}, |
| 185 { ::onc::proxy::kPort, &kIntegerSignature}, {NULL}}; | 186 { ::onc::proxy::kPort, &kIntegerSignature}, {NULL}}; |
| 186 | 187 |
| 187 const OncFieldSignature proxy_manual_fields[] = { | 188 const OncFieldSignature proxy_manual_fields[] = { |
| 188 { ::onc::proxy::kFtp, &kProxyLocationSignature}, | 189 { ::onc::proxy::kFtp, &kProxyLocationSignature}, |
| 189 { ::onc::proxy::kHttp, &kProxyLocationSignature}, | 190 { ::onc::proxy::kHttp, &kProxyLocationSignature}, |
| 190 { ::onc::proxy::kHttps, &kProxyLocationSignature}, | 191 { ::onc::proxy::kHttps, &kProxyLocationSignature}, |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 { ::onc::cellular::kSIMLockStatus, &kSIMLockStatusSignature}, | 281 { ::onc::cellular::kSIMLockStatus, &kSIMLockStatusSignature}, |
| 281 { ::onc::cellular::kSIMPresent, &kBoolSignature}, | 282 { ::onc::cellular::kSIMPresent, &kBoolSignature}, |
| 282 { ::onc::cellular::kSupportNetworkScan, &kBoolSignature}, | 283 { ::onc::cellular::kSupportNetworkScan, &kBoolSignature}, |
| 283 { ::onc::cellular::kSupportedCarriers, &kStringListSignature}, | 284 { ::onc::cellular::kSupportedCarriers, &kStringListSignature}, |
| 284 {NULL}}; | 285 {NULL}}; |
| 285 | 286 |
| 286 const OncFieldSignature network_configuration_fields[] = { | 287 const OncFieldSignature network_configuration_fields[] = { |
| 287 { ::onc::kRecommended, &kRecommendedSignature}, | 288 { ::onc::kRecommended, &kRecommendedSignature}, |
| 288 { ::onc::network_config::kEthernet, &kEthernetSignature}, | 289 { ::onc::network_config::kEthernet, &kEthernetSignature}, |
| 289 { ::onc::network_config::kGUID, &kStringSignature}, | 290 { ::onc::network_config::kGUID, &kStringSignature}, |
| 290 // Not supported for policy but for reading network state. | 291 |
| 292 // IPConfig fields are not supported for policy (onc -> shill) but are |
| 293 // supported for reading network state (shill -> onc). |
| 291 { ::onc::network_config::kIPConfigs, &kIPConfigListSignature}, | 294 { ::onc::network_config::kIPConfigs, &kIPConfigListSignature}, |
| 295 { ::onc::network_config::kSavedIPConfig, &kIPConfigSignature}, |
| 296 { ::onc::network_config::kStaticIPConfig, &kIPConfigSignature}, |
| 297 |
| 292 { ::onc::network_config::kName, &kStringSignature}, | 298 { ::onc::network_config::kName, &kStringSignature}, |
| 293 // Not supported, yet. | 299 // Not supported, yet. |
| 294 { ::onc::network_config::kNameServers, &kStringListSignature}, | 300 { ::onc::network_config::kNameServers, &kStringListSignature}, |
| 295 { ::onc::network_config::kPriority, &kIntegerSignature}, | 301 { ::onc::network_config::kPriority, &kIntegerSignature}, |
| 296 { ::onc::network_config::kProxySettings, &kProxySettingsSignature}, | 302 { ::onc::network_config::kProxySettings, &kProxySettingsSignature}, |
| 297 { ::onc::kRemove, &kBoolSignature}, | 303 { ::onc::kRemove, &kBoolSignature}, |
| 298 // Not supported, yet. | 304 // Not supported, yet. |
| 299 { ::onc::network_config::kSearchDomains, &kStringListSignature}, | 305 { ::onc::network_config::kSearchDomains, &kStringListSignature}, |
| 300 { ::onc::network_config::kType, &kStringSignature}, | 306 { ::onc::network_config::kType, &kStringSignature}, |
| 301 { ::onc::network_config::kVPN, &kVPNSignature}, | 307 { ::onc::network_config::kVPN, &kVPNSignature}, |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 481 if (&signature == entry->value_signature && | 487 if (&signature == entry->value_signature && |
| 482 onc_field_name == entry->field_name) { | 488 onc_field_name == entry->field_name) { |
| 483 return true; | 489 return true; |
| 484 } | 490 } |
| 485 } | 491 } |
| 486 return false; | 492 return false; |
| 487 } | 493 } |
| 488 | 494 |
| 489 } // namespace onc | 495 } // namespace onc |
| 490 } // namespace chromeos | 496 } // namespace chromeos |
| OLD | NEW |