| Index: chromeos/network/network_connect.cc
|
| diff --git a/chromeos/network/network_connect.cc b/chromeos/network/network_connect.cc
|
| index 5778905536ca09761448958fcee5e89a87382603..c3553e2b6b9982492b398bc6f8d26ebea583a424 100644
|
| --- a/chromeos/network/network_connect.cc
|
| +++ b/chromeos/network/network_connect.cc
|
| @@ -435,31 +435,27 @@ void NetworkConnectImpl::SetTechnologyEnabled(
|
| network_handler::ErrorCallback());
|
| return;
|
| }
|
| - // If we're dealing with a mobile network, then handle SIM lock here.
|
| - // SIM locking only applies to cellular, so the code below won't execute
|
| - // if |technology| has been explicitly set to WiMAX.
|
| - if (technology.MatchesPattern(NetworkTypePattern::Mobile())) {
|
| + // If we're dealing with a cellular network, then handle SIM lock here.
|
| + // SIM locking only applies to cellular.
|
| + if (technology.MatchesPattern(NetworkTypePattern::Cellular())) {
|
| const DeviceState* mobile = handler->GetDeviceStateByType(technology);
|
| if (!mobile) {
|
| NET_LOG_ERROR("SetTechnologyEnabled with no device", log_string);
|
| return;
|
| }
|
| - // The following only applies to cellular.
|
| - if (mobile->type() == shill::kTypeCellular) {
|
| - if (mobile->IsSimAbsent()) {
|
| - // If this is true, then we have a cellular device with no SIM
|
| - // inserted. TODO(armansito): Chrome should display a notification here,
|
| - // prompting the user to insert a SIM card and restart the device to
|
| - // enable cellular. See crbug.com/125171.
|
| - NET_LOG_USER("Cannot enable cellular device without SIM.", log_string);
|
| - return;
|
| - }
|
| - if (!mobile->sim_lock_type().empty()) {
|
| - // A SIM has been inserted, but it is locked. Let the user unlock it
|
| - // via the dialog.
|
| - delegate_->ShowMobileSimDialog();
|
| - return;
|
| - }
|
| + if (mobile->IsSimAbsent()) {
|
| + // If this is true, then we have a cellular device with no SIM
|
| + // inserted. TODO(armansito): Chrome should display a notification here,
|
| + // prompting the user to insert a SIM card and restart the device to
|
| + // enable cellular. See crbug.com/125171.
|
| + NET_LOG_USER("Cannot enable cellular device without SIM.", log_string);
|
| + return;
|
| + }
|
| + if (!mobile->sim_lock_type().empty()) {
|
| + // A SIM has been inserted, but it is locked. Let the user unlock it
|
| + // via the dialog.
|
| + delegate_->ShowMobileSimDialog();
|
| + return;
|
| }
|
| }
|
| handler->SetTechnologyEnabled(technology, true,
|
|
|