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

Issue 179123008: Migrate chrome.bluetooth API backend to use device::BluetoothDiscoverySession. (Closed)

Created:
6 years, 9 months ago by armansito
Modified:
6 years, 9 months ago
Reviewers:
keybuk, rpaquay
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org
Visibility:
Public.

Description

Migrate chrome.bluetooth API backend to use device::BluetoothDiscoverySession. Modified chrome.bluetooth API code to use the new discovery session API for device discovery. BUG=346982 TEST=1. unit_tests, browser_tests 2. Use multiple running extension instances with the bluetooth permission and check for the following behavior: - Only one session per extension. Calling chrome.bluetooth.stopDiscovery from one running app should fail if that app never called chrome.bluetooth.startDiscovery. - An app's discovery sessions should get cleaned up if that app crashes or unloads. - Use bt_console and run "power off". This should cause all discovery sessions that have been assigned to apps to get marked as inactive. Verify by requesting a new discovery session from apps, which should succeed. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=255262

Patch Set 1 #

Patch Set 2 : Rebase/Reupload #

Total comments: 2

Patch Set 3 : Addressed keybuk@'s comment. #

Patch Set 4 : Rebased. #

Patch Set 5 : Reupload #

Patch Set 6 : Moved constructors around a bit. Gonna try this time. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+269 lines, -109 lines) Patch
M chrome/browser/extensions/api/bluetooth/bluetooth_api.cc View 1 2 2 chunks +11 lines, -19 lines 0 comments Download
M chrome/browser/extensions/api/bluetooth/bluetooth_apitest.cc View 1 2 3 4 5 9 chunks +59 lines, -30 lines 0 comments Download
M chrome/browser/extensions/api/bluetooth/bluetooth_event_router.h View 1 2 5 chunks +30 lines, -15 lines 0 comments Download
M chrome/browser/extensions/api/bluetooth/bluetooth_event_router.cc View 1 2 8 chunks +85 lines, -33 lines 0 comments Download
M chrome/test/data/extensions/api_test/bluetooth/discovery_in_progress/runtest.js View 1 1 chunk +1 line, -1 line 0 comments Download
M device/bluetooth/bluetooth.gyp View 1 chunk +2 lines, -0 lines 0 comments Download
M device/bluetooth/bluetooth_adapter.cc View 1 chunk +1 line, -1 line 0 comments Download
M device/bluetooth/bluetooth_discovery_session.h View 1 2 3 4 5 1 chunk +4 lines, -2 lines 0 comments Download
M device/bluetooth/bluetooth_discovery_session.cc View 1 2 3 4 5 2 chunks +13 lines, -2 lines 0 comments Download
M device/bluetooth/test/mock_bluetooth_adapter.h View 2 chunks +7 lines, -6 lines 0 comments Download
M device/bluetooth/test/mock_bluetooth_adapter.cc View 1 chunk +10 lines, -0 lines 0 comments Download
A device/bluetooth/test/mock_bluetooth_discovery_session.h View 1 2 3 4 5 1 chunk +32 lines, -0 lines 0 comments Download
A device/bluetooth/test/mock_bluetooth_discovery_session.cc View 1 2 3 4 5 1 chunk +14 lines, -0 lines 0 comments Download

Messages

Total messages: 21 (0 generated)
armansito
This CL depends on https://codereview.chromium.org/184953002/. I will add some unit tests to bluetooth_event_router_unittest.cc later.
6 years, 9 months ago (2014-03-01 00:58:07 UTC) #1
keybuk
lgtm though consider the naming issue a strong nit ;-) https://codereview.chromium.org/179123008/diff/20001/chrome/browser/extensions/api/bluetooth/bluetooth_event_router.h File chrome/browser/extensions/api/bluetooth/bluetooth_event_router.h (right): https://codereview.chromium.org/179123008/diff/20001/chrome/browser/extensions/api/bluetooth/bluetooth_event_router.h#newcode102 ...
6 years, 9 months ago (2014-03-04 00:52:07 UTC) #2
armansito
https://codereview.chromium.org/179123008/diff/20001/chrome/browser/extensions/api/bluetooth/bluetooth_event_router.h File chrome/browser/extensions/api/bluetooth/bluetooth_event_router.h (right): https://codereview.chromium.org/179123008/diff/20001/chrome/browser/extensions/api/bluetooth/bluetooth_event_router.h#newcode102 chrome/browser/extensions/api/bluetooth/bluetooth_event_router.h:102: const base::Closure& error_callback); On 2014/03/04 00:52:07, keybuk wrote: > ...
6 years, 9 months ago (2014-03-04 01:16:55 UTC) #3
armansito
Ok, it seems like the linux_chromeos and linux_chromeos_clang bots have gone past the compile stage ...
6 years, 9 months ago (2014-03-05 07:11:33 UTC) #4
armansito
The CQ bit was checked by armansito@chromium.org
6 years, 9 months ago (2014-03-05 08:04:01 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/armansito@chromium.org/179123008/100001
6 years, 9 months ago (2014-03-05 08:05:32 UTC) #6
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-05 09:35:33 UTC) #7
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) unit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=275103
6 years, 9 months ago (2014-03-05 09:35:34 UTC) #8
armansito
The CQ bit was checked by armansito@chromium.org
6 years, 9 months ago (2014-03-05 10:06:35 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/armansito@chromium.org/179123008/100001
6 years, 9 months ago (2014-03-05 10:06:47 UTC) #10
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-05 12:16:00 UTC) #11
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) unit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=275164
6 years, 9 months ago (2014-03-05 12:16:01 UTC) #12
armansito
The CQ bit was checked by armansito@chromium.org
6 years, 9 months ago (2014-03-05 16:46:18 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/armansito@chromium.org/179123008/100001
6 years, 9 months ago (2014-03-05 16:48:27 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/armansito@chromium.org/179123008/100001
6 years, 9 months ago (2014-03-05 23:55:41 UTC) #15
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-06 02:21:57 UTC) #16
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) unit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=275976
6 years, 9 months ago (2014-03-06 02:21:57 UTC) #17
armansito
The CQ bit was checked by armansito@chromium.org
6 years, 9 months ago (2014-03-06 02:22:50 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/armansito@chromium.org/179123008/100001
6 years, 9 months ago (2014-03-06 02:24:28 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/armansito@chromium.org/179123008/100001
6 years, 9 months ago (2014-03-06 03:09:30 UTC) #20
commit-bot: I haz the power
6 years, 9 months ago (2014-03-06 05:40:21 UTC) #21
Message was sent while issue was closed.
Change committed as 255262

Powered by Google App Engine
This is Rietveld 408576698