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

Issue 454253002: Location chooser (Closed)

Created:
6 years, 4 months ago by mhm
Modified:
5 years, 5 months ago
Reviewers:
jww, felt, meacer
CC:
felt, chromium-reviews, asanka, feature-media-reviews_chromium.org, benjhayden+dwatch_chromium.org, tfarina, mcasas+watch_chromium.org, posciak+watch_chromium.org, markusheintz_, wjia+watch_chromium.org, miu+watch_chromium.org, jww
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

The user can specify the granularity/precision of the location shared with websites. Currently the user can either allow/deny any location sharing request. This patch aim to empower users by giving them the ability to share different precision levels of their location in four different levels: * Street address. * City only. * State only. * Country only. This is only designed to be part of the user flow when geolocation is requested by a website. Also, since we are moving from infoBars to bubbles, the implementation is based on top of the permission bubbles UI. BUG=401700 R=meacer, jww

Patch Set 1 #

Total comments: 4

Patch Set 2 : Communicating the user choice all the way to the location provider #

Patch Set 3 : Adding the location modification according the user choice #

Patch Set 4 : Swapping to address InfoBar currying callback case #

Total comments: 39

Patch Set 5 : Addressing meacer@ comments #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+274 lines, -50 lines) Patch
M chrome/app/generated_resources.grd View 1 chunk +9 lines, -0 lines 0 comments Download
M chrome/browser/chrome_content_browser_client.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/chrome_quota_permission_context.cc View 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/content_settings/permission_bubble_request_impl.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/content_settings/permission_bubble_request_impl.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/custom_handlers/register_protocol_handler_permission_request.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/custom_handlers/register_protocol_handler_permission_request.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/download/download_permission_request.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/download/download_permission_request.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/geolocation/geolocation_permission_context.h View 1 2 3 4 chunks +13 lines, -4 lines 0 comments Download
M chrome/browser/geolocation/geolocation_permission_context.cc View 1 2 3 4 12 chunks +71 lines, -16 lines 2 comments Download
M chrome/browser/geolocation/geolocation_permission_context_extensions.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/geolocation/geolocation_permission_context_extensions.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/geolocation/geolocation_permission_context_unittest.cc View 1 2 3 4 2 chunks +5 lines, -2 lines 1 comment Download
M chrome/browser/guest_view/web_view/web_view_permission_helper.h View 1 2 3 2 chunks +6 lines, -5 lines 0 comments Download
M chrome/browser/guest_view/web_view/web_view_permission_helper.cc View 1 2 3 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/media/media_stream_devices_controller.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/media/media_stream_devices_controller.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/website_settings/permissions_bubble_view.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/views/website_settings/permissions_bubble_view.cc View 1 2 3 4 7 chunks +72 lines, -9 lines 1 comment Download
M chrome/browser/ui/website_settings/mock_permission_bubble_request.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/website_settings/mock_permission_bubble_request.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/website_settings/permission_bubble_manager.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/website_settings/permission_bubble_manager.cc View 1 2 chunks +10 lines, -1 line 0 comments Download
M chrome/browser/ui/website_settings/permission_bubble_request.h View 1 2 2 chunks +6 lines, -0 lines 0 comments Download
M chrome/browser/ui/website_settings/permission_bubble_view.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/geolocation/geolocation_dispatcher_host.h View 1 2 3 2 chunks +4 lines, -0 lines 0 comments Download
M content/browser/geolocation/geolocation_dispatcher_host.cc View 1 2 3 4 4 chunks +6 lines, -3 lines 0 comments Download
M content/public/browser/content_browser_client.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M content/public/browser/content_browser_client.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M content/public/common/geoposition.h View 1 2 3 4 1 chunk +4 lines, -0 lines 1 comment Download
M content/public/common/geoposition.cc View 1 2 3 4 2 chunks +26 lines, -0 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
mhm
Mustafa .. This is the UI part of the location chooser. It is a little ...
6 years, 4 months ago (2014-08-09 01:36:40 UTC) #1
meacer
On 2014/08/09 01:36:40, mhm wrote: > Mustafa .. > > This is the UI part ...
6 years, 4 months ago (2014-08-11 18:15:37 UTC) #2
meacer
(forgot to send the comments) https://codereview.chromium.org/454253002/diff/1/chrome/browser/ui/views/website_settings/permissions_bubble_view.cc File chrome/browser/ui/views/website_settings/permissions_bubble_view.cc (right): https://codereview.chromium.org/454253002/diff/1/chrome/browser/ui/views/website_settings/permissions_bubble_view.cc#newcode175 chrome/browser/ui/views/website_settings/permissions_bubble_view.cc:175: INDEX_ALLOW = 0, I ...
6 years, 4 months ago (2014-08-11 18:15:50 UTC) #3
mhm
Added the part that communicate the user choice all the way to the location provider. ...
6 years, 4 months ago (2014-08-13 20:48:22 UTC) #4
mhm
meacer@, can you please have a quick look at this last patch for me.
6 years, 4 months ago (2014-08-15 21:45:35 UTC) #5
meacer
Looks good. I'm not sure if you are planning to land this, if so you'll ...
6 years, 4 months ago (2014-08-15 22:20:25 UTC) #6
Michael van Ouwerkerk
If you intend to submit this patch, I could take a look at it. Also, ...
6 years, 4 months ago (2014-08-15 23:05:43 UTC) #7
mhm
https://codereview.chromium.org/454253002/diff/50001/chrome/app/generated_resources.grd File chrome/app/generated_resources.grd (right): https://codereview.chromium.org/454253002/diff/50001/chrome/app/generated_resources.grd#newcode432 chrome/app/generated_resources.grd:432: + <message name="IDS_PERMISSION_CITY" desc="Label on text button to allow ...
6 years, 4 months ago (2014-08-15 23:18:57 UTC) #8
felt
https://codereview.chromium.org/454253002/diff/50001/chrome/browser/geolocation/geolocation_permission_context.cc File chrome/browser/geolocation/geolocation_permission_context.cc (right): https://codereview.chromium.org/454253002/diff/50001/chrome/browser/geolocation/geolocation_permission_context.cc#newcode236 chrome/browser/geolocation/geolocation_permission_context.cc:236: // (mhm) fix. On 2014/08/15 23:18:56, mhm wrote: > ...
6 years, 4 months ago (2014-08-15 23:20:16 UTC) #9
meacer
6 years, 4 months ago (2014-08-15 23:34:46 UTC) #10
https://codereview.chromium.org/454253002/diff/70001/chrome/browser/geolocati...
File chrome/browser/geolocation/geolocation_permission_context.cc (right):

