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

Issue 939753004: device/bluetooth: Implement Unregister() of BlueotoothAudioSinkChromeOS and disconnection-related c… (Closed)

Created:
5 years, 10 months ago by Miao
Modified:
5 years, 10 months ago
Reviewers:
armansito, Ben Chan
CC:
chromium-reviews, stevenjb+watch_chromium.org, hashimoto+watch_chromium.org, oshima+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

device/bluetooth: Implement Unregister() of BlueotoothAudioSinkChromeOS and disconnection-related clean-up. This CL implements all functions related to unregistering BluetoothAudioSinkChromeOS and cleaning up the resources, such as media, media endpoint, media transport and transport-specific properties. These functions will be called when a connect between a remote device and an A2DP sink closes. The corresponding tests are included in BluetoothAudioSinkChromeOSTest. BUG=441581 TEST=device_unittests --gtest_filter=*AudioSink* Committed: https://crrev.com/4a0cac258fddaafd18cdcd0cea53121826ab4c3a Cr-Commit-Position: refs/heads/master@{#318266}

Patch Set 1 #

Total comments: 39

Patch Set 2 : Revised helper functions in FakeBluetoothMediaClient and FakeBluetoothMediaTransportClient and modi… #

Total comments: 25

Patch Set 3 : Changed volume_ back to uint16_t with a defined range. #

Total comments: 10

Patch Set 4 : Moved kInvalidVolume to BluetoothAudioSink. #

Total comments: 4

Patch Set 5 : Defined Transport structure, added two setters for state/volume, and modified GetProperties(). #

Total comments: 11

Patch Set 6 : Fixed nits. #

Total comments: 6

Patch Set 7 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+730 lines, -251 lines) Patch
M chromeos/dbus/fake_bluetooth_media_client.h View 1 2 3 chunks +13 lines, -6 lines 0 comments Download
M chromeos/dbus/fake_bluetooth_media_client.cc View 1 2 5 chunks +37 lines, -21 lines 0 comments Download
M chromeos/dbus/fake_bluetooth_media_endpoint_service_provider.cc View 1 2 chunks +10 lines, -6 lines 0 comments Download
M chromeos/dbus/fake_bluetooth_media_transport_client.h View 1 2 3 4 5 6 2 chunks +44 lines, -9 lines 0 comments Download
M chromeos/dbus/fake_bluetooth_media_transport_client.cc View 1 2 3 4 5 6 6 chunks +114 lines, -31 lines 0 comments Download
M device/bluetooth/bluetooth_audio_sink.h View 1 2 3 4 3 chunks +10 lines, -2 lines 0 comments Download
M device/bluetooth/bluetooth_audio_sink.cc View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M device/bluetooth/bluetooth_audio_sink_chromeos.h View 1 2 3 3 chunks +20 lines, -6 lines 0 comments Download
M device/bluetooth/bluetooth_audio_sink_chromeos.cc View 1 2 3 4 13 chunks +114 lines, -68 lines 0 comments Download
M device/bluetooth/bluetooth_audio_sink_chromeos_unittest.cc View 1 2 3 4 5 9 chunks +365 lines, -102 lines 0 comments Download

Messages

