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

Unified Diff: third_party/WebKit/Source/platform/exported/WebCryptoKey.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/platform/exported/WebCryptoKey.cpp
diff --git a/third_party/WebKit/Source/platform/exported/WebCryptoKey.cpp b/third_party/WebKit/Source/platform/exported/WebCryptoKey.cpp
index 07437ec6931736b537f58da200faab3253fd4d1f..97660f7cca2be76453589e8d1d05d019d7888e39 100644
--- a/third_party/WebKit/Source/platform/exported/WebCryptoKey.cpp
+++ b/third_party/WebKit/Source/platform/exported/WebCryptoKey.cpp
@@ -33,15 +33,14 @@
#include "public/platform/WebCryptoAlgorithm.h"
#include "public/platform/WebCryptoAlgorithmParams.h"
#include "public/platform/WebCryptoKeyAlgorithm.h"
-#include "wtf/PtrUtil.h"
+#include "wtf/OwnPtr.h"
#include "wtf/ThreadSafeRefCounted.h"
-#include <memory>
namespace blink {
class WebCryptoKeyPrivate : public ThreadSafeRefCounted<WebCryptoKeyPrivate> {
public:
- WebCryptoKeyPrivate(std::unique_ptr<WebCryptoKeyHandle> handle, WebCryptoKeyType type, bool extractable, const WebCryptoKeyAlgorithm& algorithm, WebCryptoKeyUsageMask usages)
+ WebCryptoKeyPrivate(PassOwnPtr<WebCryptoKeyHandle> handle, WebCryptoKeyType type, bool extractable, const WebCryptoKeyAlgorithm& algorithm, WebCryptoKeyUsageMask usages)
: handle(std::move(handle))
, type(type)
, extractable(extractable)
@@ -51,7 +50,7 @@ public:
ASSERT(!algorithm.isNull());
}
- const std::unique_ptr<WebCryptoKeyHandle> handle;
+ const OwnPtr<WebCryptoKeyHandle> handle;
const WebCryptoKeyType type;
const bool extractable;
const WebCryptoKeyAlgorithm algorithm;
@@ -61,7 +60,7 @@ public:
WebCryptoKey WebCryptoKey::create(WebCryptoKeyHandle* handle, WebCryptoKeyType type, bool extractable, const WebCryptoKeyAlgorithm& algorithm, WebCryptoKeyUsageMask usages)
{
WebCryptoKey key;
- key.m_private = adoptRef(new WebCryptoKeyPrivate(wrapUnique(handle), type, extractable, algorithm, usages));
+ key.m_private = adoptRef(new WebCryptoKeyPrivate(adoptPtr(handle), type, extractable, algorithm, usages));
return key;
}

Powered by Google App Engine
This is Rietveld 408576698