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

Side by Side Diff: device/bluetooth/dbus/bluetooth_le_advertisement_service_provider.cc

Issue 2254833003: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 3 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 unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698