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

Unified Diff: third_party/WebKit/Source/platform/exported/WebCryptoAlgorithm.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/WebCryptoAlgorithm.cpp
diff --git a/third_party/WebKit/Source/platform/exported/WebCryptoAlgorithm.cpp b/third_party/WebKit/Source/platform/exported/WebCryptoAlgorithm.cpp
index b174f45106d2f0e97ce4dba595c52d50949f99b0..eb1793b648da131bb15772c45fd1517cf4e5b6f8 100644
--- a/third_party/WebKit/Source/platform/exported/WebCryptoAlgorithm.cpp
+++ b/third_party/WebKit/Source/platform/exported/WebCryptoAlgorithm.cpp
@@ -32,10 +32,9 @@
#include "public/platform/WebCryptoAlgorithmParams.h"
#include "wtf/Assertions.h"
-#include "wtf/PtrUtil.h"
+#include "wtf/OwnPtr.h"
#include "wtf/StdLibExtras.h"
#include "wtf/ThreadSafeRefCounted.h"
-#include <memory>
namespace blink {
@@ -296,17 +295,17 @@ static_assert(10 == WebCryptoOperationLast, "the parameter mapping needs to be u
class WebCryptoAlgorithmPrivate : public ThreadSafeRefCounted<WebCryptoAlgorithmPrivate> {
public:
- WebCryptoAlgorithmPrivate(WebCryptoAlgorithmId id, std::unique_ptr<WebCryptoAlgorithmParams> params)
+ WebCryptoAlgorithmPrivate(WebCryptoAlgorithmId id, PassOwnPtr<WebCryptoAlgorithmParams> params)
: id(id)
, params(std::move(params))
{
}
WebCryptoAlgorithmId id;
- std::unique_ptr<WebCryptoAlgorithmParams> params;
+ OwnPtr<WebCryptoAlgorithmParams> params;
};
-WebCryptoAlgorithm::WebCryptoAlgorithm(WebCryptoAlgorithmId id, std::unique_ptr<WebCryptoAlgorithmParams> params)
+WebCryptoAlgorithm::WebCryptoAlgorithm(WebCryptoAlgorithmId id, PassOwnPtr<WebCryptoAlgorithmParams> params)
: m_private(adoptRef(new WebCryptoAlgorithmPrivate(id, std::move(params))))
{
}
@@ -318,7 +317,7 @@ WebCryptoAlgorithm WebCryptoAlgorithm::createNull()
WebCryptoAlgorithm WebCryptoAlgorithm::adoptParamsAndCreate(WebCryptoAlgorithmId id, WebCryptoAlgorithmParams* params)
{
- return WebCryptoAlgorithm(id, wrapUnique(params));
+ return WebCryptoAlgorithm(id, adoptPtr(params));
}
const WebCryptoAlgorithmInfo* WebCryptoAlgorithm::lookupAlgorithmInfo(WebCryptoAlgorithmId id)

Powered by Google App Engine
This is Rietveld 408576698