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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 { ::onc::vpn::kOpenVPN, &kOpenVPNSignature}, | 163 { ::onc::vpn::kOpenVPN, &kOpenVPNSignature}, |
164 { ::onc::vpn::kType, &kStringSignature}, | 164 { ::onc::vpn::kType, &kStringSignature}, |
165 {NULL}}; | 165 {NULL}}; |
166 | 166 |
167 const OncFieldSignature ethernet_fields[] = { | 167 const OncFieldSignature ethernet_fields[] = { |
168 { ::onc::kRecommended, &kRecommendedSignature}, | 168 { ::onc::kRecommended, &kRecommendedSignature}, |
169 { ::onc::ethernet::kAuthentication, &kStringSignature}, | 169 { ::onc::ethernet::kAuthentication, &kStringSignature}, |
170 { ::onc::ethernet::kEAP, &kEAPSignature}, | 170 { ::onc::ethernet::kEAP, &kEAPSignature}, |
171 {NULL}}; | 171 {NULL}}; |
172 | 172 |
173 // Not supported for policy but for reading network state. | |
174 const OncFieldSignature ipconfig_fields[] = { | 173 const OncFieldSignature ipconfig_fields[] = { |
175 { ::onc::ipconfig::kGateway, &kStringSignature}, | 174 { ::onc::ipconfig::kGateway, &kStringSignature}, |
176 { ::onc::ipconfig::kIPAddress, &kStringSignature}, | 175 { ::onc::ipconfig::kIPAddress, &kStringSignature}, |
177 { ::onc::ipconfig::kNameServers, &kStringListSignature}, | 176 { ::onc::ipconfig::kNameServers, &kStringListSignature}, |
178 { ::onc::ipconfig::kRoutingPrefix, &kIntegerSignature}, | 177 { ::onc::ipconfig::kRoutingPrefix, &kIntegerSignature}, |
179 { ::onc::network_config::kSearchDomains, &kStringListSignature}, | 178 { ::onc::network_config::kSearchDomains, &kStringListSignature}, |
180 { ::onc::ipconfig::kType, &kStringSignature}, | 179 { ::onc::ipconfig::kType, &kStringSignature}, |
181 { ::onc::ipconfig::kWebProxyAutoDiscoveryUrl, &kStringSignature}, | 180 { ::onc::ipconfig::kWebProxyAutoDiscoveryUrl, &kStringSignature}, |
182 {NULL}}; | 181 {NULL}}; |
183 | 182 |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 { ::onc::cellular::kSIMPresent, &kBoolSignature}, | 281 { ::onc::cellular::kSIMPresent, &kBoolSignature}, |
283 { ::onc::cellular::kSupportNetworkScan, &kBoolSignature}, | 282 { ::onc::cellular::kSupportNetworkScan, &kBoolSignature}, |
284 { ::onc::cellular::kSupportedCarriers, &kStringListSignature}, | 283 { ::onc::cellular::kSupportedCarriers, &kStringListSignature}, |
285 {NULL}}; | 284 {NULL}}; |
286 | 285 |
287 const OncFieldSignature network_configuration_fields[] = { | 286 const OncFieldSignature network_configuration_fields[] = { |
288 { ::onc::network_config::kCellular, &kCellularSignature}, | 287 { ::onc::network_config::kCellular, &kCellularSignature}, |
289 { ::onc::network_config::kEthernet, &kEthernetSignature}, | 288 { ::onc::network_config::kEthernet, &kEthernetSignature}, |
290 { ::onc::network_config::kGUID, &kStringSignature}, | 289 { ::onc::network_config::kGUID, &kStringSignature}, |
291 | 290 |
292 // Not supported for policy but for reading network state. | |
293 // TODO(pneubeck@): Resolve IPConfigs vs. StaticIPConfig, crbug.com/410877 | |
294 { ::onc::network_config::kIPConfigs, &kIPConfigListSignature}, | |
295 | |
296 { ::onc::network_config::kName, &kStringSignature}, | 291 { ::onc::network_config::kName, &kStringSignature}, |
297 | 292 |
298 // Not supported, yet. | 293 // Not supported, yet. |
299 { ::onc::network_config::kNameServers, &kStringListSignature}, | 294 { ::onc::network_config::kNameServers, &kStringListSignature}, |
300 | 295 |
301 { ::onc::network_config::kPriority, &kIntegerSignature}, | 296 { ::onc::network_config::kPriority, &kIntegerSignature}, |
302 { ::onc::network_config::kProxySettings, &kProxySettingsSignature}, | 297 { ::onc::network_config::kProxySettings, &kProxySettingsSignature}, |
303 { ::onc::kRecommended, &kRecommendedSignature}, | 298 { ::onc::kRecommended, &kRecommendedSignature}, |
304 { ::onc::kRemove, &kBoolSignature}, | 299 { ::onc::kRemove, &kBoolSignature}, |
305 | 300 |
306 // Not supported, yet. | 301 // Not supported, yet. |
307 { ::onc::network_config::kSearchDomains, &kStringListSignature}, | 302 { ::onc::network_config::kSearchDomains, &kStringListSignature}, |
308 | 303 |
309 { ::onc::network_config::kSavedIPConfig, &kSavedIPConfigSignature}, | |
310 { ::onc::network_config::kStaticIPConfig, &kStaticIPConfigSignature}, | 304 { ::onc::network_config::kStaticIPConfig, &kStaticIPConfigSignature}, |
311 { ::onc::network_config::kType, &kStringSignature}, | 305 { ::onc::network_config::kType, &kStringSignature}, |
312 { ::onc::network_config::kVPN, &kVPNSignature}, | 306 { ::onc::network_config::kVPN, &kVPNSignature}, |
313 { ::onc::network_config::kWiFi, &kWiFiSignature}, | 307 { ::onc::network_config::kWiFi, &kWiFiSignature}, |
314 {NULL}}; | 308 {NULL}}; |
315 | 309 |
316 const OncFieldSignature network_with_state_fields[] = { | 310 const OncFieldSignature network_with_state_fields[] = { |
317 { ::onc::network_config::kCellular, &kCellularWithStateSignature}, | 311 { ::onc::network_config::kCellular, &kCellularWithStateSignature}, |
318 { ::onc::network_config::kConnectionState, &kStringSignature}, | 312 { ::onc::network_config::kConnectionState, &kStringSignature}, |
319 { ::onc::network_config::kConnectable, &kBoolSignature}, | 313 { ::onc::network_config::kConnectable, &kBoolSignature}, |
320 { ::onc::network_config::kErrorState, &kStringSignature}, | 314 { ::onc::network_config::kErrorState, &kStringSignature}, |
| 315 { ::onc::network_config::kIPConfigs, &kIPConfigListSignature}, |
321 { ::onc::network_config::kMacAddress, &kStringSignature}, | 316 { ::onc::network_config::kMacAddress, &kStringSignature}, |
322 { ::onc::network_config::kRestrictedConnectivity, &kBoolSignature}, | 317 { ::onc::network_config::kRestrictedConnectivity, &kBoolSignature}, |
| 318 { ::onc::network_config::kSavedIPConfig, &kSavedIPConfigSignature}, |
323 { ::onc::network_config::kWiFi, &kWiFiWithStateSignature}, | 319 { ::onc::network_config::kWiFi, &kWiFiWithStateSignature}, |
324 {NULL}}; | 320 {NULL}}; |
325 | 321 |
326 const OncFieldSignature global_network_configuration_fields[] = { | 322 const OncFieldSignature global_network_configuration_fields[] = { |
327 { ::onc::global_network_config::kAllowOnlyPolicyNetworksToAutoconnect, | 323 { ::onc::global_network_config::kAllowOnlyPolicyNetworksToAutoconnect, |
328 &kBoolSignature}, | 324 &kBoolSignature}, |
329 {NULL}}; | 325 {NULL}}; |
330 | 326 |
331 const OncFieldSignature certificate_fields[] = { | 327 const OncFieldSignature certificate_fields[] = { |
332 { ::onc::certificate::kGUID, &kStringSignature}, | 328 { ::onc::certificate::kGUID, &kStringSignature}, |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
497 if (&signature == entry->value_signature && | 493 if (&signature == entry->value_signature && |
498 onc_field_name == entry->field_name) { | 494 onc_field_name == entry->field_name) { |
499 return true; | 495 return true; |
500 } | 496 } |
501 } | 497 } |
502 return false; | 498 return false; |
503 } | 499 } |
504 | 500 |
505 } // namespace onc | 501 } // namespace onc |
506 } // namespace chromeos | 502 } // namespace chromeos |
OLD | NEW |