| 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 77d34837bd8927f41ba8e338b018d632a57c9414..0937aba1da9572dd1467d545cf967927ab6e224a 100644
|
| --- a/device/bluetooth/dbus/bluetooth_gatt_service_service_provider_impl.cc
|
| +++ b/device/bluetooth/dbus/bluetooth_gatt_service_service_provider_impl.cc
|
| @@ -34,9 +34,14 @@ BluetoothGattServiceServiceProviderImpl::
|
| weak_ptr_factory_(this) {
|
| VLOG(1) << "Creating Bluetooth GATT service: " << object_path_.value()
|
| << " UUID: " << uuid;
|
| +
|
| + // If we have a null bus, this means that this is being initialized for a
|
| + // test, hence we shouldn't do any other setup.
|
| + if (!bus_)
|
| + return;
|
| +
|
| DCHECK(!uuid_.empty());
|
| DCHECK(object_path_.IsValid());
|
| - DCHECK(bus_);
|
|
|
| exported_object_ = bus_->GetExportedObject(object_path_);
|
|
|
| @@ -69,17 +74,6 @@ BluetoothGattServiceServiceProviderImpl::
|
| bus_->UnregisterExportedObject(object_path_);
|
| }
|
|
|
| -BluetoothGattServiceServiceProviderImpl::
|
| - BluetoothGattServiceServiceProviderImpl(const dbus::ObjectPath& object_path,
|
| - 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) {}
|
| -
|
| bool BluetoothGattServiceServiceProviderImpl::OnOriginThread() {
|
| return base::PlatformThread::CurrentId() == origin_thread_id_;
|
| }
|
|
|