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

Issue 1216583003: Adding Hashed Address to BluetoothLowEnergyDeviceMac (Closed)

Created:
5 years, 5 months ago by krstnmnlsn
Modified:
5 years, 5 months ago
CC:
chromium-reviews, scheib+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@timeinfo
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Using a truncated SHA256 hash to deterministically map CBPeripheral identifiers to addresses for use within Chrome. Note that this is a temporary fix to allow indexing of mac BLE devices in the |devices_| list, and not intended to provide any additional security. BluetoothLowEnergyDeviceMac instances now return a hashed address on calls to GetAddress(). Also split BluetoothAdapterMac::UpdateDevices() into RemoveTimedOutDevices() and AddPairedDevices(), so that Classic devices would not be discovered and added to |devices_| when UpdateDevices() was called during testing. Removed call to PollAdapter() in BluetoothAdapterMac::InitForTest() for the same reason. BUG=506248 Committed: https://crrev.com/332a71cf170683203765842710ea3da4f5a1cf22 Cr-Commit-Position: refs/heads/master@{#339295}

Patch Set 1 : #

Total comments: 9

Patch Set 2 : Scheib's fixes +memory management in the unittests #

Patch Set 3 : shortening a signature.. #

Total comments: 10

Patch Set 4 : arman comments #

Total comments: 4

Patch Set 5 : fixing gyp and gn for windows #

Patch Set 6 : compiles on OS X 10.6 #

Total comments: 6

Patch Set 7 : rsesek comments #

Patch Set 8 : pulled in origin/master #

Total comments: 2