https://codereview.chromium.org/454253002/diff/70001/chrome/browser/geolocati...
chrome/browser/geolocation/geolocation_permission_context.cc:333: //
TODO(mohamed) the geolocation precision need to be passed to content
mohamed -> mohammed :) (or the engineer who'll take ownership as felt said)

https://codereview.chromium.org/454253002/diff/70001/chrome/browser/geolocati...
chrome/browser/geolocation/geolocation_permission_context.cc:339:
callback.Run(allowed, choice);
This doesn't look right. The callback takes (int, bool) but you are passing
(allowed, choice)?

It would be better to make all callbacks Callback<void(bool,int)> and then pass
allowed, choice in that order, everywhere.

https://codereview.chromium.org/454253002/diff/70001/chrome/browser/geolocati...
File chrome/browser/geolocation/geolocation_permission_context_unittest.cc
(right):

https://codereview.chromium.org/454253002/diff/70001/chrome/browser/geolocati...
chrome/browser/geolocation/geolocation_permission_context_unittest.cc:191: //
(mohammed) test choice.
nit: TODO(mohammed):

https://codereview.chromium.org/454253002/diff/70001/chrome/browser/ui/views/...
File chrome/browser/ui/views/website_settings/permissions_bubble_view.cc
(right):

https://codereview.chromium.org/454253002/diff/70001/chrome/browser/ui/views/...
chrome/browser/ui/views/website_settings/permissions_bubble_view.cc:373: // the
ability to specifiy the precision of the shared location.
specifiy -> specify

https://codereview.chromium.org/454253002/diff/70001/content/public/common/ge...
File content/public/common/geoposition.h (right):

https://codereview.chromium.org/454253002/diff/70001/content/public/common/ge...
content/public/common/geoposition.h:40: const int precisions);
precisions -> precision

Powered by Google App Engine
This is Rietveld 408576698