Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(408)

Issue 2743603002: Reflect device status in geolocation permissions.request calls. (Closed)

Created:
3 years, 9 months ago by benwells
Modified:
3 years, 9 months ago
Reviewers:
raymes
CC:
chromium-reviews, mlamouri+watch-permissions_chromium.org, mlamouri+watch-geolocation_chromium.org, raymes+watch_chromium.org, Michael van Ouwerkerk, chrome-apps-syd-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Reflect device status in geolocation permissions.request calls. In some situations origins may have geolocation permission, but the user will see prompts, or geolocation won't work. In these cases, the permissions API should indicate this, with either ASK or DENIED. The situations are as follows: 1. When the device has location turned off 2. When Chrome does not have geolocation permission at the Androd level. In both of these cases, Chrome may be able to prompt the user to rectify the problem and if possible will do so when permission is requested. This patch does not correctly model the second situation, as the plumbing required to see if Chrome is allowed to prompt is not implemented. In this case prompt is always return ASK, even if Chrome cannot prompt and requests will fail. This is better than returning GRANTED however, as it is closer to the truth. BUG=672301 Review-Url: https://codereview.chromium.org/2743603002 Cr-Commit-Position: refs/heads/master@{#456003} Committed: https://chromium.googlesource.com/chromium/src/+/59547521e04b9b5ec38d51588d7eab562ac0c630

Patch Set 1 #

Patch Set 2 : Self review #

Total comments: 10

Patch Set 3 : Feedback #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+229 lines, -7 lines) Patch
M chrome/browser/geolocation/geolocation_permission_context_android.h View 2 chunks +6 lines, -2 lines 0 comments Download
M chrome/browser/geolocation/geolocation_permission_context_android.cc View 1 2 3 chunks +36 lines, -2 lines 0 comments Download
M chrome/browser/geolocation/geolocation_permission_context_unittest.cc View 1 2 4 chunks +159 lines, -0 lines 0 comments Download
M chrome/browser/permissions/permission_context_base.h View 1 1 chunk +8 lines, -0 lines 0 comments Download
M chrome/browser/permissions/permission_context_base.cc View 1 chunk +7 lines, -0 lines 0 comments Download
M chrome/browser/permissions/permission_manager.cc View 1 1 chunk +13 lines, -3 lines 1 comment Download

Messages

Total messages: 14 (8 generated)
benwells
3 years, 9 months ago (2017-03-09 23:16:25 UTC) #6
raymes
https://codereview.chromium.org/2743603002/diff/20001/chrome/browser/geolocation/geolocation_permission_context_android.cc File chrome/browser/geolocation/geolocation_permission_context_android.cc (right): https://codereview.chromium.org/2743603002/diff/20001/chrome/browser/geolocation/geolocation_permission_context_android.cc#newcode173 chrome/browser/geolocation/geolocation_permission_context_android.cc:173: result.content_setting = CanShowLocationSettingsDialog( Maybe we should update the result.status ...
3 years, 9 months ago (2017-03-10 02:53:31 UTC) #7
benwells
https://codereview.chromium.org/2743603002/diff/20001/chrome/browser/geolocation/geolocation_permission_context_android.cc File chrome/browser/geolocation/geolocation_permission_context_android.cc (right): https://codereview.chromium.org/2743603002/diff/20001/chrome/browser/geolocation/geolocation_permission_context_android.cc#newcode173 chrome/browser/geolocation/geolocation_permission_context_android.cc:173: result.content_setting = CanShowLocationSettingsDialog( On 2017/03/10 02:53:31, raymes wrote: > ...
3 years, 9 months ago (2017-03-10 04:19:20 UTC) #8
raymes
lgtm thanks! https://codereview.chromium.org/2743603002/diff/40001/chrome/browser/permissions/permission_manager.cc File chrome/browser/permissions/permission_manager.cc (right): https://codereview.chromium.org/2743603002/diff/40001/chrome/browser/permissions/permission_manager.cc#newcode448 chrome/browser/permissions/permission_manager.cc:448: // GetPermissionStatusForPermissionsAPI. One thought I had is ...
3 years, 9 months ago (2017-03-10 04:37:13 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2743603002/40001
3 years, 9 months ago (2017-03-10 04:40:06 UTC) #11
commit-bot: I haz the power
3 years, 9 months ago (2017-03-10 05:31:10 UTC) #14
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/59547521e04b9b5ec38d51588d7e...

Powered by Google App Engine
This is Rietveld 408576698