New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 672301 link

Starred by 5 users

Issue metadata

Status: Fixed
Owner:
Closed: May 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Feature

Blocked on:
issue 689789
issue 703493



Sign in to add a comment

Implement Call to Android Location Setting Dialogue from Clank

Project Member Reported by kcaratt...@chromium.org, Dec 8 2016

Issue description

At the moment, if the Android device-level location setting is off, Clank doesn't prompt the user to turn it on when visiting a webpage that has the location permission ALLOWED -- the location is simply not provided to the webpage.

We should instead prompt the user with the LSD to turn on the device level setting, with backoff.

 
Blockedon: 689789
Cc: kcaratt...@chromium.org
Owner: benwells@chromium.org
Project Member

Comment 4 by bugdroid1@chromium.org, Mar 2 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6b1ebf77022a1754cedb39c47fb94a0a1c9f8777

commit 6b1ebf77022a1754cedb39c47fb94a0a1c9f8777
Author: qfiard <qfiard@google.com>
Date: Thu Mar 02 23:41:18 2017

Stubs for triggering the LSD in Clank

BUG= 672301 

Review-Url: https://codereview.chromium.org/2709883005
Cr-Commit-Position: refs/heads/master@{#454435}

[modify] https://crrev.com/6b1ebf77022a1754cedb39c47fb94a0a1c9f8777/chrome/android/java/src/org/chromium/chrome/browser/preferences/LocationSettings.java
[modify] https://crrev.com/6b1ebf77022a1754cedb39c47fb94a0a1c9f8777/chrome/browser/android/chrome_jni_registrar.cc
[modify] https://crrev.com/6b1ebf77022a1754cedb39c47fb94a0a1c9f8777/chrome/browser/android/location_settings.h
[modify] https://crrev.com/6b1ebf77022a1754cedb39c47fb94a0a1c9f8777/chrome/browser/android/location_settings_impl.cc
[modify] https://crrev.com/6b1ebf77022a1754cedb39c47fb94a0a1c9f8777/chrome/browser/android/location_settings_impl.h
[modify] https://crrev.com/6b1ebf77022a1754cedb39c47fb94a0a1c9f8777/chrome/browser/android/mock_location_settings.cc
[modify] https://crrev.com/6b1ebf77022a1754cedb39c47fb94a0a1c9f8777/chrome/browser/android/mock_location_settings.h
[modify] https://crrev.com/6b1ebf77022a1754cedb39c47fb94a0a1c9f8777/components/location/android/BUILD.gn
[add] https://crrev.com/6b1ebf77022a1754cedb39c47fb94a0a1c9f8777/components/location/android/DEPS
[modify] https://crrev.com/6b1ebf77022a1754cedb39c47fb94a0a1c9f8777/components/location/android/java/src/org/chromium/components/location/LocationUtils.java
[add] https://crrev.com/6b1ebf77022a1754cedb39c47fb94a0a1c9f8777/components/location/android/location_settings_dialog_context.h
[add] https://crrev.com/6b1ebf77022a1754cedb39c47fb94a0a1c9f8777/components/location/android/location_settings_dialog_outcome.h

Project Member

Comment 5 by bugdroid1@chromium.org, Mar 10 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/59547521e04b9b5ec38d51588d7eab562ac0c630

commit 59547521e04b9b5ec38d51588d7eab562ac0c630
Author: benwells <benwells@chromium.org>
Date: Fri Mar 10 05:30:00 2017

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}

[modify] https://crrev.com/59547521e04b9b5ec38d51588d7eab562ac0c630/chrome/browser/geolocation/geolocation_permission_context_android.cc
[modify] https://crrev.com/59547521e04b9b5ec38d51588d7eab562ac0c630/chrome/browser/geolocation/geolocation_permission_context_android.h
[modify] https://crrev.com/59547521e04b9b5ec38d51588d7eab562ac0c630/chrome/browser/geolocation/geolocation_permission_context_unittest.cc
[modify] https://crrev.com/59547521e04b9b5ec38d51588d7eab562ac0c630/chrome/browser/permissions/permission_context_base.cc
[modify] https://crrev.com/59547521e04b9b5ec38d51588d7eab562ac0c630/chrome/browser/permissions/permission_context_base.h
[modify] https://crrev.com/59547521e04b9b5ec38d51588d7eab562ac0c630/chrome/browser/permissions/permission_manager.cc

Comment 6 by qfiard@google.com, Mar 15 2017

Labels: Merge-Request-58
Requesting merge of CL https://chrome-internal-review.googlesource.com/c/332525/

