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

Unified Diff: third_party/WebKit/Source/platform/Crypto.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
« 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 79fa67b010a2c6ec717128c94a84f0799ec3648e..00cdd51f92587aff04996b60f23c50482eea5bcf 100644
--- a/third_party/WebKit/Source/platform/Crypto.cpp
+++ b/third_party/WebKit/Source/platform/Crypto.cpp
@@ -7,8 +7,6 @@
#include "public/platform/Platform.h"
#include "public/platform/WebCrypto.h"
#include "public/platform/WebCryptoAlgorithm.h"
-#include "wtf/PtrUtil.h"
-#include <memory>
namespace blink {
@@ -38,7 +36,7 @@ bool computeDigest(HashAlgorithm algorithm, const char* digestable, size_t lengt
ASSERT(crypto);
- std::unique_ptr<WebCryptoDigestor> digestor = wrapUnique(crypto->createDigestor(algorithmId));
+ OwnPtr<WebCryptoDigestor> digestor = adoptPtr(crypto->createDigestor(algorithmId));
if (!digestor.get() || !digestor->consume(reinterpret_cast<const unsigned char*>(digestable), length) || !digestor->finish(result, resultSize))
return false;
@@ -46,9 +44,9 @@ bool computeDigest(HashAlgorithm algorithm, const char* digestable, size_t lengt
return true;
}
-std::unique_ptr<WebCryptoDigestor> createDigestor(HashAlgorithm algorithm)
+PassOwnPtr<WebCryptoDigestor> createDigestor(HashAlgorithm algorithm)
{
- return wrapUnique(Platform::current()->crypto()->createDigestor(toWebCryptoAlgorithmId(algorithm)));
+ return adoptPtr(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