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

Issue 2183903002: bluetooth: Reject getPrimaryService(s) if frame is not connected (Closed)

Created:
4 years, 4 months ago by ortuno
Modified:
4 years, 4 months ago
Reviewers:
Jeffrey Yasskin
CC:
blink-reviews, chromium-reviews, haraken, ortuno+watch_chromium.org, scheib+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@my-origin
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

bluetooth: Reject getPrimaryService(s) if frame is not connected First of three patches to reject promises if the frame is not connected or the frame disconnected while the promise was not fulfilled. Implements: 1. The ActiveAlgorithm set[1] as m_activeAlgorithms in BluetoothRemoteGATTServer 2. gattServer-connection-checking wrapper[2] as GetPrimaryServicesCallback in BluetoothRemoteGattServer.cpp 3. Connection check of query bluetooth cache[3] in getPrimaryServicesImpl. [1] https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattserver-activealgorithms-slot [2] https://webbluetoothcg.github.io/web-bluetooth/#connection-checking-wrapper [3] https://webbluetoothcg.github.io/web-bluetooth/#query-the-bluetooth-cache BUG=608538 Committed: https://crrev.com/ababc28cc3a0b4cc1f842548d1c5c31fdd4d2792 Cr-Commit-Position: refs/heads/master@{#408729}

Patch Set 1 #

Patch Set 2 : Clean up #

Total comments: 12

Patch Set 3 : Format #

Patch Set 4 : Address jyasskin's comments #

Total comments: 2

Patch Set 5 : Docs #

Unified diffs Side-by-side diffs Delta from patch set Stats (+408 lines, -114 lines) Patch
M content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.h View 1 2 1 chunk +23 lines, -0 lines 0 comments Download
M content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc View 1 2 3 4 3 chunks +78 lines, -0 lines 0 comments Download
A + third_party/WebKit/LayoutTests/bluetooth/getPrimaryService/device-disconnects-before.html View 1 2 chunks +9 lines, -10 lines 0 comments Download
A + third_party/WebKit/LayoutTests/bluetooth/getPrimaryService/device-disconnects-during.html View 1 2 chunks +10 lines, -9 lines 0 comments Download
A third_party/WebKit/LayoutTests/bluetooth/getPrimaryService/device-reconnects-during.html View 1 2 1 chunk +22 lines, -0 lines 0 comments Download
A + third_party/WebKit/LayoutTests/bluetooth/getPrimaryService/disconnect-called-before.html View 1 2 chunks +5 lines, -5 lines 0 comments Download
A + third_party/WebKit/LayoutTests/bluetooth/getPrimaryService/disconnect-called-during.html View 1 1 chunk +6 lines, -5 lines 0 comments Download
A + third_party/WebKit/LayoutTests/bluetooth/getPrimaryService/disconnected-device.html View 1 2 3 1 chunk +5 lines, -6 lines 0 comments Download
A third_party/WebKit/LayoutTests/bluetooth/getPrimaryService/reconnect-during.html View 1 2 1 chunk +22 lines, -0 lines 0 comments Download
A + third_party/WebKit/LayoutTests/bluetooth/getPrimaryServices/device-disconnects-before.html View 1 2 chunks +9 lines, -10 lines 0 comments Download
A + third_party/WebKit/LayoutTests/bluetooth/getPrimaryServices/device-disconnects-before-with-uuid.html View 1 2 chunks +9 lines, -10 lines 0 comments Download
A + third_party/WebKit/LayoutTests/bluetooth/getPrimaryServices/device-disconnects-during.html View 1 2 chunks +10 lines, -9 lines 0 comments Download
A + third_party/WebKit/LayoutTests/bluetooth/getPrimaryServices/device-disconnects-during-with-uuid.html View 1 2 chunks +10 lines, -9 lines 0 comments Download
A third_party/WebKit/LayoutTests/bluetooth/getPrimaryServices/device-reconnects-during.html View 1 2 1 chunk +22 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/bluetooth/getPrimaryServices/device-reconnects-during-with-uuid.html View 1 2 1 chunk +23 lines, -0 lines 0 comments Download
A + third_party/WebKit/LayoutTests/bluetooth/getPrimaryServices/disconnect-called-before.html View 1 chunk +7 lines, -7 lines 0 comments Download
A + third_party/WebKit/LayoutTests/bluetooth/getPrimaryServices/disconnect-called-before-with-uuid.html View 1 1 chunk +7 lines, -7 lines 0 comments Download
A + third_party/WebKit/LayoutTests/bluetooth/getPrimaryServices/disconnect-called-during.html View 1 chunk +8 lines, -8 lines 0 comments Download
A + third_party/WebKit/LayoutTests/bluetooth/getPrimaryServices/disconnect-called-during-with-uuid.html View 1 1 chunk +7 lines, -7 lines 0 comments Download
A + third_party/WebKit/LayoutTests/bluetooth/getPrimaryServices/disconnected-device.html View 1 2 3 1 chunk +5 lines, -6 lines 0 comments Download
A + third_party/WebKit/LayoutTests/bluetooth/getPrimaryServices/disconnected-device-with-uuid.html View 1 2 3 1 chunk +5 lines, -5 lines 0 comments Download
A third_party/WebKit/LayoutTests/bluetooth/getPrimaryServices/reconnect-during.html View 1 2 1 chunk +22 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/bluetooth/getPrimaryServices/reconnect-during-with-uuid.html View 1 2 1 chunk +22 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.cpp View 2 chunks +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTServer.h View 1 2 chunks +16 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTServer.cpp View 1 2 3 6 chunks +44 lines, -1 line 0 comments Download

