Index: device/bluetooth/dbus/bluetooth_gatt_service_service_provider_impl.cc |
diff --git a/device/bluetooth/dbus/bluetooth_gatt_service_service_provider_impl.cc b/device/bluetooth/dbus/bluetooth_gatt_service_service_provider_impl.cc |
index 4dec1557152c4d9c02a5ddf9d755257ebe0197ef..77d34837bd8927f41ba8e338b018d632a57c9414 100644 |
--- a/device/bluetooth/dbus/bluetooth_gatt_service_service_provider_impl.cc |
+++ b/device/bluetooth/dbus/bluetooth_gatt_service_service_provider_impl.cc |
@@ -23,9 +23,11 @@ BluetoothGattServiceServiceProviderImpl:: |
dbus::Bus* bus, |
const dbus::ObjectPath& object_path, |
const std::string& uuid, |
+ bool is_primary, |
const std::vector<dbus::ObjectPath>& includes) |
: origin_thread_id_(base::PlatformThread::CurrentId()), |
uuid_(uuid), |
+ is_primary_(is_primary), |
includes_(includes), |
bus_(bus), |
object_path_(object_path), |
@@ -69,9 +71,11 @@ BluetoothGattServiceServiceProviderImpl:: |
BluetoothGattServiceServiceProviderImpl:: |
BluetoothGattServiceServiceProviderImpl(const dbus::ObjectPath& object_path, |
- const std::string& uuid) |
+ const std::string& uuid, |
+ bool is_primary) |
: origin_thread_id_(base::PlatformThread::CurrentId()), |
uuid_(uuid), |
+ is_primary_(is_primary), |
bus_(nullptr), |
object_path_(object_path), |
weak_ptr_factory_(this) {} |
@@ -205,6 +209,11 @@ void BluetoothGattServiceServiceProviderImpl::WriteProperties( |
array_writer.CloseContainer(&dict_entry_writer); |
array_writer.OpenDictEntry(&dict_entry_writer); |
+ dict_entry_writer.AppendString(bluetooth_gatt_service::kPrimaryProperty); |
+ dict_entry_writer.AppendVariantOfBool(is_primary_); |
+ array_writer.CloseContainer(&dict_entry_writer); |
+ |
+ array_writer.OpenDictEntry(&dict_entry_writer); |
dict_entry_writer.AppendString(bluetooth_gatt_service::kIncludesProperty); |
dict_entry_writer.OpenVariant("ao", &variant_writer); |
variant_writer.AppendArrayOfObjectPaths(includes_); |