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

Issue 1922923002: bluetooth: Move requestDevice to mojo (Closed)

Created:
4 years, 8 months ago by ortuno
Modified:
4 years, 7 months ago
CC:
Aaron Boodman, abarth-chromium, ben+mojo_chromium.org, blink-reviews, blink-reviews-api_chromium.org, chromium-reviews, darin (slow to review), darin-cc_chromium.org, dglazkov+blink, jam, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org, ortuno+watch_chromium.org, qsr+mojo_chromium.org, scheib+watch_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@bluetooth-separate-tests-request-device
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

bluetooth: Move requestDevice to mojo Changes in order of importance and complexity: 1. Move most of the logic of BluetoothDispatcherHost::OnRequestDeviceImpl to a new class called BluetoothDeviceProvider. 2. Introduce BluetoothAdapterFactoryWrapper to manage adapters and their observers. This class allows us to set the adapter from tests. It will be removed once we no longer need to swap adapters to change an adapter's behavior. 3. Fix BluetoothBlacklist and BluetoothAllowedDevicesMap to use mojo types. 4. Remove content/common/bluetooth and content/renderer/bluetooth/bluetooth_dispatcher \o/ BUG=508771 Committed: https://crrev.com/b6374dd8ae9d5d1b4d99bfbebb45e9adddc45a24 Cr-Commit-Position: refs/heads/master@{#396369}

Patch Set 1 #

Patch Set 2 : All tests passing! #

Patch Set 3 : Merge #

Patch Set 4 : Clean up allowed devices map #

Patch Set 5 : Blacklist #

Patch Set 6 : Moar clean up #

Patch Set 7 : Format #

Patch Set 8 : Clean up #

Patch Set 9 : git status #

Patch Set 10 : Merge #

Patch Set 11 : Remove debug log #

Total comments: 67

Patch Set 12 : Address jyasskin's comments #

Patch Set 13 : Rebase #

Total comments: 8

Patch Set 14 : Address moar comments! #

Total comments: 2

Patch Set 15 : Merge #

Total comments: 8

Patch Set 16 : Add test for renderer crash #

