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

Issue 2624843003: Add support for cellular geolocation (Closed)

Created:
3 years, 11 months ago by can Skylar cook
Modified:
3 years, 10 months ago
CC:
stevenjb+watch_chromium.org, oshima+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add support for cellular geolocation Shill cellular devices now collect and report cell tower information (as of https://chromium-review.googlesource.com/#/c/412192/ ). This makes geolocation_handler aware of the changes, and provides a mechanism for consumers to query cell towers and wifi APNs separately. The geolocation handler now plucks the keys of interest out of the dictionary returned from shill's manager, rather than iterating and assuming each entry corresponds to a wifi access point. Use cell tower info in SimpleGeolocationProvider: it will now send cell tower information if available and the setting enabled. Cell towers and wifi APs are combined into a single management setting (as cell tower information should be less sensitive than wifi network information), but enables us to send them separately if so desired. BUG=b/30019266/ BUG=601174 TEST=Unittest verifying that requests are well-formed CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Review-Url: https://codereview.chromium.org/2624843003 Cr-Commit-Position: refs/heads/master@{#450183} Committed: https://chromium.googlesource.com/chromium/src/+/eaf50cbe0129bf60335274cdea2b8b95354cd0d2

Patch Set 1 #

Patch Set 2 : Add support for cellular geolocation #

Patch Set 3 : Add support for cellular geolocation #

Patch Set 4 : Add support for cellular geolocation #

Patch Set 5 : Use cell tower info in SimpleGeolocationProvider. #

Total comments: 18

Patch Set 6 : Add support for cellular geolocation #

Total comments: 22

Patch Set 7 : address comments #

Total comments: 6

Patch Set 8 : Add SEND_ALL_NETWORK_INFO option for timezone detection #

Total comments: 5

Patch Set 9 : Remove GetCellTowers, fix indicator flag logic #

Total comments: 18

Patch Set 10 : Change verbiage, simplify network functions #

Total comments: 15

Patch Set 11 : Fix policy enum, cleanup browser policy checks #

Total comments: 5

Patch Set 12 : fix oopsies #

Patch Set 13 : Update device tests to use correct dict key #

Unified diffs Side-by-side diffs Delta from patch set Stats (+622 lines, -165 lines) Patch
M chrome/browser/chromeos/login/wizard_controller.cc View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/chromeos/policy/proto/chrome_device_policy.proto View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/chromeos/system/timezone_resolver_manager.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/system/timezone_resolver_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +17 lines, -2 lines 0 comments Download
M chrome/browser/policy/policy_browsertest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/resources/options/browser_options.js View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M chromeos/geolocation/simple_geolocation_provider.h View 1 2 3 4 1 chunk +4 lines, -2 lines 0 comments Download
M chromeos/geolocation/simple_geolocation_provider.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +20 lines, -16 lines 0 comments Download
M chromeos/geolocation/simple_geolocation_request.h View 1 2 3 4 7 8 9 2 chunks +4 lines, -1 line 0 comments Download
M chromeos/geolocation/simple_geolocation_request.cc View 1 2 3 4 5 6 7 8 9 10 5 chunks +111 lines, -48 lines 0 comments Download
M chromeos/geolocation/simple_geolocation_unittest.cc View 1 2 3 4 5 6 7 8 9 10 17 chunks +138 lines, -35 lines 0 comments Download
M chromeos/network/geolocation_handler.h View 1 2 3 4 5 6 7 8 9 4 chunks +26 lines, -12 lines 0 comments Download
M chromeos/network/geolocation_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 7 chunks +122 lines, -38 lines 0 comments Download
M chromeos/network/geolocation_handler_unittest.cc View 1 2 3 4 5 6 7 8 6 chunks +101 lines, -8 lines 0 comments Download
M chromeos/network/network_util.h View 1 2 3 4 2 chunks +15 lines, -0 lines 0 comments Download
M chromeos/network/network_util.cc View 1 chunk +6 lines, -0 lines 0 comments Download
M chromeos/timezone/timezone_resolver.h View 1 2 3 4 2 chunks +6 lines, -0 lines 0 comments Download
M chromeos/timezone/timezone_resolver.cc View 1 2 3 4 5 6 7 4 chunks +14 lines, -0 lines 0 comments Download
M components/policy/resources/policy_templates.json View 1 2 3 4 5 6 7 8 9 10 3 chunks +9 lines, -2 lines 0 comments Download
M device/geolocation/wifi_data_provider_chromeos_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -1 line 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 2 chunks +14 lines, -0 lines 0 comments Download

Messages

Total messages: 61 (21 generated)
can Skylar cook
On 2017/02/02 20:22:27, can Skylar cook wrote: > Description was changed from > > ========== ...
3 years, 10 months ago (2017-02-02 20:35:06 UTC) #4
Ben Chan
https://codereview.chromium.org/2624843003/diff/80001/chromeos/geolocation/simple_geolocation_provider.cc File chromeos/geolocation/simple_geolocation_provider.cc (right): https://codereview.chromium.org/2624843003/diff/80001/chromeos/geolocation/simple_geolocation_provider.cc#newcode44 chromeos/geolocation/simple_geolocation_provider.cc:44: std::unique_ptr<CellTowerVector> result(new chromeos::CellTowerVector); auto result = base::MakeUnique<chromeos::CellTowerVector>(); https://codereview.chromium.org/2624843003/diff/80001/chromeos/geolocation/simple_geolocation_request.cc File ...
3 years, 10 months ago (2017-02-02 20:49:25 UTC) #5
can Skylar cook
https://codereview.chromium.org/2624843003/diff/80001/chromeos/geolocation/simple_geolocation_provider.cc File chromeos/geolocation/simple_geolocation_provider.cc (right): https://codereview.chromium.org/2624843003/diff/80001/chromeos/geolocation/simple_geolocation_provider.cc#newcode44 chromeos/geolocation/simple_geolocation_provider.cc:44: std::unique_ptr<CellTowerVector> result(new chromeos::CellTowerVector); On 2017/02/02 20:49:24, Ben Chan wrote: ...
3 years, 10 months ago (2017-02-03 00:15:20 UTC) #6
can Skylar cook
Adding stevenjb@ for OWNER approval, as alemate@ is out until Monday (and I'm sure backlogged ...
3 years, 10 months ago (2017-02-03 00:30:22 UTC) #9
stevenjb
https://codereview.chromium.org/2624843003/diff/100001/chromeos/geolocation/simple_geolocation_request.cc File chromeos/geolocation/simple_geolocation_request.cc (right): https://codereview.chromium.org/2624843003/diff/100001/chromeos/geolocation/simple_geolocation_request.cc#newcode48 chromeos/geolocation/simple_geolocation_request.cc:48: // Top-level request data fields That would be nice ...
3 years, 10 months ago (2017-02-03 02:12:03 UTC) #10
can Skylar cook
https://codereview.chromium.org/2624843003/diff/100001/chromeos/geolocation/simple_geolocation_request.cc File chromeos/geolocation/simple_geolocation_request.cc (right): https://codereview.chromium.org/2624843003/diff/100001/chromeos/geolocation/simple_geolocation_request.cc#newcode48 chromeos/geolocation/simple_geolocation_request.cc:48: // Top-level request data fields On 2017/02/03 02:12:02, stevenjb ...
3 years, 10 months ago (2017-02-03 21:47:07 UTC) #11
Alexander Alekseev
https://codereview.chromium.org/2624843003/diff/120001/chromeos/geolocation/simple_geolocation_provider.cc File chromeos/geolocation/simple_geolocation_provider.cc (right): https://codereview.chromium.org/2624843003/diff/120001/chromeos/geolocation/simple_geolocation_provider.cc#newcode75 chromeos/geolocation/simple_geolocation_provider.cc:75: send_cell_towers ? GetCellTowerData() : nullptr)); This is not optimal, ...
3 years, 10 months ago (2017-02-06 23:24:53 UTC) #12
can Skylar cook
Took a stab at adding the new policy setting. I believe the steps listed here ...
3 years, 10 months ago (2017-02-07 21:32:39 UTC) #14
stevenjb
https://codereview.chromium.org/2624843003/diff/120001/chromeos/geolocation/simple_geolocation_provider.cc File chromeos/geolocation/simple_geolocation_provider.cc (right): https://codereview.chromium.org/2624843003/diff/120001/chromeos/geolocation/simple_geolocation_provider.cc#newcode75 chromeos/geolocation/simple_geolocation_provider.cc:75: send_cell_towers ? GetCellTowerData() : nullptr)); On 2017/02/06 23:24:53, Alexander ...
3 years, 10 months ago (2017-02-07 21:37:53 UTC) #15
stevenjb
https://codereview.chromium.org/2624843003/diff/120001/chromeos/geolocation/simple_geolocation_request.cc File chromeos/geolocation/simple_geolocation_request.cc (right): https://codereview.chromium.org/2624843003/diff/120001/chromeos/geolocation/simple_geolocation_request.cc#newcode47 chromeos/geolocation/simple_geolocation_request.cc:47: // TODO(skylarc): kill these and use dbus-constants instead? On ...
3 years, 10 months ago (2017-02-07 21:39:38 UTC) #16
Alexander Alekseev
https://codereview.chromium.org/2624843003/diff/140001/chromeos/geolocation/simple_geolocation_provider.cc File chromeos/geolocation/simple_geolocation_provider.cc (right): https://codereview.chromium.org/2624843003/diff/140001/chromeos/geolocation/simple_geolocation_provider.cc#newcode74 chromeos/geolocation/simple_geolocation_provider.cc:74: auto network_info = GetNetworkInfo(send_wifi_access_points, send_cell_towers); GetNetworkInfo() ignores individual values ...
3 years, 10 months ago (2017-02-07 22:15:38 UTC) #17
can Skylar cook
https://codereview.chromium.org/2624843003/diff/140001/chromeos/geolocation/simple_geolocation_provider.cc File chromeos/geolocation/simple_geolocation_provider.cc (right): https://codereview.chromium.org/2624843003/diff/140001/chromeos/geolocation/simple_geolocation_provider.cc#newcode74 chromeos/geolocation/simple_geolocation_provider.cc:74: auto network_info = GetNetworkInfo(send_wifi_access_points, send_cell_towers); On 2017/02/07 22:15:38, Alexander ...
3 years, 10 months ago (2017-02-07 22:29:59 UTC) #18
stevenjb
https://codereview.chromium.org/2624843003/diff/160001/chrome/browser/chromeos/system/timezone_resolver_manager.cc File chrome/browser/chromeos/system/timezone_resolver_manager.cc (right): https://codereview.chromium.org/2624843003/diff/160001/chrome/browser/chromeos/system/timezone_resolver_manager.cc#newcode134 chrome/browser/chromeos/system/timezone_resolver_manager.cc:134: enterprise_management::SystemTimezoneProto::SEND_WIFI_ACCESS_POINTS); Should this be | SEND_ALL_NETWORK_INFO ? https://codereview.chromium.org/2624843003/diff/160001/chrome/browser/chromeos/system/timezone_resolver_manager.cc#newcode142 chrome/browser/chromeos/system/timezone_resolver_manager.cc:142: ...
3 years, 10 months ago (2017-02-07 23:54:29 UTC) #19
can Skylar cook
Comments addressed, updated verbiage as per launch tracker issue: https://bugs.chromium.org/p/chromium/issues/detail?id=685373#c8 https://codereview.chromium.org/2624843003/diff/160001/chrome/browser/chromeos/system/timezone_resolver_manager.cc File chrome/browser/chromeos/system/timezone_resolver_manager.cc (right): https://codereview.chromium.org/2624843003/diff/160001/chrome/browser/chromeos/system/timezone_resolver_manager.cc#newcode134 ...
3 years, 10 months ago (2017-02-08 21:15:49 UTC) #20
can Skylar cook
Adding a few policy owners: atwilson, bartfab, and emaxx. Can you PTAL at the policy ...
3 years, 10 months ago (2017-02-08 21:59:00 UTC) #24
can Skylar cook
Adding a few policy owners: atwilson, bartfab, and emaxx. Can you PTAL at the policy ...
3 years, 10 months ago (2017-02-08 21:59:03 UTC) #25
Alexander Alekseev
On 2017/02/08 21:59:03, can Skylar cook wrote: > Adding a few policy owners: atwilson, bartfab, ...
3 years, 10 months ago (2017-02-08 22:07:52 UTC) #26
Alexander Alekseev
https://codereview.chromium.org/2624843003/diff/140001/chromeos/network/geolocation_handler.h File chromeos/network/geolocation_handler.h (right): https://codereview.chromium.org/2624843003/diff/140001/chromeos/network/geolocation_handler.h#newcode59 chromeos/network/geolocation_handler.h:59: bool GetCellTowers(CellTowerVector* cell_towers, int64_t* age_ms); On 2017/02/07 22:29:59, can ...
3 years, 10 months ago (2017-02-08 22:10:32 UTC) #27
can Skylar cook
On 2017/02/08 22:10:32, Alexander Alekseev wrote: > https://codereview.chromium.org/2624843003/diff/140001/chromeos/network/geolocation_handler.h > File chromeos/network/geolocation_handler.h (right): > > https://codereview.chromium.org/2624843003/diff/140001/chromeos/network/geolocation_handler.h#newcode59 ...
3 years, 10 months ago (2017-02-08 22:12:28 UTC) #28
Alexander Alekseev
On 2017/02/08 22:12:28, can Skylar cook wrote: > On 2017/02/08 22:10:32, Alexander Alekseev wrote: > ...
3 years, 10 months ago (2017-02-08 22:29:04 UTC) #29
Alexander Alekseev
lgtm with nits. https://codereview.chromium.org/2624843003/diff/180001/chromeos/geolocation/simple_geolocation_request.cc File chromeos/geolocation/simple_geolocation_request.cc (right): https://codereview.chromium.org/2624843003/diff/180001/chromeos/geolocation/simple_geolocation_request.cc#newcode44 chromeos/geolocation/simple_geolocation_request.cc:44: // The full request text. (no ...
3 years, 10 months ago (2017-02-08 22:43:55 UTC) #30
stevenjb (google-dont-use)
looks good, just a couple more suggestions. https://codereview.chromium.org/2624843003/diff/180001/chrome/browser/chromeos/system/timezone_resolver_manager.cc File chrome/browser/chromeos/system/timezone_resolver_manager.cc (right): https://codereview.chromium.org/2624843003/diff/180001/chrome/browser/chromeos/system/timezone_resolver_manager.cc#newcode158 chrome/browser/chromeos/system/timezone_resolver_manager.cc:158: AutomaticTimezoneDetectionType_MAX); Sorry, ...
3 years, 10 months ago (2017-02-09 00:13:29 UTC) #32
Andrew T Wilson (Slow)
policy LGTM with one nit. You will need to also file a buganizer issue to ...
3 years, 10 months ago (2017-02-09 09:32:47 UTC) #33
can Skylar cook
https://codereview.chromium.org/2624843003/diff/180001/chrome/browser/chromeos/system/timezone_resolver_manager.cc File chrome/browser/chromeos/system/timezone_resolver_manager.cc (right): https://codereview.chromium.org/2624843003/diff/180001/chrome/browser/chromeos/system/timezone_resolver_manager.cc#newcode158 chrome/browser/chromeos/system/timezone_resolver_manager.cc:158: AutomaticTimezoneDetectionType_MAX); On 2017/02/09 00:13:28, stevenjb (google-dont-use) wrote: > Sorry, ...
3 years, 10 months ago (2017-02-09 19:44:30 UTC) #34
Alexander Alekseev
https://codereview.chromium.org/2624843003/diff/180001/chromeos/geolocation/simple_geolocation_unittest.cc File chromeos/geolocation/simple_geolocation_unittest.cc (right): https://codereview.chromium.org/2624843003/diff/180001/chromeos/geolocation/simple_geolocation_unittest.cc#newcode457 chromeos/geolocation/simple_geolocation_unittest.cc:457: EXPECT_TRUE(GetWifiAccessPoints()); On 2017/02/09 19:44:30, can Skylar cook wrote: > ...
3 years, 10 months ago (2017-02-09 19:54:56 UTC) #35
can Skylar cook
https://codereview.chromium.org/2624843003/diff/180001/chromeos/geolocation/simple_geolocation_unittest.cc File chromeos/geolocation/simple_geolocation_unittest.cc (right): https://codereview.chromium.org/2624843003/diff/180001/chromeos/geolocation/simple_geolocation_unittest.cc#newcode457 chromeos/geolocation/simple_geolocation_unittest.cc:457: EXPECT_TRUE(GetWifiAccessPoints()); On 2017/02/09 19:54:56, Alexander Alekseev wrote: > On ...
3 years, 10 months ago (2017-02-09 19:59:35 UTC) #36
stevenjb
https://codereview.chromium.org/2624843003/diff/200001/chrome/browser/chromeos/system/timezone_resolver_manager.cc File chrome/browser/chromeos/system/timezone_resolver_manager.cc (right): https://codereview.chromium.org/2624843003/diff/200001/chrome/browser/chromeos/system/timezone_resolver_manager.cc#newcode137 chrome/browser/chromeos/system/timezone_resolver_manager.cc:137: enterprise_management::SystemTimezoneProto::SEND_ALL_LOCATION_INFO)); This still calls GetTimezoneManagementSetting() twice. You need a ...
3 years, 10 months ago (2017-02-09 20:12:52 UTC) #37
Alexander Alekseev
https://codereview.chromium.org/2624843003/diff/180001/chromeos/geolocation/simple_geolocation_unittest.cc File chromeos/geolocation/simple_geolocation_unittest.cc (right): https://codereview.chromium.org/2624843003/diff/180001/chromeos/geolocation/simple_geolocation_unittest.cc#newcode457 chromeos/geolocation/simple_geolocation_unittest.cc:457: EXPECT_TRUE(GetWifiAccessPoints()); On 2017/02/09 19:59:35, can Skylar cook wrote: > ...
3 years, 10 months ago (2017-02-09 20:30:39 UTC) #38
can Skylar cook
https://codereview.chromium.org/2624843003/diff/200001/chrome/browser/chromeos/system/timezone_resolver_manager.cc File chrome/browser/chromeos/system/timezone_resolver_manager.cc (right): https://codereview.chromium.org/2624843003/diff/200001/chrome/browser/chromeos/system/timezone_resolver_manager.cc#newcode137 chrome/browser/chromeos/system/timezone_resolver_manager.cc:137: enterprise_management::SystemTimezoneProto::SEND_ALL_LOCATION_INFO)); On 2017/02/09 20:12:52, stevenjb wrote: > This still ...
3 years, 10 months ago (2017-02-09 21:10:45 UTC) #39
stevenjb
lgtm
3 years, 10 months ago (2017-02-09 23:29:22 UTC) #40
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/2624843003/220001
3 years, 10 months ago (2017-02-10 23:27:24 UTC) #43
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/362072)
3 years, 10 months ago (2017-02-10 23:39:30 UTC) #45
can Skylar cook
Adding OWNERS for histograms, Steven and Ilya can you PTAL?
3 years, 10 months ago (2017-02-11 00:36:37 UTC) #47
Ilya Sherman
histograms lgtm
3 years, 10 months ago (2017-02-11 00:47:01 UTC) #48
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/2624843003/220001
3 years, 10 months ago (2017-02-11 00:48:27 UTC) #50
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_ozone_rel_ng/builds/319861)
3 years, 10 months ago (2017-02-11 01:40:29 UTC) #52
can Skylar cook
mcasas or mvanouwerkerk : PTAL at the device tests -- we're now fetching locations by ...
3 years, 10 months ago (2017-02-13 22:38:44 UTC) #54
mcasas
On 2017/02/13 22:38:44, can Skylar cook wrote: > mcasas or mvanouwerkerk : > > PTAL ...
3 years, 10 months ago (2017-02-13 22:52:19 UTC) #55
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/2624843003/240001
3 years, 10 months ago (2017-02-13 22:59:12 UTC) #58
commit-bot: I haz the power
3 years, 10 months ago (2017-02-14 01:17:07 UTC) #61
Message was sent while issue was closed.
Committed patchset #13 (id:240001) as
https://chromium.googlesource.com/chromium/src/+/eaf50cbe0129bf60335274cdea2b...

Powered by Google App Engine
This is Rietveld 408576698