diff options
Diffstat (limited to 'chromeos')
7 files changed, 23 insertions, 14 deletions
diff --git a/chromeos/network/onc/onc_signature.cc b/chromeos/network/onc/onc_signature.cc index 3f67a9f..160481f 100644 --- a/chromeos/network/onc/onc_signature.cc +++ b/chromeos/network/onc/onc_signature.cc @@ -249,6 +249,7 @@ const OncFieldSignature cellular_fields[] = { { ::onc::kRecommended, &kRecommendedSignature}, { ::onc::cellular::kAPN, &kCellularApnSignature }, { ::onc::cellular::kAPNList, &kCellularApnListSignature}, + { ::onc::vpn::kAutoConnect, &kBoolSignature}, {NULL}}; const OncFieldSignature cellular_with_state_fields[] = { diff --git a/chromeos/network/onc/onc_translation_tables.cc b/chromeos/network/onc/onc_translation_tables.cc index dd0f8f2..82df4d8 100644 --- a/chromeos/network/onc/onc_translation_tables.cc +++ b/chromeos/network/onc/onc_translation_tables.cc @@ -154,6 +154,7 @@ const FieldTranslationEntry cellular_fields[] = { { ::onc::cellular::kActivationType, shill::kActivationTypeProperty}, // This field is converted during translation, see onc_translator_*. // { ::onc::cellular::kActivationState, shill::kActivationStateProperty}, + { ::onc::vpn::kAutoConnect, shill::kAutoConnectProperty}, { ::onc::cellular::kNetworkTechnology, shill::kNetworkTechnologyProperty}, // This field is converted during translation, see onc_translator_*. // { ::onc::cellular::kRoamingState, shill::kRoamingStateProperty}, diff --git a/chromeos/network/onc/onc_translator_shill_to_onc.cc b/chromeos/network/onc/onc_translator_shill_to_onc.cc index d7bc265..1474d04 100644 --- a/chromeos/network/onc/onc_translator_shill_to_onc.cc +++ b/chromeos/network/onc/onc_translator_shill_to_onc.cc @@ -393,7 +393,10 @@ void ShillToONCTranslator::TranslateNetworkWithState() { if (!onc_network_type.empty()) { onc_object_->SetStringWithoutPathExpansion(::onc::network_config::kType, onc_network_type); - TranslateAndAddNestedObject(onc_network_type); + // Wimax is not supported by ONC, yet. + // TOOD(pneubeck): Wimax support is required, see https://crbug.com/414417 . + if (onc_network_type != ::onc::network_type::kWimax) + TranslateAndAddNestedObject(onc_network_type); } // Since Name is a read only field in Shill unless it's a VPN, it is copied diff --git a/chromeos/test/data/network/cellular.onc b/chromeos/test/data/network/cellular.onc index 4c76e3fe..50e4d28 100644 --- a/chromeos/test/data/network/cellular.onc +++ b/chromeos/test/data/network/cellular.onc @@ -6,6 +6,7 @@ "AccessPointName": "test-apn", "Username": "test-username", "Password": "test-password" - } + }, + "AutoConnect": true } } diff --git a/chromeos/test/data/network/shill_cellular.json b/chromeos/test/data/network/shill_cellular.json index a32ba56..f5eedbe 100644 --- a/chromeos/test/data/network/shill_cellular.json +++ b/chromeos/test/data/network/shill_cellular.json @@ -1,4 +1,5 @@ { + "AutoConnect": true, "Type": "cellular", "Cellular.APN": { "apn": "test-apn", diff --git a/chromeos/test/data/network/shill_cellular_with_state.json b/chromeos/test/data/network/shill_cellular_with_state.json index 081f173..2fd362d 100644 --- a/chromeos/test/data/network/shill_cellular_with_state.json +++ b/chromeos/test/data/network/shill_cellular_with_state.json @@ -1,4 +1,5 @@ { + "AutoConnect": true, "Type": "cellular", "Name": "Test Network", "Cellular.ActivationState": "activated", @@ -21,24 +22,24 @@ "Cellular.AllowRoaming": true, "Cellular.APNList": [ { - "apn": "test-apn0", - "username": "test-username0", - "password": "test-password0" + "apn": "test-apn0", + "username": "test-username0", + "password": "test-password0" }, { - "apn": "test-apn1", - "username": "test-username1", - "password": "test-password1" + "apn": "test-apn1", + "username": "test-username1", + "password": "test-password1" }, { - "apn": "test-apn2", - "username": "test-username2", - "password": "test-password2" + "apn": "test-apn2", + "username": "test-username2", + "password": "test-password2" }, { - "apn": "test-apn3", - "username": "test-username3", - "password": "test-password3" + "apn": "test-apn3", + "username": "test-username3", + "password": "test-password3" } ], "Cellular.HomeProvider": { diff --git a/chromeos/test/data/network/translation_of_shill_cellular_with_state.onc b/chromeos/test/data/network/translation_of_shill_cellular_with_state.onc index 7180366..05a09d8 100644 --- a/chromeos/test/data/network/translation_of_shill_cellular_with_state.onc +++ b/chromeos/test/data/network/translation_of_shill_cellular_with_state.onc @@ -5,6 +5,7 @@ "ActivationState": "Activated", "ActivationType": "OTASP", "AllowRoaming": true, + "AutoConnect": true, "HomeProvider": { "country": "us", "name": "cellular_provider" |