summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstevenjb@chromium.org <stevenjb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-17 20:36:41 +0000
committerstevenjb@chromium.org <stevenjb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-17 20:36:41 +0000
commitdead999a56c3f38a05b1e3351e4c0dff247a8c8e (patch)
treea436f886925b74bebc103fa9162205a70a4441c3
parentbf94f9d2d9c326d77fccaecf59b1179bafd3a596 (diff)
downloadchromium_src-dead999a56c3f38a05b1e3351e4c0dff247a8c8e.zip
chromium_src-dead999a56c3f38a05b1e3351e4c0dff247a8c8e.tar.gz
chromium_src-dead999a56c3f38a05b1e3351e4c0dff247a8c8e.tar.bz2
Do not enable network technology if not available
We currently set a technology to 'enabling' even if it is not available. We also enable / disable both Cellular and Wimax on the same UI element since both are never expected to be available. Simple fix is to ignore technologies that are not available. BUG=368754 Review URL: https://codereview.chromium.org/336313002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@277856 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chromeos/network/network_state_handler.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/chromeos/network/network_state_handler.cc b/chromeos/network/network_state_handler.cc
index e4e5f6e..f7427ae 100644
--- a/chromeos/network/network_state_handler.cc
+++ b/chromeos/network/network_state_handler.cc
@@ -124,6 +124,8 @@ void NetworkStateHandler::SetTechnologyEnabled(
it != technologies.end(); ++it) {
std::string* technology = *it;
DCHECK(technology);
+ if (!shill_property_handler_->IsTechnologyAvailable(*technology))
+ continue;
NET_LOG_USER("SetTechnologyEnabled",
base::StringPrintf("%s:%d", technology->c_str(), enabled));
shill_property_handler_->SetTechnologyEnabled(