New issue
Advanced search Search tips

Issue 822394 link

Starred by 2 users

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 3
Type: Bug



Sign in to add a comment

Investigate platform differences for GetAccessPointData

Project Member Reported by mattreynolds@chromium.org, Mar 15 2018

Issue description

I'm opening this bug to follow up on https://bugs.chromium.org/p/chromium/issues/detail?id=814100#c14

WlanApiInterface::GetAccessPointData is used to fetch the set of nearby wifi APs from the system's WLAN adapter, if present. On success, it returns true and inserts the AP data into an out param. On failure, it returns false.

The distinction between a success and a failure appears to differ between platforms.

On Linux and Mac, "zero failures" is considered a success condition, even if no WLAN adapter was found.

https://cs.chromium.org/chromium/src/device/geolocation/wifi_data_provider_linux.cc?l=175

https://cs.chromium.org/chromium/src/device/geolocation/wifi_data_provider_mac.mm?l=105

On Windows, we fail if WlanOpenHandle fails. I observed this failure on a system with no installed WLAN adapter.

https://cs.chromium.org/chromium/src/device/geolocation/wifi_data_provider_win.cc?l=166

On Chrome OS we defer to the GeolocationHandler, which will fail if wifi is disabled or no access points are discovered. (not tested)

https://cs.chromium.org/chromium/src/device/geolocation/wifi_data_provider_chromeos.cc?l=155

https://cs.chromium.org/chromium/src/chromeos/network/geolocation_handler.cc?l=53



The return value of GetAccessPointData is used to determine the wifi scanning interval. Returning true in a situation where wifi data is not available may cause us to use an incorrect interval. We should determine what the correct behavior is.
 
I've ordered a USB WLAN adapter so I can add/remove/disable the adapter at will.

mcasas@, do you know if there's a reason for this inconsistency?

Comment 2 by mcasas@chromium.org, Mar 27 2018

Cc: mvanouwe...@chromium.org
#1: No idea, perhaps Michael would know? 
I don't know why it's inconsistent, there _might_ be no good reason. This is quite old code, and not often changed functionally, just adjusted for new coding guidelines and patterns. The original authors have left Chrome or Google. I think it would be fine for the current owners to make changes as appropriate, while limiting the size of the changes.

Sign in to add a comment