OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_le_advertisement_service_provider.h" | 5 #include "device/bluetooth/dbus/bluetooth_le_advertisement_service_provider.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
409 BluetoothLEAdvertisementServiceProvider::Create( | 409 BluetoothLEAdvertisementServiceProvider::Create( |
410 dbus::Bus* bus, | 410 dbus::Bus* bus, |
411 const dbus::ObjectPath& object_path, | 411 const dbus::ObjectPath& object_path, |
412 Delegate* delegate, | 412 Delegate* delegate, |
413 AdvertisementType type, | 413 AdvertisementType type, |
414 std::unique_ptr<UUIDList> service_uuids, | 414 std::unique_ptr<UUIDList> service_uuids, |
415 std::unique_ptr<ManufacturerData> manufacturer_data, | 415 std::unique_ptr<ManufacturerData> manufacturer_data, |
416 std::unique_ptr<UUIDList> solicit_uuids, | 416 std::unique_ptr<UUIDList> solicit_uuids, |
417 std::unique_ptr<ServiceData> service_data) { | 417 std::unique_ptr<ServiceData> service_data) { |
418 if (!bluez::BluezDBusManager::Get()->IsUsingFakes()) { | 418 if (!bluez::BluezDBusManager::Get()->IsUsingFakes()) { |
419 return base::WrapUnique(new BluetoothAdvertisementServiceProviderImpl( | 419 return base::MakeUnique<BluetoothAdvertisementServiceProviderImpl>( |
420 bus, object_path, delegate, type, std::move(service_uuids), | 420 bus, object_path, delegate, type, std::move(service_uuids), |
421 std::move(manufacturer_data), std::move(solicit_uuids), | 421 std::move(manufacturer_data), std::move(solicit_uuids), |
422 std::move(service_data))); | 422 std::move(service_data)); |
423 } | 423 } |
424 return base::WrapUnique( | 424 return base::MakeUnique<FakeBluetoothLEAdvertisementServiceProvider>( |
425 new FakeBluetoothLEAdvertisementServiceProvider(object_path, delegate)); | 425 object_path, delegate); |
426 } | 426 } |
427 | 427 |
428 } // namespace bluez | 428 } // namespace bluez |
OLD | NEW |