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

Issue 189463002: 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
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. This CL is the same as r255262 which was reverted due to a memory leak. The leak has been addressed in this patch. BUG=346982, 349942 TEST=1. Run unit_tests and browser_tests with LSan. 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=255609

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+271 lines, -117 lines) Patch
M chrome/browser/extensions/api/bluetooth/bluetooth_api.cc View 2 chunks +11 lines, -19 lines 0 comments Download
M chrome/browser/extensions/api/bluetooth/bluetooth_apitest.cc View 9 chunks +59 lines, -30 lines 0 comments Download
M chrome/browser/extensions/api/bluetooth/bluetooth_event_router.h View 5 chunks +30 lines, -15 lines 0 comments Download
M chrome/browser/extensions/api/bluetooth/bluetooth_event_router.cc View 8 chunks +88 lines, -38 lines 0 comments Download
M chrome/test/data/extensions/api_test/bluetooth/discovery_in_progress/runtest.js View 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 chunk +4 lines, -2 lines 0 comments Download
M device/bluetooth/bluetooth_discovery_session.cc View 2 chunks +14 lines, -5 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 +8 lines, -0 lines 0 comments Download
A device/bluetooth/test/mock_bluetooth_discovery_session.h View 1 chunk +32 lines, -0 lines 0 comments Download
A device/bluetooth/test/mock_bluetooth_discovery_session.cc View 1 chunk +14 lines, -0 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
armansito
Leak was in BluetoothEventRouter::DeviceAdded. I forgot to changing from allocating the bluetooth::Device object on the ...
6 years, 9 months ago (2014-03-06 23:52:44 UTC) #1
keybuk
lgtm
6 years, 9 months ago (2014-03-06 23:58:03 UTC) #2
armansito
The CQ bit was checked by armansito@chromium.org
6 years, 9 months ago (2014-03-07 03:10:37 UTC) #3
armansito
On 2014/03/06 23:58:03, keybuk wrote: > lgtm linux_asan passed; that's good enough for me. linux_chromeos_asan ...
6 years, 9 months ago (2014-03-07 03:11:09 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/armansito@chromium.org/189463002/1
6 years, 9 months ago (2014-03-07 03:15:56 UTC) #5
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-07 05:40:11 UTC) #6
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel
6 years, 9 months ago (2014-03-07 05:40:12 UTC) #7
armansito
The CQ bit was checked by armansito@chromium.org
6 years, 9 months ago (2014-03-07 05:57:42 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/armansito@chromium.org/189463002/1
6 years, 9 months ago (2014-03-07 06:01:30 UTC) #9
commit-bot: I haz the power
6 years, 9 months ago (2014-03-07 14:17:42 UTC) #10
Message was sent while issue was closed.
Change committed as 255609

Powered by Google App Engine
This is Rietveld 408576698