summaryrefslogtreecommitdiffstats
path: root/chromeos
diff options
context:
space:
mode:
authorthieule@chromium.org <thieule@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-12 01:00:34 +0000
committerthieule@chromium.org <thieule@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-12 01:00:34 +0000
commit321c469eca891b9a34ebccf0e921d21fcfefee90 (patch)
treeb618acfae74fceab9e1d9cb47e312495caa366d5 /chromeos
parent2ce7f9af667b87c9712ebdf1d7741a817bf3a168 (diff)
downloadchromium_src-321c469eca891b9a34ebccf0e921d21fcfefee90.zip
chromium_src-321c469eca891b9a34ebccf0e921d21fcfefee90.tar.gz
chromium_src-321c469eca891b9a34ebccf0e921d21fcfefee90.tar.bz2
Enable Verizon OTA activation.
Enables OTA activation using the old Wifi flow except it connects to the cellular network instead of requiring a Wifi connection. BUG=chromium:384185 TEST=Unit tests, manually activate SIM on CDMA and LTE Review URL: https://codereview.chromium.org/406473002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@288854 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chromeos')
-rw-r--r--chromeos/network/network_connection_handler.cc5
-rw-r--r--chromeos/network/network_connection_handler_unittest.cc8
-rw-r--r--chromeos/network/network_state.cc5
-rw-r--r--chromeos/network/network_state.h6
-rw-r--r--chromeos/network/onc/onc_signature.cc2
-rw-r--r--chromeos/network/onc/onc_translation_tables.cc3
-rw-r--r--chromeos/test/data/network/shill_cellular_with_state.json2
-rw-r--r--chromeos/test/data/network/translation_of_shill_cellular_with_state.onc2
8 files changed, 8 insertions, 25 deletions
diff --git a/chromeos/network/network_connection_handler.cc b/chromeos/network/network_connection_handler.cc
index 99c3051..332319a 100644
--- a/chromeos/network/network_connection_handler.cc
+++ b/chromeos/network/network_connection_handler.cc
@@ -268,11 +268,6 @@ void NetworkConnectionHandler::ConnectToNetwork(
InvokeErrorCallback(service_path, error_callback, kErrorConnecting);
return;
}
- if (network->RequiresActivation()) {
- InvokeErrorCallback(service_path, error_callback,
- kErrorActivationRequired);
- return;
- }
if (check_error_state) {
const std::string& error = network->last_error();
diff --git a/chromeos/network/network_connection_handler_unittest.cc b/chromeos/network/network_connection_handler_unittest.cc
index ef69213..b22c07d 100644
--- a/chromeos/network/network_connection_handler_unittest.cc
+++ b/chromeos/network/network_connection_handler_unittest.cc
@@ -303,9 +303,6 @@ const char* kConfigConnecting =
const char* kConfigRequiresPassphrase =
"{ \"GUID\": \"wifi3\", \"Type\": \"wifi\", "
" \"PassphraseRequired\": true }";
-const char* kConfigRequiresActivation =
- "{ \"GUID\": \"cellular1\", \"Type\": \"cellular\","
- " \"Cellular.ActivationState\": \"not-activated\" }";
} // namespace
@@ -335,11 +332,6 @@ TEST_F(NetworkConnectionHandlerTest, NetworkConnectionHandlerConnectFailure) {
Connect("wifi3");
EXPECT_EQ(NetworkConnectionHandler::kErrorPassphraseRequired,
GetResultAndReset());
-
- EXPECT_TRUE(Configure(kConfigRequiresActivation));
- Connect("cellular1");
- EXPECT_EQ(NetworkConnectionHandler::kErrorActivationRequired,
- GetResultAndReset());
}
namespace {
diff --git a/chromeos/network/network_state.cc b/chromeos/network/network_state.cc
index c528c43..cb451e8 100644
--- a/chromeos/network/network_state.cc
+++ b/chromeos/network/network_state.cc
@@ -65,7 +65,6 @@ NetworkState::NetworkState(const std::string& path)
connectable_(false),
prefix_length_(0),
signal_strength_(0),
- activate_over_non_cellular_networks_(false),
cellular_out_of_credits_(false),
has_ca_cert_nss_(false) {
}
@@ -94,6 +93,8 @@ bool NetworkState::PropertyChanged(const std::string& key,
else
error_.clear();
return true;
+ } else if (key == shill::kActivationTypeProperty) {
+ return GetStringValue(key, value, &activation_type_);
} else if (key == shill::kActivationStateProperty) {
return GetStringValue(key, value, &activation_state_);
} else if (key == shill::kRoamingStateProperty) {
@@ -110,8 +111,6 @@ bool NetworkState::PropertyChanged(const std::string& key,
return GetStringValue(key, value, &guid_);
} else if (key == shill::kProfileProperty) {
return GetStringValue(key, value, &profile_path_);
- } else if (key == shill::kActivateOverNonCellularNetworkProperty) {
- return GetBooleanValue(key, value, &activate_over_non_cellular_networks_);
} else if (key == shill::kOutOfCreditsProperty) {
return GetBooleanValue(key, value, &cellular_out_of_credits_);
} else if (key == shill::kProxyConfigProperty) {
diff --git a/chromeos/network/network_state.h b/chromeos/network/network_state.h
index 90b78cd..b1a491b 100644
--- a/chromeos/network/network_state.h
+++ b/chromeos/network/network_state.h
@@ -84,11 +84,9 @@ class CHROMEOS_EXPORT NetworkState : public ManagedState {
const std::string& network_technology() const {
return network_technology_;
}
+ const std::string& activation_type() const { return activation_type_; }
const std::string& activation_state() const { return activation_state_; }
const std::string& roaming() const { return roaming_; }
- bool activate_over_non_cellular_networks() const {
- return activate_over_non_cellular_networks_;
- }
bool cellular_out_of_credits() const { return cellular_out_of_credits_; }
// Whether this network has a CACertNSS nickname set.
@@ -168,9 +166,9 @@ class CHROMEOS_EXPORT NetworkState : public ManagedState {
// Cellular properties, used for icons, Connect, and Activation.
std::string network_technology_;
+ std::string activation_type_;
std::string activation_state_;
std::string roaming_;
- bool activate_over_non_cellular_networks_;
bool cellular_out_of_credits_;
// Whether a deprecated CaCertNSS property of this network is set. Required
diff --git a/chromeos/network/onc/onc_signature.cc b/chromeos/network/onc/onc_signature.cc
index 1b1daa7..4e1bdeb 100644
--- a/chromeos/network/onc/onc_signature.cc
+++ b/chromeos/network/onc/onc_signature.cc
@@ -251,7 +251,7 @@ const OncFieldSignature cellular_fields[] = {
{NULL}};
const OncFieldSignature cellular_with_state_fields[] = {
- { ::onc::cellular::kActivateOverNonCellularNetwork, &kBoolSignature},
+ { ::onc::cellular::kActivationType, &kStringSignature},
{ ::onc::cellular::kActivationState, &kStringSignature},
{ ::onc::cellular::kAllowRoaming, &kBoolSignature},
{ ::onc::cellular::kCarrier, &kStringSignature},
diff --git a/chromeos/network/onc/onc_translation_tables.cc b/chromeos/network/onc/onc_translation_tables.cc
index 6aba3c1..119b62b 100644
--- a/chromeos/network/onc/onc_translation_tables.cc
+++ b/chromeos/network/onc/onc_translation_tables.cc
@@ -149,8 +149,7 @@ const FieldTranslationEntry sim_lock_status_fields[] = {
// This must only contain Service properties and not Device properties.
// For Device properties see kCellularDeviceTable.
const FieldTranslationEntry cellular_fields[] = {
- { ::onc::cellular::kActivateOverNonCellularNetwork,
- shill::kActivateOverNonCellularNetworkProperty},
+ { ::onc::cellular::kActivationType, shill::kActivationTypeProperty},
{ ::onc::cellular::kActivationState, shill::kActivationStateProperty},
{ ::onc::cellular::kNetworkTechnology, shill::kNetworkTechnologyProperty},
{ ::onc::cellular::kRoamingState, shill::kRoamingStateProperty},
diff --git a/chromeos/test/data/network/shill_cellular_with_state.json b/chromeos/test/data/network/shill_cellular_with_state.json
index b26aaae..a3af38f 100644
--- a/chromeos/test/data/network/shill_cellular_with_state.json
+++ b/chromeos/test/data/network/shill_cellular_with_state.json
@@ -1,8 +1,8 @@
{
"Type": "cellular",
"Name": "Test Network",
- "Cellular.ActivateOverNonCellularNetwork": false,
"Cellular.ActivationState": "activated",
+ "Cellular.ActivationType": "OTASP",
"Cellular.ServingOperator": {
"code": "test-code",
"country": "test-country",
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 ee290f5..d7d6b33 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
@@ -2,8 +2,8 @@
"Type": "Cellular",
"Name": "Test Network",
"Cellular": {
- "ActivateOverNonCellularNetwork": false,
"ActivationState": "activated",
+ "ActivationType": "OTASP",
"AllowRoaming": true,
"HomeProvider": {
"country": "us",