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

Unified Diff: third_party/WebKit/Source/platform/Crypto.cpp

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. 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
« no previous file with comments | « third_party/WebKit/Source/platform/Crypto.h ('k') | third_party/WebKit/Source/platform/DragImage.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/Crypto.cpp
diff --git a/third_party/WebKit/Source/platform/Crypto.cpp b/third_party/WebKit/Source/platform/Crypto.cpp
index 00cdd51f92587aff04996b60f23c50482eea5bcf..79fa67b010a2c6ec717128c94a84f0799ec3648e 100644
--- a/third_party/WebKit/Source/platform/Crypto.cpp
+++ b/third_party/WebKit/Source/platform/Crypto.cpp
@@ -7,6 +7,8 @@
#include "public/platform/Platform.h"
#include "public/platform/WebCrypto.h"
#include "public/platform/WebCryptoAlgorithm.h"
+#include "wtf/PtrUtil.h"
+#include <memory>
namespace blink {
@@ -36,7 +38,7 @@ bool computeDigest(HashAlgorithm algorithm, const char* digestable, size_t lengt
ASSERT(crypto);
- OwnPtr<WebCryptoDigestor> digestor = adoptPtr(crypto->createDigestor(algorithmId));
+ std::unique_ptr<WebCryptoDigestor> digestor = wrapUnique(crypto->createDigestor(algorithmId));
if (!digestor.get() || !digestor->consume(reinterpret_cast<const unsigned char*>(digestable), length) || !digestor->finish(result, resultSize))
return false;
@@ -44,9 +46,9 @@ bool computeDigest(HashAlgorithm algorithm, const char* digestable, size_t lengt
return true;
}
-PassOwnPtr<WebCryptoDigestor> createDigestor(HashAlgorithm algorithm)
+std::unique_ptr<WebCryptoDigestor> createDigestor(HashAlgorithm algorithm)
{
- return adoptPtr(Platform::current()->crypto()->createDigestor(toWebCryptoAlgorithmId(algorithm)));
+ return wrapUnique(Platform::current()->crypto()->createDigestor(toWebCryptoAlgorithmId(algorithm)));
}
void finishDigestor(WebCryptoDigestor* digestor, DigestValue& digestResult)
« no previous file with comments | « third_party/WebKit/Source/platform/Crypto.h ('k') | third_party/WebKit/Source/platform/DragImage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698