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

Issue 1527853002: bluetooth: Add disconnect function (Closed)

Created:
5 years ago by ortuno
Modified:
4 years, 11 months ago
CC:
asvitkine+watch_chromium.org, blink-reviews, blink-reviews-api_chromium.org, chromium-reviews, darin-cc_chromium.org, dglazkov+blink, jam, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org, scheib+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@bluetooth-device-identifier
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

bluetooth: Add disconnect function Adds bings for BluetoothRemoteGATTServer.disconnect. Note that disconnection is not implemented on Chrome OS. Tested using an android phone and the peripheral simulator app. BUG=569730, 539643 Committed: https://crrev.com/7af25d6d244ef3e7e3005c4f6aece351a00c5ed8 Cr-Commit-Position: refs/heads/master@{#369911}

Patch Set 1 #

Patch Set 2 : Remove TODO #

Patch Set 3 : Clean up #

Patch Set 4 : More clean up #

Total comments: 13

Patch Set 5 : Address jyasskin's comments #

Total comments: 4

Patch Set 6 : Address jyasskin's comments 2 #

Patch Set 7 : Merge #

Patch Set 8 : Merge #

Total comments: 1

Patch Set 9 : Merge with ToT #

Patch Set 10 : Merge with ToT again #

Patch Set 11 : Fix test that fails after upstream change. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+172 lines, -34 lines) Patch
M content/browser/bluetooth/bluetooth_allowed_devices_map.h View 1 2 3 4 5 6 4 chunks +8 lines, -6 lines 0 comments Download
M content/browser/bluetooth/bluetooth_allowed_devices_map.cc View 1 2 3 4 5 6 4 chunks +8 lines, -8 lines 0 comments Download
M content/browser/bluetooth/bluetooth_dispatcher_host.h View 1 2 3 4 5 6 7 8 2 chunks +5 lines, -2 lines 0 comments Download
M content/browser/bluetooth/bluetooth_dispatcher_host.cc View 1 2 3 4 5 6 7 8 6 chunks +39 lines, -3 lines 0 comments Download
M content/browser/bluetooth/bluetooth_metrics.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M content/common/bluetooth/bluetooth_messages.h View 1 2 1 chunk +6 lines, -0 lines 0 comments Download
M content/renderer/bluetooth/bluetooth_dispatcher.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/bluetooth/bluetooth_dispatcher.cc View 1 2 1 chunk +6 lines, -0 lines 0 comments Download
M content/renderer/bluetooth/web_bluetooth_impl.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/bluetooth/web_bluetooth_impl.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/bluetooth/connectGATT.html View 1 2 1 chunk +13 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/bluetooth/disconnect.html View 1 2 3 4 5 1 chunk +51 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/bluetooth/getPrimaryService.html View 1 2 3 4 5 6 7 8 9 10 3 chunks +12 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/modules/bluetooth/BluetoothGATTRemoteServer.h View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/bluetooth/BluetoothGATTRemoteServer.cpp View 1 2 2 chunks +8 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/bluetooth/BluetoothGATTRemoteServer.idl View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/public/platform/modules/bluetooth/WebBluetooth.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/public/platform/modules/bluetooth/WebBluetoothGATTRemoteServer.h View 1 chunk +4 lines, -4 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -1 line 0 comments Download

Depends on Patchset:

Messages

