| 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_characteristic_service_provider.h
" | 5 #include "device/bluetooth/dbus/bluetooth_gatt_characteristic_service_provider.h
" |
| 6 | 6 |
| 7 #include "device/bluetooth/dbus/bluetooth_gatt_characteristic_service_provider_i
mpl.h" | 7 #include "device/bluetooth/dbus/bluetooth_gatt_characteristic_service_provider_i
mpl.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_characteristic_service_provi
der.h" | 9 #include "device/bluetooth/dbus/fake_bluetooth_gatt_characteristic_service_provi
der.h" |
| 10 | 10 |
| 11 namespace bluez { | 11 namespace bluez { |
| 12 | 12 |
| 13 BluetoothGattCharacteristicServiceProvider:: | 13 BluetoothGattCharacteristicServiceProvider:: |
| 14 BluetoothGattCharacteristicServiceProvider() {} | 14 BluetoothGattCharacteristicServiceProvider() {} |
| 15 | 15 |
| 16 BluetoothGattCharacteristicServiceProvider:: | 16 BluetoothGattCharacteristicServiceProvider:: |
| 17 ~BluetoothGattCharacteristicServiceProvider() {} | 17 ~BluetoothGattCharacteristicServiceProvider() {} |
| 18 | 18 |
| 19 // static | 19 // static |
| 20 BluetoothGattCharacteristicServiceProvider* | 20 BluetoothGattCharacteristicServiceProvider* |
| 21 BluetoothGattCharacteristicServiceProvider::Create( | 21 BluetoothGattCharacteristicServiceProvider::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>& flags, | 26 const std::vector<std::string>& flags, |
| 27 const std::vector<std::string>& permissions, | |
| 28 const dbus::ObjectPath& service_path) { | 27 const dbus::ObjectPath& service_path) { |
| 29 if (!bluez::BluezDBusManager::Get()->IsUsingFakes()) { | 28 if (!bluez::BluezDBusManager::Get()->IsUsingFakes()) { |
| 30 return new BluetoothGattCharacteristicServiceProviderImpl( | 29 return new BluetoothGattCharacteristicServiceProviderImpl( |
| 31 bus, object_path, std::move(delegate), uuid, flags, permissions, | 30 bus, object_path, std::move(delegate), uuid, flags, service_path); |
| 32 service_path); | |
| 33 } | 31 } |
| 34 return new FakeBluetoothGattCharacteristicServiceProvider( | 32 return new FakeBluetoothGattCharacteristicServiceProvider( |
| 35 object_path, std::move(delegate), uuid, flags, permissions, service_path); | 33 object_path, std::move(delegate), uuid, flags, service_path); |
| 36 } | 34 } |
| 37 | 35 |
| 38 } // namespace bluez | 36 } // namespace bluez |
| OLD | NEW |