| Index: chrome/browser/chromeos/tether/tether_service.cc
|
| diff --git a/chrome/browser/chromeos/tether/tether_service.cc b/chrome/browser/chromeos/tether/tether_service.cc
|
| index e0dd94fb4b1fd24d64c816e0c5b27eda2f492663..f2dc3df993b9a6ccb876e7e97422a476299dda8a 100644
|
| --- a/chrome/browser/chromeos/tether/tether_service.cc
|
| +++ b/chrome/browser/chromeos/tether/tether_service.cc
|
| @@ -199,7 +199,7 @@ TetherService::GetTetherTechnologyState() {
|
| } else if (!IsAllowedByPolicy()) {
|
| return chromeos::NetworkStateHandler::TechnologyState::
|
| TECHNOLOGY_PROHIBITED;
|
| - } else if (!IsBluetoothAvailable()) {
|
| + } else if (!IsBluetoothAvailable() || IsCellularAvailableButNotEnabled()) {
|
| // TODO (hansberry): This unfortunately results in a weird UI state for
|
| // Settings where the toggle is clickable but immediately becomes disabled
|
| // after enabling it. Possible solution: grey out the toggle and tell the
|
| @@ -235,6 +235,13 @@ bool TetherService::IsBluetoothAvailable() const {
|
| return adapter_.get() && adapter_->IsPresent() && adapter_->IsPowered();
|
| }
|
|
|
| +bool TetherService::IsCellularAvailableButNotEnabled() const {
|
| + return (network_state_handler_->IsTechnologyAvailable(
|
| + chromeos::NetworkTypePattern::Cellular()) &&
|
| + !network_state_handler_->IsTechnologyEnabled(
|
| + chromeos::NetworkTypePattern::Cellular()));
|
| +}
|
| +
|
| bool TetherService::IsAllowedByPolicy() const {
|
| return profile_->GetPrefs()->GetBoolean(prefs::kInstantTetheringAllowed);
|
| }
|
|
|