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

Unified Diff: device/bluetooth/dbus/fake_bluetooth_media_transport_client.cc

Issue 1378573002: Fix static initializers from r316709. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: lint Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: device/bluetooth/dbus/fake_bluetooth_media_transport_client.cc
diff --git a/device/bluetooth/dbus/fake_bluetooth_media_transport_client.cc b/device/bluetooth/dbus/fake_bluetooth_media_transport_client.cc
index b71aa105fa5aab36a34dc0a33de0b1fdb3695fe5..1a0a10610eae37045d2b4a4c2cd37d7bbc2aad8f 100644
--- a/device/bluetooth/dbus/fake_bluetooth_media_transport_client.cc
+++ b/device/bluetooth/dbus/fake_bluetooth_media_transport_client.cc
@@ -41,6 +41,9 @@ ObjectPath GenerateTransportPath() {
return ObjectPath(path.str());
}
+#define UINT8_VECTOR_FROM_ARRAY(array) \
+ std::vector<uint8_t>(array, array + arraysize(array))
+
} // namespace
namespace bluez {
@@ -49,9 +52,10 @@ namespace bluez {
const char FakeBluetoothMediaTransportClient::kTransportDevicePath[] =
"/fake_audio_source";
const uint8_t FakeBluetoothMediaTransportClient::kTransportCodec = 0x00;
-const std::vector<uint8_t>
- FakeBluetoothMediaTransportClient::kTransportConfiguration = {0x21, 0x15,
- 0x33, 0x2C};
+const uint8_t FakeBluetoothMediaTransportClient::kTransportConfiguration[] = {
+ 0x21, 0x15, 0x33, 0x2C};
+const uint8_t FakeBluetoothMediaTransportClient::kTransportConfigurationLength =
+ arraysize(FakeBluetoothMediaTransportClient::kTransportConfiguration);
const uint16_t FakeBluetoothMediaTransportClient::kTransportDelay = 5;
const uint16_t FakeBluetoothMediaTransportClient::kTransportVolume = 50;
const uint16_t FakeBluetoothMediaTransportClient::kDefaultReadMtu = 20;
@@ -169,7 +173,8 @@ void FakeBluetoothMediaTransportClient::SetValid(
properties->uuid.ReplaceValue(
BluetoothMediaClient::kBluetoothAudioSinkUUID);
properties->codec.ReplaceValue(kTransportCodec);
- properties->configuration.ReplaceValue(kTransportConfiguration);
+ properties->configuration.ReplaceValue(
+ UINT8_VECTOR_FROM_ARRAY(kTransportConfiguration));
properties->state.ReplaceValue(BluetoothMediaTransportClient::kStateIdle);
properties->delay.ReplaceValue(kTransportDelay);
properties->volume.ReplaceValue(kTransportVolume);

Powered by Google App Engine
This is Rietveld 408576698