Total messages: 22 (5 generated)
Miao
This CL is ready for review.
5 years, 10 months ago (2015-02-18 23:55:54 UTC) #2
Ben Chan
https://codereview.chromium.org/939753004/diff/1/chromeos/dbus/fake_bluetooth_media_client.cc File chromeos/dbus/fake_bluetooth_media_client.cc (right): https://codereview.chromium.org/939753004/diff/1/chromeos/dbus/fake_bluetooth_media_client.cc#newcode85 chromeos/dbus/fake_bluetooth_media_client.cc:85: if (endpoints_.find(endpoint_path) == endpoints_.end()) { see ContainsKey in src/base/stl_util.h ...
5 years, 10 months ago (2015-02-19 00:21:46 UTC) #3
armansito
First round of comments, haven't looked at the unit tests yet. https://codereview.chromium.org/939753004/diff/1/chromeos/dbus/fake_bluetooth_media_client.cc File chromeos/dbus/fake_bluetooth_media_client.cc (right): ...
5 years, 10 months ago (2015-02-19 00:37:47 UTC) #4
Miao
https://codereview.chromium.org/939753004/diff/1/chromeos/dbus/fake_bluetooth_media_client.cc File chromeos/dbus/fake_bluetooth_media_client.cc (right): https://codereview.chromium.org/939753004/diff/1/chromeos/dbus/fake_bluetooth_media_client.cc#newcode85 chromeos/dbus/fake_bluetooth_media_client.cc:85: if (endpoints_.find(endpoint_path) == endpoints_.end()) { On 2015/02/19 00:21:45, Ben ...
5 years, 10 months ago (2015-02-23 21:04:25 UTC) #5
armansito
https://codereview.chromium.org/939753004/diff/20001/chromeos/dbus/fake_bluetooth_media_client.cc File chromeos/dbus/fake_bluetooth_media_client.cc (right): https://codereview.chromium.org/939753004/diff/20001/chromeos/dbus/fake_bluetooth_media_client.cc#newcode102 chromeos/dbus/fake_bluetooth_media_client.cc:102: while (endpoints_.begin() != endpoints_.end()) { nit: no need for ...
5 years, 10 months ago (2015-02-23 22:07:06 UTC) #6
Miao
https://codereview.chromium.org/939753004/diff/20001/chromeos/dbus/fake_bluetooth_media_client.cc File chromeos/dbus/fake_bluetooth_media_client.cc (right): https://codereview.chromium.org/939753004/diff/20001/chromeos/dbus/fake_bluetooth_media_client.cc#newcode102 chromeos/dbus/fake_bluetooth_media_client.cc:102: while (endpoints_.begin() != endpoints_.end()) { On 2015/02/23 22:07:06, armansito ...
5 years, 10 months ago (2015-02-24 01:12:13 UTC) #7
armansito
https://codereview.chromium.org/939753004/diff/40001/chromeos/dbus/fake_bluetooth_media_transport_client.cc File chromeos/dbus/fake_bluetooth_media_transport_client.cc (right): https://codereview.chromium.org/939753004/diff/40001/chromeos/dbus/fake_bluetooth_media_transport_client.cc#newcode30 chromeos/dbus/fake_bluetooth_media_transport_client.cc:30: << "/fake_audio_source/fd" << sequence_number; nit: use chromeos::FakeBluetoothAdapterClient::kTransportDevicePath here. https://codereview.chromium.org/939753004/diff/40001/device/bluetooth/bluetooth_audio_sink_chromeos.cc ...
5 years, 10 months ago (2015-02-24 01:38:06 UTC) #8
Miao
https://codereview.chromium.org/939753004/diff/40001/chromeos/dbus/fake_bluetooth_media_transport_client.cc File chromeos/dbus/fake_bluetooth_media_transport_client.cc (right): https://codereview.chromium.org/939753004/diff/40001/chromeos/dbus/fake_bluetooth_media_transport_client.cc#newcode30 chromeos/dbus/fake_bluetooth_media_transport_client.cc:30: << "/fake_audio_source/fd" << sequence_number; On 2015/02/24 01:38:05, armansito wrote: ...
5 years, 10 months ago (2015-02-24 05:11:39 UTC) #9
armansito
lgtm with nits https://codereview.chromium.org/939753004/diff/60001/device/bluetooth/bluetooth_audio_sink.h File device/bluetooth/bluetooth_audio_sink.h (right): https://codereview.chromium.org/939753004/diff/60001/device/bluetooth/bluetooth_audio_sink.h#newcode105 device/bluetooth/bluetooth_audio_sink.h:105: // are 0-128, where 0-127 are ...
5 years, 10 months ago (2015-02-24 23:42:10 UTC) #10
Miao
https://codereview.chromium.org/939753004/diff/60001/device/bluetooth/bluetooth_audio_sink.h File device/bluetooth/bluetooth_audio_sink.h (right): https://codereview.chromium.org/939753004/diff/60001/device/bluetooth/bluetooth_audio_sink.h#newcode105 device/bluetooth/bluetooth_audio_sink.h:105: // are 0-128, where 0-127 are valid volumes and ...
5 years, 10 months ago (2015-02-26 02:17:46 UTC) #11
armansito
not lgtm, please address my new set of comments, they are mostly nits. https://codereview.chromium.org/939753004/diff/80001/chromeos/dbus/fake_bluetooth_media_transport_client.cc File ...
5 years, 10 months ago (2015-02-26 02:27:34 UTC) #12
Miao
https://codereview.chromium.org/939753004/diff/80001/chromeos/dbus/fake_bluetooth_media_transport_client.cc File chromeos/dbus/fake_bluetooth_media_transport_client.cc (right): https://codereview.chromium.org/939753004/diff/80001/chromeos/dbus/fake_bluetooth_media_transport_client.cc#newcode91 chromeos/dbus/fake_bluetooth_media_transport_client.cc:91: FakeBluetoothMediaTransportClient::~FakeBluetoothMediaTransportClient() { On 2015/02/26 02:27:34, armansito wrote: > You ...
5 years, 10 months ago (2015-02-26 04:02:53 UTC) #13
armansito
lgtm with nits https://codereview.chromium.org/939753004/diff/100001/chromeos/dbus/fake_bluetooth_media_transport_client.cc File chromeos/dbus/fake_bluetooth_media_transport_client.cc (right): https://codereview.chromium.org/939753004/diff/100001/chromeos/dbus/fake_bluetooth_media_transport_client.cc#newcode95 chromeos/dbus/fake_bluetooth_media_transport_client.cc:95: delete it->second; for (auto& it : ...
5 years, 10 months ago (2015-02-26 04:23:08 UTC) #14
Miao
https://codereview.chromium.org/939753004/diff/100001/chromeos/dbus/fake_bluetooth_media_transport_client.cc File chromeos/dbus/fake_bluetooth_media_transport_client.cc (right): https://codereview.chromium.org/939753004/diff/100001/chromeos/dbus/fake_bluetooth_media_transport_client.cc#newcode95 chromeos/dbus/fake_bluetooth_media_transport_client.cc:95: delete it->second; On 2015/02/26 04:23:08, armansito wrote: > for ...
5 years, 10 months ago (2015-02-26 04:41:50 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/939753004/120001
5 years, 10 months ago (2015-02-26 17:42:43 UTC) #20
commit-bot: I haz the power
Committed patchset #7 (id:120001)
5 years, 10 months ago (2015-02-26 18:35:09 UTC) #21
commit-bot: I haz the power
5 years, 10 months ago (2015-02-26 18:36:37 UTC) #22
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/4a0cac258fddaafd18cdcd0cea53121826ab4c3a
Cr-Commit-Position: refs/heads/master@{#318266}

Powered by Google App Engine
This is Rietveld 408576698