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

Issue 2256003002: components/arc: implement multi advertising (Closed)

Created:
4 years, 4 months ago by Eric Caruso
Modified:
4 years, 2 months ago
CC:
Aaron Boodman, abarth-chromium, ben+mojo_chromium.org, chromium-reviews, darin (slow to review), elijahtaylor+arcwatch_chromium.org, hidehiko+watch_chromium.org, lhchavez+watch_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yusukes+watch_chromium.org, yzshen+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@plumb-incoming-connections
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

components/arc: implement multi advertising This plumbs through multi advertising capabilities for the instance. Instances can register and unregister advertisements. BUG=637171 TEST=use nrf connect on remote device and verify that packets registered from the instance are visible on the remote device Committed: https://crrev.com/efca08b08a581ec53c7a140fc13e660ed7530865 Cr-Commit-Position: refs/heads/master@{#423253}

Patch Set 1 #

Total comments: 19

Patch Set 2 : refactoring interface #

Total comments: 7

Patch Set 3 : remove incorrect version checks, fix crash #

Patch Set 4 : add tests, remove artifact of earlier patchset #

Patch Set 5 : swap CHECK_EQ for EXPECT_EQ #

Total comments: 11

Patch Set 6 : comments from rickyz@ #

Total comments: 2

Patch Set 7 : suggestions from lhchavez@ #

Patch Set 8 : now using StructTraits/EnumTraits/UnionTraits/&c. #

Total comments: 8

Patch Set 9 : lhchavez@ nits #

Total comments: 4

Patch Set 10 : rickyz@ nits #

Total comments: 3

Patch Set 11 : tests and nits from steel@ #

Patch Set 12 : setting 5 max advs to fix apps #

Total comments: 7

Patch Set 13 : fixing test expectation #

Patch Set 14 : more testing #

Total comments: 3

Patch Set 15 : replace > with >= #

Patch Set 16 : rebase... #

Patch Set 17 : fixing incorrect advertisement test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+680 lines, -17 lines) Patch
M components/arc/bluetooth/arc_bluetooth_bridge.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +63 lines, -0 lines 0 comments Download
M components/arc/bluetooth/arc_bluetooth_bridge.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +130 lines, -2 lines 0 comments Download
M components/arc/bluetooth/arc_bluetooth_bridge_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +141 lines, -0 lines 0 comments Download
M components/arc/bluetooth/bluetooth_struct_traits.h View 1 2 3 4 5 6 7 2 chunks +29 lines, -0 lines 0 comments Download
M components/arc/bluetooth/bluetooth_struct_traits.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +158 lines, -0 lines 0 comments Download
M components/arc/bluetooth/bluetooth_struct_traits_unittest.cc View 1 2 3 4 5 6 7 8 9 4 chunks +91 lines, -0 lines 0 comments Download
M components/arc/common/bluetooth.mojom View 1 2 3 4 5 6 7 5 chunks +26 lines, -2 lines 0 comments Download
M components/arc/common/bluetooth.typemap View 1 2 3 4 5 6 7 2 chunks +2 lines, -0 lines 0 comments Download
M device/bluetooth/bluez/bluetooth_advertisement_bluez_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +24 lines, -3 lines 0 comments Download
M device/bluetooth/dbus/fake_bluetooth_le_advertising_manager_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +6 lines, -3 lines 0 comments Download
M device/bluetooth/dbus/fake_bluetooth_le_advertising_manager_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +10 lines, -7 lines 0 comments Download

Messages