Total messages: 30 (12 generated)
ortuno
jyasskin: PTAL
4 years, 11 months ago (2016-01-14 03:05:06 UTC) #3
Jeffrey Yasskin
https://codereview.chromium.org/1527853002/diff/60001/content/browser/bluetooth/bluetooth_allowed_devices_map.cc File content/browser/bluetooth/bluetooth_allowed_devices_map.cc (right): https://codereview.chromium.org/1527853002/diff/60001/content/browser/bluetooth/bluetooth_allowed_devices_map.cc#newcode133 content/browser/bluetooth/bluetooth_allowed_devices_map.cc:133: auto id_map_iter = origin_to_device_id_to_address_map_.find(origin); I think you don't need ...
4 years, 11 months ago (2016-01-14 22:13:19 UTC) #4
ortuno
https://codereview.chromium.org/1527853002/diff/60001/content/browser/bluetooth/bluetooth_allowed_devices_map.cc File content/browser/bluetooth/bluetooth_allowed_devices_map.cc (right): https://codereview.chromium.org/1527853002/diff/60001/content/browser/bluetooth/bluetooth_allowed_devices_map.cc#newcode133 content/browser/bluetooth/bluetooth_allowed_devices_map.cc:133: auto id_map_iter = origin_to_device_id_to_address_map_.find(origin); On 2016/01/14 at 22:13:18, Jeffrey ...
4 years, 11 months ago (2016-01-15 01:00:09 UTC) #5
Jeffrey Yasskin
LGTM with the unused origin parameter removed. https://codereview.chromium.org/1527853002/diff/60001/content/browser/bluetooth/bluetooth_dispatcher_host.cc File content/browser/bluetooth/bluetooth_dispatcher_host.cc (right): https://codereview.chromium.org/1527853002/diff/60001/content/browser/bluetooth/bluetooth_dispatcher_host.cc#newcode778 content/browser/bluetooth/bluetooth_dispatcher_host.cc:778: if (device_id_to_connection_map_.erase(device_id)) ...
4 years, 11 months ago (2016-01-15 01:12:19 UTC) #6
ortuno
Thanks! https://codereview.chromium.org/1527853002/diff/60001/third_party/WebKit/LayoutTests/bluetooth/disconnect.html File third_party/WebKit/LayoutTests/bluetooth/disconnect.html (right): https://codereview.chromium.org/1527853002/diff/60001/third_party/WebKit/LayoutTests/bluetooth/disconnect.html#newcode40 third_party/WebKit/LayoutTests/bluetooth/disconnect.html:40: return device.connectGATT().then(gattServer => { On 2016/01/15 at 01:12:19, ...
4 years, 11 months ago (2016-01-15 01:33:14 UTC) #7
ortuno
asvitkine: PTAL at histograms
4 years, 11 months ago (2016-01-15 01:34:12 UTC) #9
Alexei Svitkine (slow)
lgtm
4 years, 11 months ago (2016-01-15 14:12:12 UTC) #10
ortuno
palmer: PTAL
4 years, 11 months ago (2016-01-15 16:20:54 UTC) #12
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1527853002/110001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1527853002/110001
4 years, 11 months ago (2016-01-15 16:21:14 UTC) #14
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: android_chromium_gn_compile_rel on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_chromium_gn_compile_rel/builds/8858)
4 years, 11 months ago (2016-01-15 16:40:41 UTC) #16
Jeffrey Yasskin
https://codereview.chromium.org/1527853002/diff/130001/content/browser/bluetooth/bluetooth_allowed_devices_map.h File content/browser/bluetooth/bluetooth_allowed_devices_map.h (right): https://codereview.chromium.org/1527853002/diff/130001/content/browser/bluetooth/bluetooth_allowed_devices_map.h#newcode76 content/browser/bluetooth/bluetooth_allowed_devices_map.h:76: origin_to_device_id_to_address_map_; Now that device IDs are unique, you could ...
4 years, 11 months ago (2016-01-15 19:05:44 UTC) #17
ortuno
Adding tsepez for content/common review since palmer is busy today.
4 years, 11 months ago (2016-01-15 23:49:11 UTC) #19
Tom Sepez
lgtm
4 years, 11 months ago (2016-01-16 00:03:57 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1527853002/190001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1527853002/190001
4 years, 11 months ago (2016-01-16 00:59:52 UTC) #23
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/136354)
4 years, 11 months ago (2016-01-16 01:11:05 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1527853002/190001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1527853002/190001
4 years, 11 months ago (2016-01-16 01:36:43 UTC) #27
commit-bot: I haz the power
Committed patchset #11 (id:190001)
4 years, 11 months ago (2016-01-16 01:42:56 UTC) #28
commit-bot: I haz the power
4 years, 11 months ago (2016-01-16 01:43:44 UTC) #30
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/7af25d6d244ef3e7e3005c4f6aece351a00c5ed8
Cr-Commit-Position: refs/heads/master@{#369911}

Powered by Google App Engine
This is Rietveld 408576698