Index: third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTService.cpp |
diff --git a/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTService.cpp b/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTService.cpp |
index 250e55cfd02dac04ebdd87db46d18d85dcedcfea..ed200dd266d54fc14b4f844c7b6e0271a77ea98c 100644 |
--- a/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTService.cpp |
+++ b/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTService.cpp |
@@ -15,15 +15,17 @@ |
#include "modules/bluetooth/BluetoothSupplement.h" |
#include "modules/bluetooth/BluetoothUUID.h" |
#include "public/platform/modules/bluetooth/WebBluetooth.h" |
+#include "wtf/PtrUtil.h" |
+#include <memory> |
namespace blink { |
-BluetoothRemoteGATTService::BluetoothRemoteGATTService(PassOwnPtr<WebBluetoothRemoteGATTService> webService) |
+BluetoothRemoteGATTService::BluetoothRemoteGATTService(std::unique_ptr<WebBluetoothRemoteGATTService> webService) |
: m_webService(std::move(webService)) |
{ |
} |
-BluetoothRemoteGATTService* BluetoothRemoteGATTService::take(ScriptPromiseResolver*, PassOwnPtr<WebBluetoothRemoteGATTService> webService) |
+BluetoothRemoteGATTService* BluetoothRemoteGATTService::take(ScriptPromiseResolver*, std::unique_ptr<WebBluetoothRemoteGATTService> webService) |
{ |
if (!webService) { |
return nullptr; |
@@ -46,14 +48,14 @@ public: |
if (m_quantity == mojom::WebBluetoothGATTQueryQuantity::SINGLE) { |
DCHECK_EQ(1u, webCharacteristics.size()); |
- m_resolver->resolve(BluetoothRemoteGATTCharacteristic::take(m_resolver, adoptPtr(webCharacteristics[0]))); |
+ m_resolver->resolve(BluetoothRemoteGATTCharacteristic::take(m_resolver, wrapUnique(webCharacteristics[0]))); |
return; |
} |
HeapVector<Member<BluetoothRemoteGATTCharacteristic>> characteristics; |
characteristics.reserveInitialCapacity(webCharacteristics.size()); |
for (WebBluetoothRemoteGATTCharacteristicInit* webCharacteristic : webCharacteristics) { |
- characteristics.append(BluetoothRemoteGATTCharacteristic::take(m_resolver, adoptPtr(webCharacteristic))); |
+ characteristics.append(BluetoothRemoteGATTCharacteristic::take(m_resolver, wrapUnique(webCharacteristic))); |
} |
m_resolver->resolve(characteristics); |
} |