Total messages: 67 (15 generated)
Eric Caruso
PTAL, thanks.
4 years, 4 months ago (2016-08-17 23:13:16 UTC) #2
puthik_chromium
https://codereview.chromium.org/2256003002/diff/1/components/arc/bluetooth/arc_bluetooth_bridge.cc File components/arc/bluetooth/arc_bluetooth_bridge.cc (right): https://codereview.chromium.org/2256003002/diff/1/components/arc/bluetooth/arc_bluetooth_bridge.cc#newcode1448 components/arc/bluetooth/arc_bluetooth_bridge.cc:1448: if (adv_handle < 0 || adv_handle > kMaxAdvertisement || ...
4 years, 4 months ago (2016-08-17 23:22:04 UTC) #3
puthik_chromium
https://codereview.chromium.org/2256003002/diff/1/components/arc/bluetooth/arc_bluetooth_bridge.cc File components/arc/bluetooth/arc_bluetooth_bridge.cc (right): https://codereview.chromium.org/2256003002/diff/1/components/arc/bluetooth/arc_bluetooth_bridge.cc#newcode1454 components/arc/bluetooth/arc_bluetooth_bridge.cc:1454: // Create BluetoothAdvertisement::Data using the adv_type we got when ...
4 years, 4 months ago (2016-08-17 23:27:11 UTC) #4
rkc
https://codereview.chromium.org/2256003002/diff/1/components/arc/bluetooth/arc_bluetooth_bridge.cc File components/arc/bluetooth/arc_bluetooth_bridge.cc (right): https://codereview.chromium.org/2256003002/diff/1/components/arc/bluetooth/arc_bluetooth_bridge.cc#newcode1454 components/arc/bluetooth/arc_bluetooth_bridge.cc:1454: // Create BluetoothAdvertisement::Data using the adv_type we got when ...
4 years, 4 months ago (2016-08-18 00:06:10 UTC) #5
Luis Héctor Chávez
https://codereview.chromium.org/2256003002/diff/1/components/arc/bluetooth/arc_bluetooth_bridge.cc File components/arc/bluetooth/arc_bluetooth_bridge.cc (right): https://codereview.chromium.org/2256003002/diff/1/components/arc/bluetooth/arc_bluetooth_bridge.cc#newcode1414 components/arc/bluetooth/arc_bluetooth_bridge.cc:1414: for (int i = 0; i < kMaxAdvertisement; i++) ...
4 years, 4 months ago (2016-08-18 04:29:13 UTC) #6
Eric Caruso
Still needs testing and unit tests, but I'd like some feedback on the new interface.
4 years, 4 months ago (2016-08-19 23:07:16 UTC) #7
puthik_chromium
https://codereview.chromium.org/2256003002/diff/20001/components/arc/bluetooth/arc_bluetooth_bridge.cc File components/arc/bluetooth/arc_bluetooth_bridge.cc (right): https://codereview.chromium.org/2256003002/diff/20001/components/arc/bluetooth/arc_bluetooth_bridge.cc#newcode1396 components/arc/bluetooth/arc_bluetooth_bridge.cc:1396: bool ArcBluetoothBridge::GetAdvertisementHandle(int32_t* adv_handle) { I don't think advertisementHandle need ...
4 years, 4 months ago (2016-08-19 23:43:25 UTC) #8
Eric Caruso
https://codereview.chromium.org/2256003002/diff/20001/components/arc/bluetooth/arc_bluetooth_bridge.cc File components/arc/bluetooth/arc_bluetooth_bridge.cc (right): https://codereview.chromium.org/2256003002/diff/20001/components/arc/bluetooth/arc_bluetooth_bridge.cc#newcode1519 components/arc/bluetooth/arc_bluetooth_bridge.cc:1519: advertisements_[adv_handle] = nullptr; On 2016/08/19 23:43:24, puthik_chromium wrote: > ...
4 years, 4 months ago (2016-08-20 00:33:17 UTC) #9
Eric Caruso
PTAL, thanks.
4 years, 4 months ago (2016-08-23 23:03:47 UTC) #10
Eric Caruso
Now with tests! PTAL, thanks.
4 years, 4 months ago (2016-08-24 20:07:00 UTC) #11
rickyz (no longer on Chrome)
https://codereview.chromium.org/2256003002/diff/80001/components/arc/bluetooth/arc_bluetooth_bridge.cc File components/arc/bluetooth/arc_bluetooth_bridge.cc (right): https://codereview.chromium.org/2256003002/diff/80001/components/arc/bluetooth/arc_bluetooth_bridge.cc#newcode1495 components/arc/bluetooth/arc_bluetooth_bridge.cc:1495: advertisements_[adv_handle] = advertisement; Can std::move advertisement https://codereview.chromium.org/2256003002/diff/80001/components/arc/bluetooth/arc_bluetooth_bridge.h File components/arc/bluetooth/arc_bluetooth_bridge.h ...
4 years, 4 months ago (2016-08-24 21:47:30 UTC) #12
Eric Caruso
https://codereview.chromium.org/2256003002/diff/80001/components/arc/bluetooth/arc_bluetooth_bridge.cc File components/arc/bluetooth/arc_bluetooth_bridge.cc (right): https://codereview.chromium.org/2256003002/diff/80001/components/arc/bluetooth/arc_bluetooth_bridge.cc#newcode1495 components/arc/bluetooth/arc_bluetooth_bridge.cc:1495: advertisements_[adv_handle] = advertisement; On 2016/08/24 21:47:30, rickyz wrote: > ...
4 years, 4 months ago (2016-08-24 22:24:42 UTC) #13
Eric Caruso
https://codereview.chromium.org/2256003002/diff/80001/components/arc/bluetooth/arc_bluetooth_bridge.cc File components/arc/bluetooth/arc_bluetooth_bridge.cc (right): https://codereview.chromium.org/2256003002/diff/80001/components/arc/bluetooth/arc_bluetooth_bridge.cc#newcode1495 components/arc/bluetooth/arc_bluetooth_bridge.cc:1495: advertisements_[adv_handle] = advertisement; > On 2016/08/24 21:47:30, rickyz wrote: ...
4 years, 4 months ago (2016-08-24 22:26:12 UTC) #14
rickyz (no longer on Chrome)
https://codereview.chromium.org/2256003002/diff/80001/components/arc/bluetooth/arc_bluetooth_bridge.cc File components/arc/bluetooth/arc_bluetooth_bridge.cc (right): https://codereview.chromium.org/2256003002/diff/80001/components/arc/bluetooth/arc_bluetooth_bridge.cc#newcode1418 components/arc/bluetooth/arc_bluetooth_bridge.cc:1418: advertisements_[adv_handle] = scoped_refptr<device::BluetoothAdvertisement>(); nit: = nullptr for consistency with ...
4 years, 3 months ago (2016-08-29 01:09:23 UTC) #15
Eric Caruso
https://codereview.chromium.org/2256003002/diff/80001/components/arc/bluetooth/bluetooth_type_converters.h File components/arc/bluetooth/bluetooth_type_converters.h (right): https://codereview.chromium.org/2256003002/diff/80001/components/arc/bluetooth/bluetooth_type_converters.h#newcode16 components/arc/bluetooth/bluetooth_type_converters.h:16: #include "mojo/public/cpp/bindings/type_converter.h" On 2016/08/29 01:09:23, rickyz wrote: > I ...
4 years, 3 months ago (2016-08-29 17:24:52 UTC) #16
Eric Caruso
PTAL, thanks.
4 years, 3 months ago (2016-08-29 22:48:41 UTC) #17
Luis Héctor Chávez
https://codereview.chromium.org/2256003002/diff/100001/components/arc/bluetooth/arc_bluetooth_bridge.cc File components/arc/bluetooth/arc_bluetooth_bridge.cc (right): https://codereview.chromium.org/2256003002/diff/100001/components/arc/bluetooth/arc_bluetooth_bridge.cc#newcode1482 components/arc/bluetooth/arc_bluetooth_bridge.cc:1482: std::unique_ptr<device::BluetoothAdvertisement::Data> data) { Can you add DCHECK(CalledOnValidThread()); in this ...
4 years, 3 months ago (2016-08-31 16:58:46 UTC) #18
Eric Caruso
PTAL, thanks.
4 years, 3 months ago (2016-09-01 01:01:00 UTC) #19
rickyz (no longer on Chrome)
Apologies for the delayed response. I don't have additional info about the ability to only ...
4 years, 3 months ago (2016-09-02 20:53:50 UTC) #21
Luis Héctor Chávez
+yzshen1, in case he has any ideas
4 years, 3 months ago (2016-09-06 17:46:20 UTC) #23
yzshen1
On 2016/09/02 20:53:50, rickyz wrote: > Apologies for the delayed response. I don't have additional ...
4 years, 3 months ago (2016-09-06 19:28:21 UTC) #24
Eric Caruso
I am unable to implement a one-way type map for mojo types which are members ...
4 years, 3 months ago (2016-09-08 20:23:42 UTC) #25
Eric Caruso
Err, the Serializer it's trying to instantiate is for the type itself, not the enclosing ...
4 years, 3 months ago (2016-09-08 20:37:47 UTC) #26
yzshen1
On 2016/09/08 20:23:42, Eric Caruso wrote: > I am unable to implement a one-way type ...
4 years, 3 months ago (2016-09-08 22:30:30 UTC) #27
Eric Caruso
PTAL, thanks.
4 years, 3 months ago (2016-09-12 17:41:37 UTC) #28
Luis Héctor Chávez
https://codereview.chromium.org/2256003002/diff/140001/components/arc/bluetooth/bluetooth_struct_traits.cc File components/arc/bluetooth/bluetooth_struct_traits.cc (right): https://codereview.chromium.org/2256003002/diff/140001/components/arc/bluetooth/bluetooth_struct_traits.cc#newcode38 components/arc/bluetooth/bluetooth_struct_traits.cc:38: std::vector<device::BluetoothUUID> service_uuids_; struct data members don't have trailing underscores: ...
4 years, 3 months ago (2016-09-12 19:53:00 UTC) #29
Eric Caruso
https://codereview.chromium.org/2256003002/diff/140001/components/arc/bluetooth/bluetooth_struct_traits.cc File components/arc/bluetooth/bluetooth_struct_traits.cc (right): https://codereview.chromium.org/2256003002/diff/140001/components/arc/bluetooth/bluetooth_struct_traits.cc#newcode182 components/arc/bluetooth/bluetooth_struct_traits.cc:182: uint16_t company_id_code = blob[1] << 8 | blob[0]; Where ...
4 years, 3 months ago (2016-09-13 23:36:48 UTC) #30
Eric Caruso
PTAL, thanks.
4 years, 3 months ago (2016-09-14 00:46:22 UTC) #31
rickyz (no longer on Chrome)
lgtm with minor nits - thanks for working out the struct traits stuff! https://codereview.chromium.org/2256003002/diff/160001/components/arc/bluetooth/bluetooth_struct_traits.cc File ...
4 years, 3 months ago (2016-09-14 20:47:27 UTC) #32
Luis Héctor Chávez
lgtm https://codereview.chromium.org/2256003002/diff/140001/components/arc/bluetooth/bluetooth_struct_traits.cc File components/arc/bluetooth/bluetooth_struct_traits.cc (right): https://codereview.chromium.org/2256003002/diff/140001/components/arc/bluetooth/bluetooth_struct_traits.cc#newcode182 components/arc/bluetooth/bluetooth_struct_traits.cc:182: uint16_t company_id_code = blob[1] << 8 | blob[0]; ...
4 years, 3 months ago (2016-09-16 00:39:53 UTC) #33
Eric Caruso
Thanks!
4 years, 3 months ago (2016-09-16 20:28:47 UTC) #34
puthik_chromium
What if other user (Web Bluetooth maybe?) use all the remaining advertisement slots between the ...
4 years, 3 months ago (2016-09-16 20:59:58 UTC) #37
Eric Caruso
On 2016/09/16 20:59:58, puthik_chromium wrote: > What if other user (Web Bluetooth maybe?) use all ...
4 years, 3 months ago (2016-09-16 21:37:34 UTC) #38
Rahul Chaturvedi
https://codereview.chromium.org/2256003002/diff/180001/components/arc/bluetooth/arc_bluetooth_bridge.h File components/arc/bluetooth/arc_bluetooth_bridge.h (right): https://codereview.chromium.org/2256003002/diff/180001/components/arc/bluetooth/arc_bluetooth_bridge.h#newcode401 components/arc/bluetooth/arc_bluetooth_bridge.h:401: void OnReadyToRegisterAdvertisement( Tests for these methods? https://codereview.chromium.org/2256003002/diff/180001/components/arc/bluetooth/arc_bluetooth_bridge.h#newcode473 components/arc/bluetooth/arc_bluetooth_bridge.h:473: static ...
4 years, 3 months ago (2016-09-16 22:37:22 UTC) #39
Eric Caruso
PTAL, thanks.
4 years, 2 months ago (2016-09-26 23:01:44 UTC) #40
Eric Caruso
PTAL, thanks!
4 years, 2 months ago (2016-09-29 22:33:36 UTC) #41
Eric Caruso
Sorry. PTAL.
4 years, 2 months ago (2016-09-29 22:39:08 UTC) #42
Rahul Chaturvedi
https://codereview.chromium.org/2256003002/diff/220001/components/arc/bluetooth/arc_bluetooth_bridge_unittest.cc File components/arc/bluetooth/arc_bluetooth_bridge_unittest.cc (right): https://codereview.chromium.org/2256003002/diff/220001/components/arc/bluetooth/arc_bluetooth_bridge_unittest.cc#newcode88 components/arc/bluetooth/arc_bluetooth_bridge_unittest.cc:88: int32_t ret; The typical pattern is to have ret ...
4 years, 2 months ago (2016-09-29 22:49:18 UTC) #43
Eric Caruso
https://codereview.chromium.org/2256003002/diff/220001/components/arc/bluetooth/arc_bluetooth_bridge_unittest.cc File components/arc/bluetooth/arc_bluetooth_bridge_unittest.cc (right): https://codereview.chromium.org/2256003002/diff/220001/components/arc/bluetooth/arc_bluetooth_bridge_unittest.cc#newcode88 components/arc/bluetooth/arc_bluetooth_bridge_unittest.cc:88: int32_t ret; On 2016/09/29 22:49:18, Rahul Chaturvedi wrote: > ...
4 years, 2 months ago (2016-09-29 22:57:34 UTC) #44
Eric Caruso
PTAL, thanks.
4 years, 2 months ago (2016-09-30 00:20:40 UTC) #45
Rahul Chaturvedi
https://codereview.chromium.org/2256003002/diff/220001/components/arc/bluetooth/arc_bluetooth_bridge_unittest.cc File components/arc/bluetooth/arc_bluetooth_bridge_unittest.cc (right): https://codereview.chromium.org/2256003002/diff/220001/components/arc/bluetooth/arc_bluetooth_bridge_unittest.cc#newcode88 components/arc/bluetooth/arc_bluetooth_bridge_unittest.cc:88: int32_t ret; On 2016/09/29 22:57:34, Eric Caruso wrote: > ...
4 years, 2 months ago (2016-09-30 19:51:08 UTC) #46
Eric Caruso
https://codereview.chromium.org/2256003002/diff/260001/device/bluetooth/dbus/fake_bluetooth_le_advertising_manager_client.cc File device/bluetooth/dbus/fake_bluetooth_le_advertising_manager_client.cc (right): https://codereview.chromium.org/2256003002/diff/260001/device/bluetooth/dbus/fake_bluetooth_le_advertising_manager_client.cc#newcode58 device/bluetooth/dbus/fake_bluetooth_le_advertising_manager_client.cc:58: } else if (currently_registered_.size() > kMaxBluezAdvertisements) { On 2016/09/30 ...
4 years, 2 months ago (2016-09-30 20:08:29 UTC) #47
Eric Caruso
Thanks!
4 years, 2 months ago (2016-09-30 20:21:11 UTC) #48
Rahul Chaturvedi
lgtm
4 years, 2 months ago (2016-10-04 18:32:32 UTC) #49
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/2256003002/280001
4 years, 2 months ago (2016-10-04 18:36:35 UTC) #52
commit-bot: I haz the power
Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds/80226)
4 years, 2 months ago (2016-10-04 18:39:22 UTC) #54
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/2256003002/300001
4 years, 2 months ago (2016-10-05 17:02:29 UTC) #57
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/238233)
4 years, 2 months ago (2016-10-05 17:48:32 UTC) #59
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/2256003002/320001
4 years, 2 months ago (2016-10-05 18:34:05 UTC) #62
commit-bot: I haz the power
Committed patchset #17 (id:320001)
4 years, 2 months ago (2016-10-05 19:39:10 UTC) #64
commit-bot: I haz the power
Patchset 17 (id:??) landed as https://crrev.com/efca08b08a581ec53c7a140fc13e660ed7530865 Cr-Commit-Position: refs/heads/master@{#423253}
4 years, 2 months ago (2016-10-05 19:42:30 UTC) #66
gab
4 years, 2 months ago (2016-10-06 13:09:39 UTC) #67
Message was sent while issue was closed.
A revert of this CL (patchset #17 id:320001) has been created in
https://codereview.chromium.org/2389393005/ by gab@chromium.org.

The reason for reverting is: Causes LSAN failures:
https://uberchromegw.corp.google.com/i/chromium.memory/builders/Linux%20Chrom....

Powered by Google App Engine
This is Rietveld 408576698