From 6043ad6b37b7f21834bbb9595ce88660967dba22 Mon Sep 17 00:00:00 2001 From: "stevenjb@google.com" Date: Thu, 2 Dec 2010 19:19:53 +0000 Subject: Implement wifi scanning state properly This addresses the edge case where the UI gets stuck in a 'scanning' state. This is possible now that chromium-os:9326 is fixed. BUG=chromium-os:9448 TEST=See issue Review URL: http://codereview.chromium.org/5497001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68044 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/chromeos/cros/network_library.cc | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'chrome/browser') diff --git a/chrome/browser/chromeos/cros/network_library.cc b/chrome/browser/chromeos/cros/network_library.cc index 5991780..a1ecd0a 100644 --- a/chrome/browser/chromeos/cros/network_library.cc +++ b/chrome/browser/chromeos/cros/network_library.cc @@ -1299,7 +1299,6 @@ class NetworkLibraryImpl : public NetworkLibrary { } virtual void EnableWifiNetworkDevice(bool enable) { - wifi_scanning_ = enable; // Cleared in UpdateNetworkManagerStatus. EnableNetworkDeviceType(TYPE_WIFI, enable); } @@ -1579,14 +1578,11 @@ class NetworkLibraryImpl : public NetworkLibrary { } wifi_scanning_ = false; - // TODO(stevenjb): Enable this code once crosbug.com/9326 is fixed. - // for (int i = 0; i < system->device_size; i++) { - // const DeviceInfo* device = system->GetDeviceInfo(i); - // if (device->type == TYPE_WIFI) { - // if (device->scanning) - // wifi_scanning_ = true; - // } - // } + for (int i = 0; i < system->device_size; i++) { + const DeviceInfo* device = system->GetDeviceInfo(i); + if (device->type == TYPE_WIFI && device->scanning) + wifi_scanning_ = true; + } available_devices_ = system->available_technologies; enabled_devices_ = system->enabled_technologies; -- cgit v1.1