Investigate platform differences for GetAccessPointData |
||
Issue descriptionI'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.
,
Mar 27 2018
#1: No idea, perhaps Michael would know?
,
Apr 3 2018
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 |
||
Comment 1 by mattreynolds@chromium.org
, Mar 15 2018