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

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

Issue 1946053002: Fixes to DBus GATT components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/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_);

Powered by Google App Engine
This is Rietveld 408576698