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

Issue 1979633004: Invoke GattDiscoveryCompleteForService by observing ServicesResolved property (Closed)

Created:
4 years, 7 months ago by Miao
Modified:
4 years, 7 months ago
Reviewers:
rkc, scheib
CC:
chromium-reviews, scheib+watch_chromium.org, ortuno+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@remove_attr
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Invoke GattDiscoveryCompleteForService by observing ServicesResolved property This changes how GattDiscoveryCompleteForService is invoked by observing the toggle of ServicesResolved property, which is added in BlueZ5.39, of interface org.bluez.Device1 instead of depending GattServiceAdded. Although BlueZ toggles this property not only on the first fully-discovered event but also on the following addition/removal events of service. GattDiscoveryCompleteForService should be called only once after a remote device is created. BUG=606011 TEST=build and run tests Committed: https://crrev.com/da9047813fef5c79e536420281860c62606e8201 Cr-Commit-Position: refs/heads/master@{#394345}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : Invoke GattDiscoveryCompleteForService for each GATT service once #

Total comments: 14

Patch Set 4 : Address comments on patch set 3. #

Patch Set 5 : #

Patch Set 6 : Rebase #

Patch Set 7 : Update comments. #

Total comments: 11

Patch Set 8 : Address comments on patch set 7 #

Total comments: 2

Patch Set 9 : #

Patch Set 10 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+235 lines, -32 lines) Patch
M device/bluetooth/bluez/bluetooth_device_bluez.h View 1 2 3 4 5 6 7 3 chunks +18 lines, -1 line 0 comments Download
M device/bluetooth/bluez/bluetooth_device_bluez.cc View 1 2 3 4 5 chunks +61 lines, -12 lines 0 comments Download
M device/bluetooth/bluez/bluetooth_gatt_bluez_unittest.cc View 1 2 3 4 5 6 7 8 9 4 chunks +61 lines, -4 lines 0 comments Download
M device/bluetooth/bluez/bluetooth_remote_gatt_service_bluez.h View 2 chunks +1 line, -4 lines 0 comments Download
M device/bluetooth/bluez/bluetooth_remote_gatt_service_bluez.cc View 2 chunks +1 line, -2 lines 0 comments Download
M device/bluetooth/dbus/fake_bluetooth_device_client.h View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M device/bluetooth/dbus/fake_bluetooth_device_client.cc View 1 2 3 4 5 2 chunks +29 lines, -0 lines 0 comments Download
M device/bluetooth/dbus/fake_bluetooth_gatt_service_client.h View 1 2 3 4 2 chunks +10 lines, -0 lines 0 comments Download
M device/bluetooth/dbus/fake_bluetooth_gatt_service_client.cc View 1 2 3 4 5 6 7 4 chunks +49 lines, -9 lines 0 comments Download

Messages

