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

Unified Diff: third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTService.cpp

Issue 2080623002: Revert "Remove OwnPtr from Blink." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
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 ed200dd266d54fc14b4f844c7b6e0271a77ea98c..250e55cfd02dac04ebdd87db46d18d85dcedcfea 100644
--- a/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTService.cpp
+++ b/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTService.cpp
@@ -15,17 +15,15 @@
#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(std::unique_ptr<WebBluetoothRemoteGATTService> webService)
+BluetoothRemoteGATTService::BluetoothRemoteGATTService(PassOwnPtr<WebBluetoothRemoteGATTService> webService)
: m_webService(std::move(webService))
{
}
-BluetoothRemoteGATTService* BluetoothRemoteGATTService::take(ScriptPromiseResolver*, std::unique_ptr<WebBluetoothRemoteGATTService> webService)
+BluetoothRemoteGATTService* BluetoothRemoteGATTService::take(ScriptPromiseResolver*, PassOwnPtr<WebBluetoothRemoteGATTService> webService)
{
if (!webService) {
return nullptr;
@@ -48,14 +46,14 @@ public:
if (m_quantity == mojom::WebBluetoothGATTQueryQuantity::SINGLE) {
DCHECK_EQ(1u, webCharacteristics.size());
- m_resolver->resolve(BluetoothRemoteGATTCharacteristic::take(m_resolver, wrapUnique(webCharacteristics[0])));
+ m_resolver->resolve(BluetoothRemoteGATTCharacteristic::take(m_resolver, adoptPtr(webCharacteristics[0])));
return;
}
HeapVector<Member<BluetoothRemoteGATTCharacteristic>> characteristics;
characteristics.reserveInitialCapacity(webCharacteristics.size());
for (WebBluetoothRemoteGATTCharacteristicInit* webCharacteristic : webCharacteristics) {
- characteristics.append(BluetoothRemoteGATTCharacteristic::take(m_resolver, wrapUnique(webCharacteristic)));
+ characteristics.append(BluetoothRemoteGATTCharacteristic::take(m_resolver, adoptPtr(webCharacteristic)));
}
m_resolver->resolve(characteristics);
}

Powered by Google App Engine
This is Rietveld 408576698