Patch Set 17 : Change ref to pointer #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1643 lines, -1971 lines) Patch
M chrome/browser/web_bluetooth_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +49 lines, -2 lines 0 comments Download
A content/browser/bluetooth/bluetooth_adapter_factory_wrapper.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +99 lines, -0 lines 0 comments Download
A content/browser/bluetooth/bluetooth_adapter_factory_wrapper.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +146 lines, -0 lines 0 comments Download
M content/browser/bluetooth/bluetooth_allowed_devices_map.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +10 lines, -5 lines 0 comments Download
M content/browser/bluetooth/bluetooth_allowed_devices_map.cc View 1 2 3 6 chunks +13 lines, -24 lines 0 comments Download
M content/browser/bluetooth/bluetooth_allowed_devices_map_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 8 chunks +178 lines, -147 lines 0 comments Download
M content/browser/bluetooth/bluetooth_blacklist.h View 1 2 3 4 5 3 chunks +7 lines, -5 lines 0 comments Download
M content/browser/bluetooth/bluetooth_blacklist.cc View 1 2 3 4 3 chunks +11 lines, -13 lines 0 comments Download
M content/browser/bluetooth/bluetooth_blacklist_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +130 lines, -72 lines 0 comments Download
A content/browser/bluetooth/bluetooth_device_chooser_controller.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +145 lines, -0 lines 0 comments Download
A content/browser/bluetooth/bluetooth_device_chooser_controller.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +483 lines, -0 lines 0 comments Download
M content/browser/bluetooth/bluetooth_dispatcher_host.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -187 lines 0 comments Download
D content/browser/bluetooth/bluetooth_dispatcher_host.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -779 lines 0 comments Download
M content/browser/bluetooth/bluetooth_metrics.h View 1 2 3 4 5 1 chunk +2 lines, -3 lines 0 comments Download
M content/browser/bluetooth/bluetooth_metrics.cc View 1 2 3 4 5 2 chunks +18 lines, -22 lines 0 comments Download
M content/browser/bluetooth/cache_query_result.h View 1 2 3 4 5 6 7 3 chunks +8 lines, -11 lines 0 comments Download
M content/browser/bluetooth/web_bluetooth_service_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 9 chunks +36 lines, -5 lines 0 comments Download
M content/browser/bluetooth/web_bluetooth_service_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 13 chunks +156 lines, -33 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 4 chunks +3 lines, -3 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 4 chunks +3 lines, -16 lines 0 comments Download
D content/common/bluetooth/DEPS View 1 2 3 4 5 1 chunk +0 lines, -4 lines 0 comments Download
D content/common/bluetooth/OWNERS View 1 2 3 4 5 1 chunk +0 lines, -16 lines 0 comments Download
D content/common/bluetooth/PRESUBMIT.py View 1 2 3 4 5 1 chunk +0 lines, -14 lines 0 comments Download
D content/common/bluetooth/bluetooth_device.h View 1 2 3 4 5 1 chunk +0 lines, -37 lines 0 comments Download
D content/common/bluetooth/bluetooth_device.cc View 1 2 3 4 5 1 chunk +0 lines, -37 lines 0 comments Download
D content/common/bluetooth/bluetooth_messages.h View 1 2 3 4 5 1 chunk +0 lines, -128 lines 0 comments Download
D content/common/bluetooth/bluetooth_scan_filter.h View 1 2 3 4 5 1 chunk +0 lines, -30 lines 0 comments Download
D content/common/bluetooth/bluetooth_scan_filter.cc View 1 2 3 4 5 1 chunk +0 lines, -18 lines 0 comments Download
M content/common/content_message_generator.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -1 line 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +4 lines, -2 lines 0 comments Download
M content/content_common.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +0 lines, -6 lines 0 comments Download
M content/content_renderer.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +2 lines, -4 lines 0 comments Download
D content/renderer/bluetooth/bluetooth_dispatcher.h View 1 2 3 4 5 1 chunk +0 lines, -84 lines 0 comments Download
D content/renderer/bluetooth/bluetooth_dispatcher.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -145 lines 0 comments Download
D content/renderer/bluetooth/bluetooth_message_filter.h View 1 2 3 4 5 1 chunk +0 lines, -31 lines 0 comments Download
D content/renderer/bluetooth/bluetooth_message_filter.cc View 1 2 3 4 5 1 chunk +0 lines, -37 lines 0 comments Download
A content/renderer/bluetooth/bluetooth_type_converters.h View 1 chunk +34 lines, -0 lines 0 comments Download
A content/renderer/bluetooth/bluetooth_type_converters.cc View 1 2 3 4 1 chunk +44 lines, -0 lines 0 comments Download
M content/renderer/bluetooth/web_bluetooth_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +5 lines, -8 lines 0 comments Download
M content/renderer/bluetooth/web_bluetooth_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +27 lines, -14 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +2 lines, -6 lines 0 comments Download
M content/renderer/render_thread_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +0 lines, -3 lines 0 comments Download
M content/renderer/render_thread_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +0 lines, -4 lines 0 comments Download
M content/test/layouttest_support.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +3 lines, -6 lines 0 comments Download
M third_party/WebKit/LayoutTests/resources/bluetooth/bluetooth-helpers.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/modules/bluetooth/Bluetooth.cpp View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/public/platform/modules/bluetooth/WebRequestDeviceOptions.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/public/platform/modules/bluetooth/web_bluetooth.mojom View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +20 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 57 (20 generated)
ortuno
jyasskin: PTAL
4 years, 7 months ago (2016-05-11 19:34:06 UTC) #3
Jeffrey Yasskin
https://codereview.chromium.org/1922923002/diff/200001/content/browser/bluetooth/bluetooth_adapter_factory_wrapper.h File content/browser/bluetooth/bluetooth_adapter_factory_wrapper.h (right): https://codereview.chromium.org/1922923002/diff/200001/content/browser/bluetooth/bluetooth_adapter_factory_wrapper.h#newcode24 content/browser/bluetooth/bluetooth_adapter_factory_wrapper.h:24: class CONTENT_EXPORT BluetoothAdapterFactoryWrapper final { "FactoryWrapper" is also an ...
4 years, 7 months ago (2016-05-13 04:42:00 UTC) #4
ortuno
https://codereview.chromium.org/1922923002/diff/200001/content/browser/bluetooth/bluetooth_adapter_factory_wrapper.h File content/browser/bluetooth/bluetooth_adapter_factory_wrapper.h (right): https://codereview.chromium.org/1922923002/diff/200001/content/browser/bluetooth/bluetooth_adapter_factory_wrapper.h#newcode24 content/browser/bluetooth/bluetooth_adapter_factory_wrapper.h:24: class CONTENT_EXPORT BluetoothAdapterFactoryWrapper final { On 2016/05/13 at 04:41:58, ...
4 years, 7 months ago (2016-05-13 20:11:18 UTC) #7
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1922923002/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1922923002/260001
4 years, 7 months ago (2016-05-13 20:11:54 UTC) #9
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: cast_shell_linux on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linux/builds/160219) ios-device on ...
4 years, 7 months ago (2016-05-13 20:15:40 UTC) #11
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1922923002/280001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1922923002/280001
4 years, 7 months ago (2016-05-13 21:26:16 UTC) #13
Jeffrey Yasskin
LGTM, thanks! https://codereview.chromium.org/1922923002/diff/200001/content/browser/bluetooth/bluetooth_adapter_factory_wrapper.h File content/browser/bluetooth/bluetooth_adapter_factory_wrapper.h (right): https://codereview.chromium.org/1922923002/diff/200001/content/browser/bluetooth/bluetooth_adapter_factory_wrapper.h#newcode24 content/browser/bluetooth/bluetooth_adapter_factory_wrapper.h:24: class CONTENT_EXPORT BluetoothAdapterFactoryWrapper final { On 2016/05/13 ...
4 years, 7 months ago (2016-05-13 21:36:56 UTC) #14
ortuno
Thanks! https://codereview.chromium.org/1922923002/diff/200001/content/browser/bluetooth/bluetooth_adapter_factory_wrapper.h File content/browser/bluetooth/bluetooth_adapter_factory_wrapper.h (right): https://codereview.chromium.org/1922923002/diff/200001/content/browser/bluetooth/bluetooth_adapter_factory_wrapper.h#newcode24 content/browser/bluetooth/bluetooth_adapter_factory_wrapper.h:24: class CONTENT_EXPORT BluetoothAdapterFactoryWrapper final { On 2016/05/13 at ...
4 years, 7 months ago (2016-05-13 22:14:39 UTC) #15
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1922923002/300001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1922923002/300001
4 years, 7 months ago (2016-05-13 22:15:22 UTC) #17
ortuno
palmer: PTAL at content/common and third_party/WebKit/public/platform/modules/bluetooth/ rockot: PTAL at mojo bits in third_party/WebKit/public/platform/modules/bluetooth/, content/renderer/ and ...
4 years, 7 months ago (2016-05-13 22:17:15 UTC) #19
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-14 00:52:31 UTC) #21
Ken Rockot(use gerrit already)
Sorry I dropped this somehow. LGTM
4 years, 7 months ago (2016-05-19 17:59:10 UTC) #22
ortuno
palmer: ping?
4 years, 7 months ago (2016-05-23 16:26:58 UTC) #23
palmer
https://codereview.chromium.org/1922923002/diff/300001/third_party/WebKit/public/platform/modules/bluetooth/web_bluetooth.mojom File third_party/WebKit/public/platform/modules/bluetooth/web_bluetooth.mojom (right): https://codereview.chromium.org/1922923002/diff/300001/third_party/WebKit/public/platform/modules/bluetooth/web_bluetooth.mojom#newcode92 third_party/WebKit/public/platform/modules/bluetooth/web_bluetooth.mojom:92: array<string> uuids; I know I sound like a broken ...
4 years, 7 months ago (2016-05-23 19:26:00 UTC) #24
ortuno
https://codereview.chromium.org/1922923002/diff/300001/third_party/WebKit/public/platform/modules/bluetooth/web_bluetooth.mojom File third_party/WebKit/public/platform/modules/bluetooth/web_bluetooth.mojom (right): https://codereview.chromium.org/1922923002/diff/300001/third_party/WebKit/public/platform/modules/bluetooth/web_bluetooth.mojom#newcode92 third_party/WebKit/public/platform/modules/bluetooth/web_bluetooth.mojom:92: array<string> uuids; On 2016/05/23 at 19:26:00, palmer wrote: > ...
4 years, 7 months ago (2016-05-23 20:11:06 UTC) #25
dcheng
On 2016/05/23 at 20:11:06, ortuno wrote: > https://codereview.chromium.org/1922923002/diff/300001/third_party/WebKit/public/platform/modules/bluetooth/web_bluetooth.mojom > File third_party/WebKit/public/platform/modules/bluetooth/web_bluetooth.mojom (right): > > https://codereview.chromium.org/1922923002/diff/300001/third_party/WebKit/public/platform/modules/bluetooth/web_bluetooth.mojom#newcode92 ...
4 years, 7 months ago (2016-05-23 21:00:11 UTC) #26
ortuno
On 2016/05/23 at 21:00:11, dcheng wrote: > On 2016/05/23 at 20:11:06, ortuno wrote: > > ...
4 years, 7 months ago (2016-05-23 21:08:20 UTC) #27
palmer
> I'm currently working on a follow up patch to use BluetoothUUID instead of just ...
4 years, 7 months ago (2016-05-23 21:19:48 UTC) #28
ortuno
On 2016/05/23 at 21:19:48, palmer wrote: > > I'm currently working on a follow up ...
4 years, 7 months ago (2016-05-23 22:01:56 UTC) #29
palmer
> Not for the format specifically. Though, if a renderer tries to perform any > ...
4 years, 7 months ago (2016-05-23 22:19:41 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1922923002/320001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1922923002/320001
4 years, 7 months ago (2016-05-23 22:48:20 UTC) #33
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/188431)
4 years, 7 months ago (2016-05-23 23:02:39 UTC) #35
ortuno
nick: PTAL at the following files: content/browser/renderer_host/render_process_host_impl.h content/browser/renderer_host/render_process_host_impl.cc content/renderer/render_frame_impl.cc content/renderer/render_thread_impl.h content/renderer/render_thread_impl.cc content/test/layouttest_support.cc
4 years, 7 months ago (2016-05-24 15:17:38 UTC) #37
ncarter (slow)
lgtm with a test suggestion and one style fix https://codereview.chromium.org/1922923002/diff/320001/content/browser/renderer_host/render_process_host_impl.cc File content/browser/renderer_host/render_process_host_impl.cc (right): https://codereview.chromium.org/1922923002/diff/320001/content/browser/renderer_host/render_process_host_impl.cc#newcode2737 content/browser/renderer_host/render_process_host_impl.cc:2737: ...
4 years, 7 months ago (2016-05-25 21:19:18 UTC) #38
Jeffrey Yasskin
https://codereview.chromium.org/1922923002/diff/320001/content/browser/renderer_host/render_process_host_impl.h File content/browser/renderer_host/render_process_host_impl.h (right): https://codereview.chromium.org/1922923002/diff/320001/content/browser/renderer_host/render_process_host_impl.h#newcode264 content/browser/renderer_host/render_process_host_impl.h:264: BluetoothAdapterFactoryWrapper& GetBluetoothAdapterFactoryWrapper(); On 2016/05/25 21:19:18, ncarter wrote: > This ...
4 years, 7 months ago (2016-05-25 21:31:02 UTC) #39
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1922923002/340001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1922923002/340001
4 years, 7 months ago (2016-05-26 19:52:23 UTC) #41
ortuno
https://codereview.chromium.org/1922923002/diff/320001/content/browser/renderer_host/render_process_host_impl.cc File content/browser/renderer_host/render_process_host_impl.cc (right): https://codereview.chromium.org/1922923002/diff/320001/content/browser/renderer_host/render_process_host_impl.cc#newcode2737 content/browser/renderer_host/render_process_host_impl.cc:2737: return bluetooth_adapter_factory_wrapper_; On 2016/05/25 at 21:19:18, ncarter wrote: > ...
4 years, 7 months ago (2016-05-26 20:31:01 UTC) #42
ncarter (slow)
https://codereview.chromium.org/1922923002/diff/320001/content/browser/renderer_host/render_process_host_impl.h File content/browser/renderer_host/render_process_host_impl.h (right): https://codereview.chromium.org/1922923002/diff/320001/content/browser/renderer_host/render_process_host_impl.h#newcode264 content/browser/renderer_host/render_process_host_impl.h:264: BluetoothAdapterFactoryWrapper& GetBluetoothAdapterFactoryWrapper(); On 2016/05/26 20:31:01, ortuno wrote: > On ...
4 years, 7 months ago (2016-05-26 21:47:35 UTC) #43
ncarter (slow)
https://codereview.chromium.org/1922923002/diff/320001/content/browser/renderer_host/render_process_host_impl.h File content/browser/renderer_host/render_process_host_impl.h (right): https://codereview.chromium.org/1922923002/diff/320001/content/browser/renderer_host/render_process_host_impl.h#newcode264 content/browser/renderer_host/render_process_host_impl.h:264: BluetoothAdapterFactoryWrapper& GetBluetoothAdapterFactoryWrapper(); On 2016/05/26 21:47:35, ncarter wrote: > On ...
4 years, 7 months ago (2016-05-26 22:02:34 UTC) #44
commit-bot: I haz the power
Dry run: None
4 years, 7 months ago (2016-05-26 23:17:37 UTC) #45
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1922923002/360001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1922923002/360001
4 years, 7 months ago (2016-05-26 23:19:41 UTC) #47
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-27 01:30:39 UTC) #49
commit-bot: I haz the power
Dry run: None
4 years, 7 months ago (2016-05-27 01:30:55 UTC) #50
ortuno
Thanks! https://codereview.chromium.org/1922923002/diff/320001/content/browser/renderer_host/render_process_host_impl.h File content/browser/renderer_host/render_process_host_impl.h (right): https://codereview.chromium.org/1922923002/diff/320001/content/browser/renderer_host/render_process_host_impl.h#newcode264 content/browser/renderer_host/render_process_host_impl.h:264: BluetoothAdapterFactoryWrapper& GetBluetoothAdapterFactoryWrapper(); On 2016/05/26 at 22:02:34, ncarter wrote: ...
4 years, 7 months ago (2016-05-27 02:53:25 UTC) #52
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1922923002/360001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1922923002/360001
4 years, 7 months ago (2016-05-27 02:53:47 UTC) #54
commit-bot: I haz the power
Committed patchset #17 (id:360001)
4 years, 7 months ago (2016-05-27 03:04:19 UTC) #55
commit-bot: I haz the power
4 years, 7 months ago (2016-05-27 03:06:07 UTC) #57
Message was sent while issue was closed.
Patchset 17 (id:??) landed as
https://crrev.com/b6374dd8ae9d5d1b4d99bfbebb45e9adddc45a24
Cr-Commit-Position: refs/heads/master@{#396369}

Powered by Google App Engine
This is Rietveld 408576698