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

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

Issue 1974633002: Implement DBus changes needed for notifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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_application_service_provider_impl.cc
diff --git a/device/bluetooth/dbus/bluetooth_gatt_application_service_provider_impl.cc b/device/bluetooth/dbus/bluetooth_gatt_application_service_provider_impl.cc
index 41c3cc62ca5a84eede7a3f719f28c10d17710c96..873ea3202eefddf8adf1924caa9a09ca448db264 100644
--- a/device/bluetooth/dbus/bluetooth_gatt_application_service_provider_impl.cc
+++ b/device/bluetooth/dbus/bluetooth_gatt_application_service_provider_impl.cc
@@ -22,7 +22,8 @@ BluetoothGattApplicationServiceProviderImpl::
weak_ptr_factory_(this) {
VLOG(1) << "Creating Bluetooth GATT application: " << object_path_.value();
DCHECK(object_path_.IsValid());
- DCHECK(bus_);
+ if (!bus_)
+ return;
exported_object_ = bus_->GetExportedObject(object_path_);
@@ -35,9 +36,7 @@ BluetoothGattApplicationServiceProviderImpl::
base::Bind(&BluetoothGattApplicationServiceProviderImpl::OnExported,
weak_ptr_factory_.GetWeakPtr()));
- BluetoothGattApplicationServiceProvider::CreateAttributeServiceProviders(
- bus, services, &service_providers_, &characteristic_providers_,
- &descriptor_providers_);
+ CreateAttributeServiceProviders(bus, services);
}
BluetoothGattApplicationServiceProviderImpl::
@@ -47,16 +46,6 @@ BluetoothGattApplicationServiceProviderImpl::
bus_->UnregisterExportedObject(object_path_);
}
-BluetoothGattApplicationServiceProviderImpl::
- BluetoothGattApplicationServiceProviderImpl(
- const dbus::ObjectPath& object_path)
- : origin_thread_id_(base::PlatformThread::CurrentId()),
- bus_(nullptr),
- object_path_(object_path),
- weak_ptr_factory_(this) {
- VLOG(1) << "Creating Fake Bluetooth GATT application service provider.";
-}
-
bool BluetoothGattApplicationServiceProviderImpl::OnOriginThread() {
return base::PlatformThread::CurrentId() == origin_thread_id_;
}

Powered by Google App Engine
This is Rietveld 408576698