Messages

Total messages: 20 (12 generated)
ortuno
jyasskin: PTAL
4 years, 4 months ago (2016-07-26 18:06:34 UTC) #3
Jeffrey Yasskin
LGTM https://codereview.chromium.org/2183903002/diff/20001/third_party/WebKit/LayoutTests/bluetooth/getPrimaryService/device-disconnects-during.html File third_party/WebKit/LayoutTests/bluetooth/getPrimaryService/device-disconnects-during.html (right): https://codereview.chromium.org/2183903002/diff/20001/third_party/WebKit/LayoutTests/bluetooth/getPrimaryService/device-disconnects-during.html#newcode18 third_party/WebKit/LayoutTests/bluetooth/getPrimaryService/device-disconnects-during.html:18: requestDisconnection.writeValue(new Uint8Array([0])); Maybe call .connect() again as soon ...
4 years, 4 months ago (2016-07-28 22:45:14 UTC) #4
ortuno
https://codereview.chromium.org/2183903002/diff/20001/third_party/WebKit/LayoutTests/bluetooth/getPrimaryService/device-disconnects-during.html File third_party/WebKit/LayoutTests/bluetooth/getPrimaryService/device-disconnects-during.html (right): https://codereview.chromium.org/2183903002/diff/20001/third_party/WebKit/LayoutTests/bluetooth/getPrimaryService/device-disconnects-during.html#newcode18 third_party/WebKit/LayoutTests/bluetooth/getPrimaryService/device-disconnects-during.html:18: requestDisconnection.writeValue(new Uint8Array([0])); On 2016/07/28 at 22:45:14, Jeffrey Yasskin wrote: ...
4 years, 4 months ago (2016-07-29 16:11:51 UTC) #5
Jeffrey Yasskin
Perfect, thanks. https://codereview.chromium.org/2183903002/diff/60001/content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc File content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc (right): https://codereview.chromium.org/2183903002/diff/60001/content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc#newcode583 content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc:583: // 2. Disconnect the device. *If |disconnect| ...
4 years, 4 months ago (2016-07-29 18:17:25 UTC) #10
ortuno
Thanks! https://codereview.chromium.org/2183903002/diff/60001/content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc File content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc (right): https://codereview.chromium.org/2183903002/diff/60001/content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc#newcode583 content/shell/browser/layout_test/layout_test_bluetooth_adapter_provider.cc:583: // 2. Disconnect the device. On 2016/07/29 at ...
4 years, 4 months ago (2016-07-29 19:06:14 UTC) #13
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/2183903002/80001
4 years, 4 months ago (2016-07-29 19:07:16 UTC) #17
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 4 months ago (2016-07-29 19:35:46 UTC) #18
commit-bot: I haz the power
4 years, 4 months ago (2016-07-29 19:37:57 UTC) #20
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/ababc28cc3a0b4cc1f842548d1c5c31fdd4d2792
Cr-Commit-Position: refs/heads/master@{#408729}

Powered by Google App Engine
This is Rietveld 408576698