| Index: chrome/browser/geolocation/wifi_data_provider_common.cc
|
| diff --git a/chrome/browser/geolocation/wifi_data_provider_common.cc b/chrome/browser/geolocation/wifi_data_provider_common.cc
|
| index a4c6a69194508a07f227100ad1cf710604c14bc2..39df876f83404e2bfed8c62ff734ed3683916531 100644
|
| --- a/chrome/browser/geolocation/wifi_data_provider_common.cc
|
| +++ b/chrome/browser/geolocation/wifi_data_provider_common.cc
|
| @@ -76,19 +76,21 @@ void WifiDataProviderCommon::CleanUp() {
|
| void WifiDataProviderCommon::DoWifiScanTask() {
|
| bool update_available = false;
|
| WifiData new_data;
|
| - if (wlan_api_->GetAccessPointData(&new_data.access_point_data)) {
|
| + if (!wlan_api_->GetAccessPointData(&new_data.access_point_data)) {
|
| + ScheduleNextScan(polling_policy_->NoWifiInterval());
|
| + } else {
|
| {
|
| AutoLock lock(data_mutex_);
|
| update_available = wifi_data_.DiffersSignificantly(new_data);
|
| wifi_data_ = new_data;
|
| }
|
| - if (update_available || !is_first_scan_complete_) {
|
| - is_first_scan_complete_ = true;
|
| - NotifyListeners();
|
| - }
|
| + polling_policy_->UpdatePollingInterval(update_available);
|
| + ScheduleNextScan(polling_policy_->PollingInterval());
|
| + }
|
| + if (update_available || !is_first_scan_complete_) {
|
| + is_first_scan_complete_ = true;
|
| + NotifyListeners();
|
| }
|
| - polling_policy_->UpdatePollingInterval(update_available);
|
| - ScheduleNextScan(polling_policy_->PollingInterval());
|
| }
|
|
|
| void WifiDataProviderCommon::ScheduleNextScan(int interval) {
|
|
|