Patch Set 9 : agl comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+209 lines, -29 lines) Patch
M device/BUILD.gn View 1 2 3 4 2 chunks +3 lines, -1 line 0 comments Download
M device/DEPS View 1 chunk +1 line, -0 lines 0 comments Download
M device/bluetooth/BUILD.gn View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M device/bluetooth/DEPS View 1 chunk +1 line, -0 lines 0 comments Download
M device/bluetooth/bluetooth.gyp View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M device/bluetooth/bluetooth_adapter_mac.h View 1 2 3 4 5 6 3 chunks +17 lines, -9 lines 0 comments Download
M device/bluetooth/bluetooth_adapter_mac.mm View 1 2 3 4 5 6 7 5 chunks +19 lines, -13 lines 0 comments Download
M device/bluetooth/bluetooth_adapter_mac_unittest.mm View 1 2 3 4 5 6 4 chunks +104 lines, -0 lines 0 comments Download
M device/bluetooth/bluetooth_low_energy_device_mac.h View 1 2 3 4 5 3 chunks +22 lines, -3 lines 0 comments Download
M device/bluetooth/bluetooth_low_energy_device_mac.mm View 1 2 3 4 5 6 7 8 6 chunks +32 lines, -3 lines 0 comments Download
M device/device_tests.gyp View 1 2 3 4 1 chunk +8 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 74 (45 generated)
krstnmnlsn
This change technically just adds hashing, though a few other changes / refactorings had to ...
5 years, 5 months ago (2015-07-01 16:45:50 UTC) #5
scheib
More Mac savvy reviewers should scrutinize, but LGTM with a few comment changes, and GN ...
5 years, 5 months ago (2015-07-01 17:29:44 UTC) #6
krstnmnlsn
Sending out CL updates 5PM before a long weekend... Vincent: Thanks for the review! Arman: ...
5 years, 5 months ago (2015-07-02 00:25:30 UTC) #9
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1216583003/120001
5 years, 5 months ago (2015-07-07 17:25:20 UTC) #12
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_compile_dbg_32_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_compile_dbg_32_ng/builds/70338) ios_dbg_simulator_ninja on ...
5 years, 5 months ago (2015-07-07 17:29:32 UTC) #14
armansito
Generating random BD_ADDRs from NSUUID is a bit weird to me. Why don't we just ...
5 years, 5 months ago (2015-07-07 19:07:21 UTC) #15
krstnmnlsn
Thanks Arman! Comments addressed and here is an issue about the identifiers change: http://crbug.com/507824 (also ...
5 years, 5 months ago (2015-07-07 21:58:01 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/1216583003/160001
5 years, 5 months ago (2015-07-07 22:07:30 UTC) #20
armansito
lgtm with nits https://codereview.chromium.org/1216583003/diff/160001/device/bluetooth/bluetooth_adapter_mac.mm File device/bluetooth/bluetooth_adapter_mac.mm (right): https://codereview.chromium.org/1216583003/diff/160001/device/bluetooth/bluetooth_adapter_mac.mm#newcode38 device/bluetooth/bluetooth_adapter_mac.mm:38: const NSTimeInterval BluetoothAdapterMac::kDiscoveryTimeoutSec = nit: Add ...
5 years, 5 months ago (2015-07-07 22:07:54 UTC) #21
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/77651) win_chromium_x64_rel_ng on ...
5 years, 5 months ago (2015-07-07 22:19:26 UTC) #23
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1216583003/180001
5 years, 5 months ago (2015-07-07 22:42:54 UTC) #26
krstnmnlsn
nits done https://codereview.chromium.org/1216583003/diff/160001/device/bluetooth/bluetooth_adapter_mac.mm File device/bluetooth/bluetooth_adapter_mac.mm (right): https://codereview.chromium.org/1216583003/diff/160001/device/bluetooth/bluetooth_adapter_mac.mm#newcode38 device/bluetooth/bluetooth_adapter_mac.mm:38: const NSTimeInterval BluetoothAdapterMac::kDiscoveryTimeoutSec = On 2015/07/07 22:07:54, ...
5 years, 5 months ago (2015-07-07 22:43:10 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1216583003/180001
5 years, 5 months ago (2015-07-07 23:40:27 UTC) #30
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/84852)
5 years, 5 months ago (2015-07-08 00:37:47 UTC) #32
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1216583003/200001
5 years, 5 months ago (2015-07-08 01:04:28 UTC) #35
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_compile_dbg_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/71219)
5 years, 5 months ago (2015-07-08 01:31:09 UTC) #37
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1216583003/300001
5 years, 5 months ago (2015-07-09 02:02:15 UTC) #45
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_compile_dbg_32_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_compile_dbg_32_ng/builds/71275) ios_dbg_simulator_ninja on ...
5 years, 5 months ago (2015-07-09 02:06:01 UTC) #47
krstnmnlsn
@rsesek: I used OCMock in the bluetooth_adapter_mac_unittest.mm file, creating a mock peripheral. Please owners review. ...
5 years, 5 months ago (2015-07-16 16:33:14 UTC) #61
Robert Sesek
https://codereview.chromium.org/1216583003/diff/540001/device/bluetooth/bluetooth_adapter_mac.h File device/bluetooth/bluetooth_adapter_mac.h (right): https://codereview.chromium.org/1216583003/diff/540001/device/bluetooth/bluetooth_adapter_mac.h#newcode136 device/bluetooth/bluetooth_adapter_mac.h:136: NSDictionary* advertisementData, naming: in C++ methods, use under_scores. Only ...
5 years, 5 months ago (2015-07-16 16:54:04 UTC) #62
krstnmnlsn
Thanks! https://codereview.chromium.org/1216583003/diff/540001/device/bluetooth/bluetooth_adapter_mac.h File device/bluetooth/bluetooth_adapter_mac.h (right): https://codereview.chromium.org/1216583003/diff/540001/device/bluetooth/bluetooth_adapter_mac.h#newcode136 device/bluetooth/bluetooth_adapter_mac.h:136: NSDictionary* advertisementData, On 2015/07/16 16:54:04, Robert Sesek wrote: ...
5 years, 5 months ago (2015-07-16 17:13:33 UTC) #63
Robert Sesek
LGTM
5 years, 5 months ago (2015-07-16 17:19:55 UTC) #64
krstnmnlsn
Hey Adam, please see the use of SHA256HashString in low_energy_bluetooth_device_mac.mm. Thank you!
5 years, 5 months ago (2015-07-17 17:03:18 UTC) #66
agl
The CL description needs to explain the motivation for this change. Is this a privacy ...
5 years, 5 months ago (2015-07-17 17:17:29 UTC) #67
krstnmnlsn
The motivation was originally in the bug cited, but I've added clarification in the description ...
5 years, 5 months ago (2015-07-17 17:38:59 UTC) #68
agl
lgtm
5 years, 5 months ago (2015-07-17 17:40:14 UTC) #69
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1216583003/600001
5 years, 5 months ago (2015-07-17 17:44:54 UTC) #72
commit-bot: I haz the power
Committed patchset #9 (id:600001)
5 years, 5 months ago (2015-07-17 19:00:07 UTC) #73
commit-bot: I haz the power
5 years, 5 months ago (2015-07-17 19:01:28 UTC) #74
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/332a71cf170683203765842710ea3da4f5a1cf22
Cr-Commit-Position: refs/heads/master@{#339295}

Powered by Google App Engine
This is Rietveld 408576698