The change has been live in Canary since Mar 9 (6 days) and I have verified that it works as intended (the new implementation is currently unused so I have simply verified that the Permissions logic in Chrome works as expected).

This change belongs in the "Building out a feature that isn't complete on the branch" and "Work for features that are behind flags or not enabled by default" of the Merge Request and Approval Guidelines (
http://www.chromium.org/developers/the-zen-of-merge-requests) but the implementation of this feature is a P0 for Search and we would anyway like to request a merge to allow us to experiment with the feature in M58. The feature is fully flag-protected by a Finch experiment, so merges are safe.
Project Member

Comment 7 by sheriffbot@chromium.org, Mar 15 2017

Labels: -Merge-Request-58 Merge-Review-58 Hotlist-Merge-Review
This bug requires manual review: DEPS changes referenced in bugdroid comments.
Please contact the milestone owner if you have questions.
Owners: amineer@(Android), cmasso@(iOS), bhthompson@(ChromeOS), govind@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 8 by qfiard@google.com, Mar 15 2017

Cc: etegan@google.com
Labels: OS-Android
Labels: -Merge-Review-58 Merge-Approved-58
Merge of https://chrome-internal-review.googlesource.com/c/332525/ approved for M58 branch 3029.
Labels: -Merge-Approved-58 Merge-Review-58
Gah, sorry, I should have read c#6 more closely.  Removing approval, will discuss via e-mail.
Cc: tsergeant@chromium.org raymes@chromium.org benwells@chromium.org tedc...@chromium.org
 Issue 586764  has been merged into this issue.
Cc: f...@chromium.org egm@chromium.org miguelg@chromium.org
 Issue 564081  has been merged into this issue.
Labels: -Merge-Review-58 Merge-Rejected-58
As per e-mail thread, rejecting M58 merge - let's wait until M59 please.
Labels: M-59
Components: Internals>Permissions>SearchEngineGeolocation
Project Member

Comment 17 by bugdroid1@chromium.org, Mar 21 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0b3748a3344c72d94fa98e7bbc7f57be70c65a02

commit 0b3748a3344c72d94fa98e7bbc7f57be70c65a02
Author: benwells <benwells@chromium.org>
Date: Tue Mar 21 06:28:40 2017

Limit the amount the Location Settings Dialog will be shown to users.

The Location Settings Dialog (LSD) is shown to users when their device
location is off, but a website tries to use the location via the
geolocation API.

This change introduces a backoff, so that when the user dismisses the
LSD it won't be shown again for a little while. This backof grows - it
starts at one week, then goes to 30 days, then 90 days.

There is a separate backoff for the default search engine, and all other
sites.

BUG= 672301 

Review-Url: https://codereview.chromium.org/2742373003
Cr-Commit-Position: refs/heads/master@{#458325}

[modify] https://crrev.com/0b3748a3344c72d94fa98e7bbc7f57be70c65a02/chrome/browser/android/mock_location_settings.cc
[modify] https://crrev.com/0b3748a3344c72d94fa98e7bbc7f57be70c65a02/chrome/browser/android/mock_location_settings.h
[modify] https://crrev.com/0b3748a3344c72d94fa98e7bbc7f57be70c65a02/chrome/browser/geolocation/geolocation_permission_context_android.cc
[modify] https://crrev.com/0b3748a3344c72d94fa98e7bbc7f57be70c65a02/chrome/browser/geolocation/geolocation_permission_context_android.h
[modify] https://crrev.com/0b3748a3344c72d94fa98e7bbc7f57be70c65a02/chrome/browser/geolocation/geolocation_permission_context_unittest.cc
[modify] https://crrev.com/0b3748a3344c72d94fa98e7bbc7f57be70c65a02/chrome/browser/permissions/permission_context_base.cc
[modify] https://crrev.com/0b3748a3344c72d94fa98e7bbc7f57be70c65a02/chrome/browser/permissions/permission_context_base.h
[modify] https://crrev.com/0b3748a3344c72d94fa98e7bbc7f57be70c65a02/chrome/browser/prefs/browser_prefs.cc
[modify] https://crrev.com/0b3748a3344c72d94fa98e7bbc7f57be70c65a02/chrome/common/pref_names.cc
[modify] https://crrev.com/0b3748a3344c72d94fa98e7bbc7f57be70c65a02/chrome/common/pref_names.h

Blockedon: 703498
Blockedon: 703497
Blockedon: 703494
Blockedon: 703493
Blockedon: -703497
Blockedon: -703498
Blockedon: -703494
Status: Fixed (was: Assigned)
 Issue 721977  has been merged into this issue.

Sign in to add a comment