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

Issue 2038753004: Add a LocationUtils class to give all Chromium Android code access to location helpers. (Closed)

Created:
4 years, 6 months ago by Jeffrey Yasskin
Modified:
4 years, 5 months ago
CC:
chromium-reviews, Michael van Ouwerkerk, ortuno+watch_chromium.org, scheib+watch_chromium.org, Torne
Base URL:
https://chromium.googlesource.com/chromium/src.git@lkcr
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add a components.location.LocationUtils class to give all Chromium Android code access to location helpers. This class currently helps code check if Chrome has permission to access location and if location is turned on for the device. Committed: https://crrev.com/a082f486985a4631ce3db3329874b9834e369e4d Committed: https://crrev.com/847bd1803edc5cebaf4047fb7c75f55b2c5727ab Cr-Original-Commit-Position: refs/heads/master@{#402319} Cr-Commit-Position: refs/heads/master@{#402833}

Patch Set 1 #

Patch Set 2 : Remove some methods from LocationSettings. #

Total comments: 5

Patch Set 3 : Create a location component instead of adding to base. #

Patch Set 4 : Use LOCATION_MODE instead of isProviderEnabled. #

Total comments: 1

Patch Set 5 : Handle SDKs 16, 17, and 18. #

Patch Set 6 : Add a LocationUtils factory for embedders to use. #

Patch Set 7 : Replace setInstanceForTesting with uses of setFactory. #

Total comments: 7

Patch Set 8 : Fix Ted's comments. #

