| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "device/bluetooth/dbus/bluetooth_gatt_descriptor_service_provider.h" | 5 #include "device/bluetooth/dbus/bluetooth_gatt_descriptor_service_provider.h" |
| 6 | 6 |
| 7 #include "device/bluetooth/dbus/bluetooth_gatt_descriptor_service_provider_impl.
h" | 7 #include "device/bluetooth/dbus/bluetooth_gatt_descriptor_service_provider_impl.
h" |
| 8 #include "device/bluetooth/dbus/bluez_dbus_manager.h" | 8 #include "device/bluetooth/dbus/bluez_dbus_manager.h" |
| 9 #include "device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_service_provider.
h" | 9 #include "device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_service_provider.
h" |
| 10 | 10 |
| 11 namespace bluez { | 11 namespace bluez { |
| 12 | 12 |
| 13 BluetoothGattDescriptorServiceProvider:: | 13 BluetoothGattDescriptorServiceProvider:: |
| 14 BluetoothGattDescriptorServiceProvider() {} | 14 BluetoothGattDescriptorServiceProvider() {} |
| 15 | 15 |
| 16 BluetoothGattDescriptorServiceProvider:: | 16 BluetoothGattDescriptorServiceProvider:: |
| 17 ~BluetoothGattDescriptorServiceProvider() {} | 17 ~BluetoothGattDescriptorServiceProvider() {} |
| 18 | 18 |
| 19 // static | 19 // static |
| 20 BluetoothGattDescriptorServiceProvider* | 20 BluetoothGattDescriptorServiceProvider* |
| 21 BluetoothGattDescriptorServiceProvider::Create( | 21 BluetoothGattDescriptorServiceProvider::Create( |
| 22 dbus::Bus* bus, | 22 dbus::Bus* bus, |
| 23 const dbus::ObjectPath& object_path, | 23 const dbus::ObjectPath& object_path, |
| 24 std::unique_ptr<BluetoothGattAttributeValueDelegate> delegate, | 24 std::unique_ptr<BluetoothGattAttributeValueDelegate> delegate, |
| 25 const std::string& uuid, | 25 const std::string& uuid, |
| 26 const std::vector<std::string>& permissions, | 26 const std::vector<std::string>& flags, |
| 27 const dbus::ObjectPath& characteristic_path) { | 27 const dbus::ObjectPath& characteristic_path) { |
| 28 if (!bluez::BluezDBusManager::Get()->IsUsingFakes()) { | 28 if (!bluez::BluezDBusManager::Get()->IsUsingFakes()) { |
| 29 return new BluetoothGattDescriptorServiceProviderImpl( | 29 return new BluetoothGattDescriptorServiceProviderImpl( |
| 30 bus, object_path, std::move(delegate), uuid, permissions, | 30 bus, object_path, std::move(delegate), uuid, flags, |
| 31 characteristic_path); | 31 characteristic_path); |
| 32 } | 32 } |
| 33 return new FakeBluetoothGattDescriptorServiceProvider( | 33 return new FakeBluetoothGattDescriptorServiceProvider( |
| 34 object_path, std::move(delegate), uuid, permissions, characteristic_path); | 34 object_path, std::move(delegate), uuid, flags, characteristic_path); |
| 35 } | 35 } |
| 36 | 36 |
| 37 } // namespace bluez | 37 } // namespace bluez |
| OLD | NEW |