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

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

Issue 2847453002: [CrOS Tether] Remove the ManagedTetherProperties dictionary. (Closed)
Patch Set: Created 3 years, 7 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
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[] = { 169 const OncFieldSignature tether_fields[] = {{NULL}};
170
171 const OncFieldSignature tether_with_state_fields[] = {
170 {::onc::tether::kBatteryPercentage, &kIntegerSignature}, 172 {::onc::tether::kBatteryPercentage, &kIntegerSignature},
171 {::onc::tether::kCarrier, &kStringSignature}, 173 {::onc::tether::kCarrier, &kStringSignature},
172 {::onc::tether::kSignalStrength, &kIntegerSignature}, 174 {::onc::tether::kSignalStrength, &kIntegerSignature},
173 {NULL}}; 175 {NULL}};
174 176
175 const OncFieldSignature ipconfig_fields[] = { 177 const OncFieldSignature ipconfig_fields[] = {
176 {::onc::ipconfig::kGateway, &kStringSignature}, 178 {::onc::ipconfig::kGateway, &kStringSignature},
177 {::onc::ipconfig::kIPAddress, &kStringSignature}, 179 {::onc::ipconfig::kIPAddress, &kStringSignature},
178 {::onc::ipconfig::kNameServers, &kStringListSignature}, 180 {::onc::ipconfig::kNameServers, &kStringListSignature},
179 {::onc::ipconfig::kRoutingPrefix, &kIntegerSignature}, 181 {::onc::ipconfig::kRoutingPrefix, &kIntegerSignature},
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 const OncFieldSignature network_with_state_fields[] = { 330 const OncFieldSignature network_with_state_fields[] = {
329 {::onc::network_config::kCellular, &kCellularWithStateSignature}, 331 {::onc::network_config::kCellular, &kCellularWithStateSignature},
330 {::onc::network_config::kConnectionState, &kStringSignature}, 332 {::onc::network_config::kConnectionState, &kStringSignature},
331 {::onc::network_config::kConnectable, &kBoolSignature}, 333 {::onc::network_config::kConnectable, &kBoolSignature},
332 {::onc::network_config::kErrorState, &kStringSignature}, 334 {::onc::network_config::kErrorState, &kStringSignature},
333 {::onc::network_config::kIPConfigs, &kIPConfigListSignature}, 335 {::onc::network_config::kIPConfigs, &kIPConfigListSignature},
334 {::onc::network_config::kMacAddress, &kStringSignature}, 336 {::onc::network_config::kMacAddress, &kStringSignature},
335 {::onc::network_config::kRestrictedConnectivity, &kBoolSignature}, 337 {::onc::network_config::kRestrictedConnectivity, &kBoolSignature},
336 {::onc::network_config::kSavedIPConfig, &kSavedIPConfigSignature}, 338 {::onc::network_config::kSavedIPConfig, &kSavedIPConfigSignature},
337 {::onc::network_config::kSource, &kStringSignature}, 339 {::onc::network_config::kSource, &kStringSignature},
338 {::onc::network_config::kTether, &kTetherSignature}, 340 {::onc::network_config::kTether, &kTetherWithStateSignature},
339 {::onc::network_config::kWiFi, &kWiFiWithStateSignature}, 341 {::onc::network_config::kWiFi, &kWiFiWithStateSignature},
340 {::onc::network_config::kWimax, &kWiMAXWithStateSignature}, 342 {::onc::network_config::kWimax, &kWiMAXWithStateSignature},
341 {NULL}}; 343 {NULL}};
342 344
343 const OncFieldSignature global_network_configuration_fields[] = { 345 const OncFieldSignature global_network_configuration_fields[] = {
344 {::onc::global_network_config::kAllowOnlyPolicyNetworksToAutoconnect, 346 {::onc::global_network_config::kAllowOnlyPolicyNetworksToAutoconnect,
345 &kBoolSignature}, 347 &kBoolSignature},
346 {::onc::global_network_config::kAllowOnlyPolicyNetworksToConnect, 348 {::onc::global_network_config::kAllowOnlyPolicyNetworksToConnect,
347 &kBoolSignature}, 349 &kBoolSignature},
348 {::onc::global_network_config::kDisableNetworkTypes, &kStringListSignature}, 350 {::onc::global_network_config::kDisableNetworkTypes, &kStringListSignature},
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 const OncValueSignature kOpenVPNSignature = {base::Value::Type::DICTIONARY, 395 const OncValueSignature kOpenVPNSignature = {base::Value::Type::DICTIONARY,
394 openvpn_fields, NULL}; 396 openvpn_fields, NULL};
395 const OncValueSignature kThirdPartyVPNSignature = { 397 const OncValueSignature kThirdPartyVPNSignature = {
396 base::Value::Type::DICTIONARY, third_party_vpn_fields, NULL}; 398 base::Value::Type::DICTIONARY, third_party_vpn_fields, NULL};
397 const OncValueSignature kVerifyX509Signature = {base::Value::Type::DICTIONARY, 399 const OncValueSignature kVerifyX509Signature = {base::Value::Type::DICTIONARY,
398 verify_x509_fields, NULL}; 400 verify_x509_fields, NULL};
399 const OncValueSignature kVPNSignature = {base::Value::Type::DICTIONARY, 401 const OncValueSignature kVPNSignature = {base::Value::Type::DICTIONARY,
400 vpn_fields, NULL}; 402 vpn_fields, NULL};
401 const OncValueSignature kEthernetSignature = {base::Value::Type::DICTIONARY, 403 const OncValueSignature kEthernetSignature = {base::Value::Type::DICTIONARY,
402 ethernet_fields, NULL}; 404 ethernet_fields, NULL};
403 const OncValueSignature kTetherSignature = {base::Value::Type::DICTIONARY,
404 tether_fields, NULL};
405 const OncValueSignature kIPConfigSignature = {base::Value::Type::DICTIONARY, 405 const OncValueSignature kIPConfigSignature = {base::Value::Type::DICTIONARY,
406 ipconfig_fields, NULL}; 406 ipconfig_fields, NULL};
407 const OncValueSignature kSavedIPConfigSignature = { 407 const OncValueSignature kSavedIPConfigSignature = {
408 base::Value::Type::DICTIONARY, ipconfig_fields, NULL}; 408 base::Value::Type::DICTIONARY, ipconfig_fields, NULL};
409 const OncValueSignature kStaticIPConfigSignature = { 409 const OncValueSignature kStaticIPConfigSignature = {
410 base::Value::Type::DICTIONARY, ipconfig_fields, NULL}; 410 base::Value::Type::DICTIONARY, ipconfig_fields, NULL};
411 const OncValueSignature kProxyLocationSignature = { 411 const OncValueSignature kProxyLocationSignature = {
412 base::Value::Type::DICTIONARY, proxy_location_fields, NULL}; 412 base::Value::Type::DICTIONARY, proxy_location_fields, NULL};
413 const OncValueSignature kProxyManualSignature = {base::Value::Type::DICTIONARY, 413 const OncValueSignature kProxyManualSignature = {base::Value::Type::DICTIONARY,
414 proxy_manual_fields, NULL}; 414 proxy_manual_fields, NULL};
(...skipping 16 matching lines...) Expand all
431 const OncValueSignature kToplevelConfigurationSignature = { 431 const OncValueSignature kToplevelConfigurationSignature = {
432 base::Value::Type::DICTIONARY, toplevel_configuration_fields, NULL}; 432 base::Value::Type::DICTIONARY, toplevel_configuration_fields, NULL};
433 433
434 // Derived "ONC with State" signatures. 434 // Derived "ONC with State" signatures.
435 const OncValueSignature kNetworkWithStateSignature = { 435 const OncValueSignature kNetworkWithStateSignature = {
436 base::Value::Type::DICTIONARY, network_with_state_fields, NULL, 436 base::Value::Type::DICTIONARY, network_with_state_fields, NULL,
437 &kNetworkConfigurationSignature}; 437 &kNetworkConfigurationSignature};
438 const OncValueSignature kWiFiWithStateSignature = { 438 const OncValueSignature kWiFiWithStateSignature = {
439 base::Value::Type::DICTIONARY, wifi_with_state_fields, NULL, 439 base::Value::Type::DICTIONARY, wifi_with_state_fields, NULL,
440 &kWiFiSignature}; 440 &kWiFiSignature};
441 const OncValueSignature kTetherSignature = {base::Value::Type::DICTIONARY,
442 tether_fields, NULL};
443 const OncValueSignature kTetherWithStateSignature = {
444 base::Value::Type::DICTIONARY, tether_with_state_fields, NULL,
445 &kTetherSignature};
441 const OncValueSignature kWiMAXWithStateSignature = { 446 const OncValueSignature kWiMAXWithStateSignature = {
442 base::Value::Type::DICTIONARY, wimax_with_state_fields, NULL, 447 base::Value::Type::DICTIONARY, wimax_with_state_fields, NULL,
443 &kWiMAXSignature}; 448 &kWiMAXSignature};
444 const OncValueSignature kCellularSignature = {base::Value::Type::DICTIONARY, 449 const OncValueSignature kCellularSignature = {base::Value::Type::DICTIONARY,
445 cellular_fields, NULL}; 450 cellular_fields, NULL};
446 const OncValueSignature kCellularWithStateSignature = { 451 const OncValueSignature kCellularWithStateSignature = {
447 base::Value::Type::DICTIONARY, cellular_with_state_fields, NULL, 452 base::Value::Type::DICTIONARY, cellular_with_state_fields, NULL,
448 &kCellularSignature}; 453 &kCellularSignature};
449 const OncValueSignature kCellularPaymentPortalSignature = { 454 const OncValueSignature kCellularPaymentPortalSignature = {
450 base::Value::Type::DICTIONARY, cellular_payment_portal_fields, NULL}; 455 base::Value::Type::DICTIONARY, cellular_payment_portal_fields, NULL};
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 if (&signature == entry->value_signature && 503 if (&signature == entry->value_signature &&
499 onc_field_name == entry->field_name) { 504 onc_field_name == entry->field_name) {
500 return true; 505 return true;
501 } 506 }
502 } 507 }
503 return false; 508 return false;
504 } 509 }
505 510
506 } // namespace onc 511 } // namespace onc
507 } // namespace chromeos 512 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698