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

Issue 703516 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug
Team-Security-UX



Sign in to add a comment

Can edit location settings for HTTP search engines

Project Member Reported by benwells@chromium.org, Mar 21 2017

Issue description

If you set a http search engine as your default search engine
-> The location settings can be seen on the search engine settings, allowing it to be edited
-> And it seems to be editable via site settings as well...

.. but neither method of editing the setting stick, as http sites can't get location permission. The location permission should be hidden for the DSE if it is HTTP only.
 
Cc: dominickn@chromium.org benwells@chromium.org emilyschechter@chromium.org rolfe@chromium.org k...@chromium.org ltian@chromium.org
Components: Internals>Permissions>SearchEngineGeolocation
Components: Privacy

Comment 3 by rolfe@chromium.org, Mar 29 2017

Cc: -rolfe@chromium.org
Removing myself, but if you need design support reach out to maxwalker as the primary security/privacy design contact
Project Member

Comment 4 by bugdroid1@chromium.org, Apr 12 2017

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

commit b2197feae09d55e93d632fef6292729b1655ef1a
Author: benwells <benwells@chromium.org>
Date: Wed Apr 12 03:34:56 2017

Remove maybeCreatePermissionForDefaultSearchEngine and related code

The function maybeCreatePermissionForDefaultSearchEngine was introduced
during development of a feature for M43, but all calls to the function were
removed in the same milestone.

In more detail, the function was introduced in revision
493f0ea4a1752dcdd355323426007c9077a6e84b, which was in M43. The
last call to the function was removed in revision
ca5a45d777d9f6ca14a4e41d262268cc5139aace, which was merged into M43.

See https://crbug.com/467798 for more details / CLs.

One of the side effects of the function is to set a preference
LOCATION_AUTO_ALLOWED when setting permissions. This preference is
checked in another function, and if present the permission is cleared. As the
function was never in a released version, this preference can't be set, so
the related code checking this preference can also be removed.

This further allows a boolean parameter to be removed from another function,
as the parameter is always true except for when it was called by the related code
that is being removed.

I'm removing all of this now as it adds confusing complexity to fixing
a bug I'm currently looking at.

BUG= 703516 

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

[modify] https://crrev.com/b2197feae09d55e93d632fef6292729b1655ef1a/chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java
[modify] https://crrev.com/b2197feae09d55e93d632fef6292729b1655ef1a/chrome/android/java/src/org/chromium/chrome/browser/preferences/SearchEngineAdapter.java

Just found another bug related to this. If system location is turned off, and you go to the search engines list, there should be a link for the selected search engine to turn on location. However this link is only visible for http search engines :/
Cc: twelling...@chromium.org
+twellington 

While I'm cleaning this up I also noticed the link to turn on location also shows up for search engines that have blocked location. I think it should only show up if location is allowed. Speak up if you disagree.
Cc: finnur@chromium.org
+finnur@

I'm not very familiar with the location link in the search engine preferences page. It looks like Finnur added the logic, so he may have some opinions.

Comment 8 by ltian@chromium.org, Apr 13 2017

Our recent change made the location link shown up for both when location is blocked and allowed. The details and CL is here: https://codereview.chromium.org/2506193003/.
Right, that made the location link be shown if the permissions has been set. I.e. it is allow or block, but not ask.

I'm questioning whether that is right. The link can show three things:
1. Location is allowed for this search engine
2. Location is blocked for this search engine
3. Location is turned off on this device. Click here to turn on (or something like that).

My suggestion is that case 3. should only be shown if the search engine's location is allowed.

Comment 10 by k...@chromium.org, Apr 18 2017

Yeah, I was thinking it would be something like (in order of precedence).

1. Location is blocked for this search engine.
2. Location is turned off (click here to turn on)
3. Location is allowed for search engine.
Project Member

Comment 11 by bugdroid1@chromium.org, Apr 20 2017

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

commit 3040583e9e0ddd28ac850e615b8d99418cfa98a3
Author: benwells <benwells@chromium.org>
Date: Thu Apr 20 08:30:56 2017

Fix location aspects of search engine settings UI Android UI

The search engines UI had two bugs which are fixed in this CL:
- location is not supported for non-HTTPS search engines, but the 'location is blocked' message was shown, and was clickable, making it seem like it could be used
- when system location is off, a link should be shown for search engines that have location enabled or blocked to allow it to be turned on. This was only visible for HTTP search engines.

BUG= 703516 

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

[modify] https://crrev.com/3040583e9e0ddd28ac850e615b8d99418cfa98a3/chrome/android/java/src/org/chromium/chrome/browser/preferences/SearchEngineAdapter.java

Labels: -M-59 M-60
Status: Fixed (was: Assigned)
ktam - thanks for the suggestion, that's what I've implemented. I'm not planning on merging this into M59 but let me know if it should be.

Comment 13 by k...@chromium.org, Apr 20 2017

Thanks Ben. I think it's fine not to merge since it's an edge case.

Sign in to add a comment