Patch Set 9 : Adjust DEPS. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+201 lines, -100 lines) Patch
M chrome/android/BUILD.gn View 1 2 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/android/java/DEPS View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/BluetoothChooserDialog.java View 1 2 3 4 5 6 7 3 chunks +4 lines, -4 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/pageinfo/WebsiteSettingsPopup.java View 1 2 3 chunks +4 lines, -11 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebDiagnosticsPage.java View 1 2 3 4 5 6 7 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebUma.java View 1 2 3 4 5 6 7 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/physicalweb/Utils.java View 2 chunks +0 lines, -18 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/preferences/LocationSettings.java View 1 2 3 4 5 6 7 5 chunks +10 lines, -30 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/preferences/SearchEngineAdapter.java View 1 2 3 4 3 chunks +4 lines, -4 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/preferences/website/LocationCategory.java View 1 2 3 chunks +5 lines, -2 lines 0 comments Download
M chrome/android/javatests/DEPS View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/BluetoothChooserDialogTest.java View 1 2 3 4 5 6 7 7 chunks +28 lines, -4 lines 0 comments Download
M chrome/test/android/BUILD.gn View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M chrome/test/android/javatests/src/org/chromium/chrome/test/util/browser/LocationSettingsTestUtil.java View 1 2 3 4 5 6 2 chunks +11 lines, -4 lines 0 comments Download
A + components/location/OWNERS View 1 2 1 chunk +1 line, -0 lines 0 comments Download
A + components/location/android/BUILD.gn View 1 2 1 chunk +4 lines, -4 lines 0 comments Download
A components/location/android/java/src/org/chromium/components/location/LocationUtils.java View 1 2 3 4 5 6 7 1 chunk +104 lines, -0 lines 0 comments Download
M device/bluetooth/BUILD.gn View 1 2 1 chunk +1 line, -0 lines 0 comments Download
A device/bluetooth/android/java/DEPS View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -0 lines 0 comments Download
M device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothAdapter.java View 1 2 3 4 5 6 7 2 chunks +2 lines, -3 lines 0 comments Download
M device/bluetooth/android/java/src/org/chromium/device/bluetooth/Wrappers.java View 1 2 3 4 5 6 7 2 chunks +3 lines, -4 lines 2 comments Download
M device/bluetooth/test/android/java/src/org/chromium/device/bluetooth/Fakes.java View 1 2 3 4 5 6 7 4 chunks +4 lines, -8 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 63 (26 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2038753004/1
4 years, 6 months ago (2016-06-04 00:48:40 UTC) #2
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2038753004/20001
4 years, 6 months ago (2016-06-04 01:32:02 UTC) #4
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-04 03:16:56 UTC) #6
Jeffrey Yasskin
I'm using these functions in https://codereview.chromium.org/2032273002/, and to avoid duplicating the right techniques for dealing ...
4 years, 6 months ago (2016-06-06 15:53:48 UTC) #8
Torne
Does this really need to go into base? The discussion on the other CL suggests ...
4 years, 6 months ago (2016-06-07 11:30:43 UTC) #9
Jeffrey Yasskin
https://codereview.chromium.org/2038753004/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/preferences/LocationSettings.java File chrome/android/java/src/org/chromium/chrome/browser/preferences/LocationSettings.java (right): https://codereview.chromium.org/2038753004/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/preferences/LocationSettings.java#newcode27 chrome/android/java/src/org/chromium/chrome/browser/preferences/LocationSettings.java:27: public class LocationSettings { Ted, I'm having trouble finding ...
4 years, 6 months ago (2016-06-07 15:56:11 UTC) #10
Torne
On 2016/06/07 15:56:11, Jeffrey Yasskin wrote: > https://codereview.chromium.org/2038753004/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/preferences/LocationSettings.java > File > chrome/android/java/src/org/chromium/chrome/browser/preferences/LocationSettings.java > (right): > ...
4 years, 6 months ago (2016-06-09 13:19:39 UTC) #11
Jeffrey Yasskin
On 2016/06/09 13:19:39, Torne wrote: > On 2016/06/07 15:56:11, Jeffrey Yasskin wrote: > > > ...
4 years, 6 months ago (2016-06-09 15:36:00 UTC) #12
Torne
On 2016/06/09 15:36:00, Jeffrey Yasskin wrote: > On 2016/06/09 13:19:39, Torne wrote: > > On ...
4 years, 6 months ago (2016-06-09 15:39:00 UTC) #13
Jeffrey Yasskin
Thanks Torne for suggesting a better place. +blundell@ as a components/ owner, and Ted to ...
4 years, 6 months ago (2016-06-09 22:08:11 UTC) #17
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2038753004/60001
4 years, 6 months ago (2016-06-09 22:09:05 UTC) #19
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_compile_dbg_ng on tryserver.chromium.mac (JOB_TIMED_OUT, no build URL) ...
4 years, 6 months ago (2016-06-10 00:11:36 UTC) #21
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2038753004/80001
4 years, 6 months ago (2016-06-10 00:20:13 UTC) #23
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_compile_dbg_ng on tryserver.chromium.mac (JOB_TIMED_OUT, no build URL) ...
4 years, 6 months ago (2016-06-10 02:21:44 UTC) #25
blundell
lgtm
4 years, 6 months ago (2016-06-10 08:38:58 UTC) #26
Ted C
lgtm w/ some naming suggestions https://codereview.chromium.org/2038753004/diff/120001/components/location/android/java/src/org/chromium/components/location/LocationUtils.java File components/location/android/java/src/org/chromium/components/location/LocationUtils.java (right): https://codereview.chromium.org/2038753004/diff/120001/components/location/android/java/src/org/chromium/components/location/LocationUtils.java#newcode57 components/location/android/java/src/org/chromium/components/location/LocationUtils.java:57: * Check both chromeHasLocationPermission() ...
4 years, 6 months ago (2016-06-13 19:56:21 UTC) #27
Finnur
You probably don't need my approval, given Ted's green light, but I reviewed selective files ...
4 years, 6 months ago (2016-06-16 13:44:44 UTC) #28
Jeffrey Yasskin
Vince, PTAL at device/bluetooth. https://codereview.chromium.org/2038753004/diff/120001/components/location/android/java/src/org/chromium/components/location/LocationUtils.java File components/location/android/java/src/org/chromium/components/location/LocationUtils.java (right): https://codereview.chromium.org/2038753004/diff/120001/components/location/android/java/src/org/chromium/components/location/LocationUtils.java#newcode57 components/location/android/java/src/org/chromium/components/location/LocationUtils.java:57: * Check both chromeHasLocationPermission() and ...
4 years, 6 months ago (2016-06-16 16:02:33 UTC) #30
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2038753004/140001
4 years, 6 months ago (2016-06-16 16:03:11 UTC) #32
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/247600)
4 years, 6 months ago (2016-06-16 18:32:37 UTC) #34
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2038753004/160001
4 years, 6 months ago (2016-06-17 06:13:57 UTC) #36
Jeffrey Yasskin
FYI, I had to update several DEPS files to depend on /components/location.
4 years, 6 months ago (2016-06-17 06:15:29 UTC) #37
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-17 07:38:55 UTC) #39
scheib
https://codereview.chromium.org/2038753004/diff/160001/device/bluetooth/android/java/src/org/chromium/device/bluetooth/Wrappers.java File device/bluetooth/android/java/src/org/chromium/device/bluetooth/Wrappers.java (right): https://codereview.chromium.org/2038753004/diff/160001/device/bluetooth/android/java/src/org/chromium/device/bluetooth/Wrappers.java#newcode165 device/bluetooth/android/java/src/org/chromium/device/bluetooth/Wrappers.java:165: public boolean hasAndroidLocationPermission() { The wrappers were designed to ...
4 years, 6 months ago (2016-06-22 19:36:50 UTC) #40
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2038753004/160001
4 years, 5 months ago (2016-06-27 20:58:29 UTC) #42
ortuno
Seems we can no longer take over someone else's CL... I'll land this and address ...
4 years, 5 months ago (2016-06-27 21:05:53 UTC) #43
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 5 months ago (2016-06-27 22:35:34 UTC) #45
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/2038753004/160001
4 years, 5 months ago (2016-06-27 22:38:35 UTC) #48
commit-bot: I haz the power
Committed patchset #9 (id:160001)
4 years, 5 months ago (2016-06-27 22:51:48 UTC) #50
commit-bot: I haz the power
Patchset 9 (id:??) landed as https://crrev.com/a082f486985a4631ce3db3329874b9834e369e4d Cr-Commit-Position: refs/heads/master@{#402319}
4 years, 5 months ago (2016-06-27 22:54:41 UTC) #52
Khushal
A revert of this CL (patchset #9 id:160001) has been created in https://codereview.chromium.org/2105573002/ by khushalsagar@chromium.org. ...
4 years, 5 months ago (2016-06-28 00:34:27 UTC) #53
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2038753004/160001
4 years, 5 months ago (2016-06-29 14:41:22 UTC) #55
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 5 months ago (2016-06-29 16:09:04 UTC) #57
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/2038753004/160001
4 years, 5 months ago (2016-06-29 16:14:12 UTC) #59
commit-bot: I haz the power
Committed patchset #9 (id:160001)
4 years, 5 months ago (2016-06-29 16:19:24 UTC) #60
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-06-29 16:19:28 UTC) #61
commit-bot: I haz the power
4 years, 5 months ago (2016-06-29 16:22:36 UTC) #63
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/847bd1803edc5cebaf4047fb7c75f55b2c5727ab
Cr-Commit-Position: refs/heads/master@{#402833}

Powered by Google App Engine
This is Rietveld 408576698