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

Issue 2742373003: Limit the amount the Location Settings Dialog will be shown to users. (Closed)

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

Description

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} Committed: https://chromium.googlesource.com/chromium/src/+/0b3748a3344c72d94fa98e7bbc7f57be70c65a02

Patch Set 1 #

Total comments: 26

Patch Set 2 : Feedback #

Patch Set 3 : Woops, missed one #

Total comments: 1

Patch Set 4 : Nit #

Total comments: 4

Patch Set 5 : Rebase #

Patch Set 6 : Feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+521 lines, -32 lines) Patch
M chrome/browser/android/mock_location_settings.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/android/mock_location_settings.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/geolocation/geolocation_permission_context_android.h View 1 2 3 4 5 6 chunks +26 lines, -3 lines 0 comments Download
M chrome/browser/geolocation/geolocation_permission_context_android.cc View 1 2 3 4 5 10 chunks +163 lines, -23 lines 0 comments Download
M chrome/browser/geolocation/geolocation_permission_context_unittest.cc View 1 2 3 4 5 9 chunks +285 lines, -6 lines 0 comments Download
M chrome/browser/permissions/permission_context_base.h View 1 2 1 chunk +8 lines, -0 lines 0 comments Download
M chrome/browser/permissions/permission_context_base.cc View 1 2 2 chunks +8 lines, -0 lines 0 comments Download
M chrome/browser/prefs/browser_prefs.cc View 1 2 3 4 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/common/pref_names.h View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/common/pref_names.cc View 1 2 3 4 1 chunk +19 lines, -0 lines 0 comments Download

Messages

Total messages: 41 (27 generated)
benwells
there is a little thing to fix (change GURL to char*) but apart from that ...
3 years, 9 months ago (2017-03-14 23:53:16 UTC) #6
raymes
Thanks Ben! All pretty minor comments :) https://codereview.chromium.org/2742373003/diff/1/chrome/browser/geolocation/geolocation_permission_context_android.cc File chrome/browser/geolocation/geolocation_permission_context_android.cc (right): https://codereview.chromium.org/2742373003/diff/1/chrome/browser/geolocation/geolocation_permission_context_android.cc#newcode36 chrome/browser/geolocation/geolocation_permission_context_android.cc:36: bool gHasDSEOriginForTesting ...
3 years, 9 months ago (2017-03-15 04:28:26 UTC) #7
benwells
https://codereview.chromium.org/2742373003/diff/1/chrome/browser/geolocation/geolocation_permission_context_android.cc File chrome/browser/geolocation/geolocation_permission_context_android.cc (right): https://codereview.chromium.org/2742373003/diff/1/chrome/browser/geolocation/geolocation_permission_context_android.cc#newcode36 chrome/browser/geolocation/geolocation_permission_context_android.cc:36: bool gHasDSEOriginForTesting = false; On 2017/03/15 04:28:25, raymes wrote: ...
3 years, 9 months ago (2017-03-15 23:10:49 UTC) #14
raymes
lgtm thanks! https://codereview.chromium.org/2742373003/diff/40001/chrome/browser/geolocation/geolocation_permission_context_android.cc File chrome/browser/geolocation/geolocation_permission_context_android.cc (right): https://codereview.chromium.org/2742373003/diff/40001/chrome/browser/geolocation/geolocation_permission_context_android.cc#newcode36 chrome/browser/geolocation/geolocation_permission_context_android.cc:36: const char* gDSEOriginForTesting; optional: not sure if ...
3 years, 9 months ago (2017-03-15 23:22:38 UTC) #15
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/2742373003/60001
3 years, 9 months ago (2017-03-16 03:48:33 UTC) #22
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/386811)
3 years, 9 months ago (2017-03-16 03:58:51 UTC) #24
benwells
+bauerb for prefs +tedchoc for location settings
3 years, 9 months ago (2017-03-16 04:15:17 UTC) #26
Bernhard Bauer
LGTM w/ some nits: https://codereview.chromium.org/2742373003/diff/60001/chrome/browser/geolocation/geolocation_permission_context_android.cc File chrome/browser/geolocation/geolocation_permission_context_android.cc (right): https://codereview.chromium.org/2742373003/diff/60001/chrome/browser/geolocation/geolocation_permission_context_android.cc#newcode34 chrome/browser/geolocation/geolocation_permission_context_android.cc:34: int gDayOffsetForTesting = 0; Nit: ...
3 years, 9 months ago (2017-03-16 16:19:35 UTC) #27
benwells
ping tedchoc
3 years, 9 months ago (2017-03-19 23:06:03 UTC) #28
Ted C
On 2017/03/19 23:06:03, benwells wrote: > ping tedchoc mock_location_settings - lgtm As a completely bogus ...
3 years, 9 months ago (2017-03-20 18:14:54 UTC) #29
benwells
On 2017/03/20 18:14:54, Ted C wrote: > On 2017/03/19 23:06:03, benwells wrote: > > ping ...
3 years, 9 months ago (2017-03-21 03:24:34 UTC) #30
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/2742373003/100001
3 years, 9 months ago (2017-03-21 06:23:36 UTC) #37
commit-bot: I haz the power
Committed patchset #6 (id:100001) as https://chromium.googlesource.com/chromium/src/+/0b3748a3344c72d94fa98e7bbc7f57be70c65a02
3 years, 9 months ago (2017-03-21 06:29:51 UTC) #40
benwells
3 years, 9 months ago (2017-03-22 06:17:25 UTC) #41
Message was sent while issue was closed.
(oops, forgot to send this before landing)

https://codereview.chromium.org/2742373003/diff/60001/chrome/browser/geolocat...
File chrome/browser/geolocation/geolocation_permission_context_android.cc
(right):

https://codereview.chromium.org/2742373003/diff/60001/chrome/browser/geolocat...
chrome/browser/geolocation/geolocation_permission_context_android.cc:34: int
gDayOffsetForTesting = 0;
On 2017/03/16 16:19:34, Bernhard (OOO until Mar 27) wrote:
> Nit: Globals are usually named g_underscore_style.

Done.

https://codereview.chromium.org/2742373003/diff/60001/chrome/browser/geolocat...
File chrome/browser/geolocation/geolocation_permission_context_android.h
(right):

https://codereview.chromium.org/2742373003/diff/60001/chrome/browser/geolocat...
chrome/browser/geolocation/geolocation_permission_context_android.h:91:
std::string LocationSettingsBackOffLevelPref(
On 2017/03/16 16:19:35, Bernhard (OOO until Mar 27) wrote:
> Nit: From the name it's not totally clear to me what the first two methods do;
> if you would prepend e.g. Get... here, it might already make it clearer.

Done.

Powered by Google App Engine
This is Rietveld 408576698