Total messages: 20 (6 generated)
rkc
lgtm https://codereview.chromium.org/1979633004/diff/40001/device/bluetooth/bluez/bluetooth_device_bluez.cc File device/bluetooth/bluez/bluetooth_device_bluez.cc (right): https://codereview.chromium.org/1979633004/diff/40001/device/bluetooth/bluez/bluetooth_device_bluez.cc#newcode603 device/bluetooth/bluez/bluetooth_device_bluez.cc:603: DCHECK(adapter()); Nit: Use either adapter_ or adapter() at ...
4 years, 7 months ago (2016-05-16 16:25:23 UTC) #3
scheib
https://codereview.chromium.org/1979633004/diff/40001/device/bluetooth/bluez/bluetooth_device_bluez.cc File device/bluetooth/bluez/bluetooth_device_bluez.cc (right): https://codereview.chromium.org/1979633004/diff/40001/device/bluetooth/bluez/bluetooth_device_bluez.cc#newcode632 device/bluetooth/bluez/bluetooth_device_bluez.cc:632: if (!gatt_services_.empty()) { If InitializeGattServiceMap is only called from ...
4 years, 7 months ago (2016-05-16 20:22:26 UTC) #4
Miao
https://codereview.chromium.org/1979633004/diff/40001/device/bluetooth/bluez/bluetooth_device_bluez.cc File device/bluetooth/bluez/bluetooth_device_bluez.cc (right): https://codereview.chromium.org/1979633004/diff/40001/device/bluetooth/bluez/bluetooth_device_bluez.cc#newcode603 device/bluetooth/bluez/bluetooth_device_bluez.cc:603: DCHECK(adapter()); On 2016/05/16 16:25:22, Rahul Chaturvedi wrote: > Nit: ...
4 years, 7 months ago (2016-05-17 00:22:47 UTC) #5
Miao
https://codereview.chromium.org/1979633004/diff/40001/device/bluetooth/bluez/bluetooth_device_bluez.cc File device/bluetooth/bluez/bluetooth_device_bluez.cc (right): https://codereview.chromium.org/1979633004/diff/40001/device/bluetooth/bluez/bluetooth_device_bluez.cc#newcode632 device/bluetooth/bluez/bluetooth_device_bluez.cc:632: if (!gatt_services_.empty()) { On 2016/05/16 20:22:26, scheib wrote: > ...
4 years, 7 months ago (2016-05-17 18:08:27 UTC) #6
rkc
https://codereview.chromium.org/1979633004/diff/120001/device/bluetooth/bluez/bluetooth_device_bluez.h File device/bluetooth/bluez/bluetooth_device_bluez.h (right): https://codereview.chromium.org/1979633004/diff/120001/device/bluetooth/bluez/bluetooth_device_bluez.h#newcode136 device/bluetooth/bluez/bluetooth_device_bluez.h:136: // Called by the constructor and |DevicePropertyChanged()| to initialize ...
4 years, 7 months ago (2016-05-17 18:38:50 UTC) #7
scheib
https://codereview.chromium.org/1979633004/diff/120001/device/bluetooth/bluez/bluetooth_device_bluez.h File device/bluetooth/bluez/bluetooth_device_bluez.h (right): https://codereview.chromium.org/1979633004/diff/120001/device/bluetooth/bluez/bluetooth_device_bluez.h#newcode136 device/bluetooth/bluez/bluetooth_device_bluez.h:136: // Called by the constructor and |DevicePropertyChanged()| to initialize ...
4 years, 7 months ago (2016-05-17 19:24:48 UTC) #8
Miao
https://codereview.chromium.org/1979633004/diff/120001/device/bluetooth/bluez/bluetooth_device_bluez.h File device/bluetooth/bluez/bluetooth_device_bluez.h (right): https://codereview.chromium.org/1979633004/diff/120001/device/bluetooth/bluez/bluetooth_device_bluez.h#newcode136 device/bluetooth/bluez/bluetooth_device_bluez.h:136: // Called by the constructor and |DevicePropertyChanged()| to initialize ...
4 years, 7 months ago (2016-05-18 03:26:58 UTC) #9
rkc
lgtm
4 years, 7 months ago (2016-05-18 03:32:32 UTC) #10
scheib
https://codereview.chromium.org/1979633004/diff/140001/device/bluetooth/bluez/bluetooth_gatt_bluez_unittest.cc File device/bluetooth/bluez/bluetooth_gatt_bluez_unittest.cc (right): https://codereview.chromium.org/1979633004/diff/140001/device/bluetooth/bluez/bluetooth_gatt_bluez_unittest.cc#newcode497 device/bluetooth/bluez/bluetooth_gatt_bluez_unittest.cc:497: EXPECT_EQ(0, observer.gatt_characteristic_added_count()); Is the change to gatt_characteristic_added_count intentional?
4 years, 7 months ago (2016-05-18 03:34:50 UTC) #11
Miao
https://codereview.chromium.org/1979633004/diff/140001/device/bluetooth/bluez/bluetooth_gatt_bluez_unittest.cc File device/bluetooth/bluez/bluetooth_gatt_bluez_unittest.cc (right): https://codereview.chromium.org/1979633004/diff/140001/device/bluetooth/bluez/bluetooth_gatt_bluez_unittest.cc#newcode497 device/bluetooth/bluez/bluetooth_gatt_bluez_unittest.cc:497: EXPECT_EQ(0, observer.gatt_characteristic_added_count()); On 2016/05/18 03:34:50, scheib wrote: > Is ...
4 years, 7 months ago (2016-05-18 03:43:48 UTC) #12
scheib
LGTM
4 years, 7 months ago (2016-05-18 04:00:06 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1979633004/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1979633004/180001
4 years, 7 months ago (2016-05-18 04:02:23 UTC) #16
commit-bot: I haz the power
Committed patchset #10 (id:180001)
4 years, 7 months ago (2016-05-18 07:00:47 UTC) #18
commit-bot: I haz the power
4 years, 7 months ago (2016-05-18 07:01:56 UTC) #20
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/da9047813fef5c79e536420281860c62606e8201
Cr-Commit-Position: refs/heads/master@{#394345}

Powered by Google App Engine
This is Rietveld 408576698