Issue metadata
Sign in to add a comment
|
hasAndroidLocationPermission and canPromptForAndroidLocationPermission should use the same list of location granularities. |
||||||||||||||||||
Issue description(forked from crbug/703498) I notice that hasAndroidLocationPermission (here: https://cs.chromium.org/chromium/src/components/location/android/java/src/org/chromium/components/location/LocationUtils.java?rcl=d39d1cfa0ac52ed36acfb9ab3ae66e33ff61e20a&l=66 ) returns whether permission has been granted to access COARSE or FINE location. In contrast, canPromptForAndroidLocationPermission (here: https://cs.chromium.org/chromium/src/chrome/android/java/src/org/chromium/chrome/browser/preferences/LocationSettings.java?rcl=f15f52293342a5d3dfa6fd3be727b2058711c2d3&l=56 ) returns whether FINE location can be requested. Using the previous two methods, GeolocationPermissionContextAndroid::IsLocationAccessPossible (here: https://cs.chromium.org/chromium/src/chrome/browser/geolocation/geolocation_permission_context_android.cc?rcl=7553e311e032564e696c962c1896b07cc19b226f&l=387 ) decides whether location access is possible based on whether the user (has COARSE || FINE location) OR (can request FINE location). This seems inconsistent. I think either canPromptForAndroidLocationPermission should also check for whether COARSE location can be requested or, alternatively, hasAndroidLocationPermission should check only for FINE location. In general it looks like COARSE locations are considered sufficient as a reponse to geolocation.getCurrentPosition calls: * the geolocation API treats the enableHighAccuracy parmeter as a hint only (https://dev.w3.org/geo/api/spec-source.html#high-accuracy). * the geolocation permission (https://w3c.github.io/permissions/#geolocation) does not distinguish between COARSE and FINE locations.
,
May 25 2017
Here is the original CL: https://codereview.chromium.org/1207743003/diff2/1:40001/chrome/android/java/src/org/chromium/chrome/browser/preferences/LocationSettings.java When added (pre-O), permissions were granted by the group, so checking whether you could request either was sufficient. Checking hasPermission on both was purely me being cautious (potentially overly so). I've hit too many weird quirks where permissions fail on some android variant, so I tried to make it what I thought would be more robust. I won't complain if you want to make this more symmetrical, but I also can't guarantee it won't break anything. Some examples of weird android quirks: https://bugs.chromium.org/p/chromium/issues/detail?id=580733 https://bugs.chromium.org/p/chromium/issues/detail?id=639099
,
Jan 10
Downgrading P2s that haven't been modified in more than 6 months, which have no component or owner. |
|||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||
Comment 1 by benwells@chromium.org
, May 25 2017