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

Unified Diff: third_party/WebKit/public/platform/WebCrypto.h

Issue 2142783002: Use std::unique_ptr to pass around WebCryptoDigestor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/public/platform/WebCrypto.h
diff --git a/third_party/WebKit/public/platform/WebCrypto.h b/third_party/WebKit/public/platform/WebCrypto.h
index d3271971d5e843bba80cf65a82f2a75ba69b659f..cfd49c5ad5a3c8072bc92b61d489d784d954ac48 100644
--- a/third_party/WebKit/public/platform/WebCrypto.h
+++ b/third_party/WebKit/public/platform/WebCrypto.h
@@ -38,6 +38,8 @@
#include "WebString.h"
#include "WebVector.h"
+#include <memory>
+
#if INSIDE_BLINK
#include "platform/heap/Handle.h"
#endif
@@ -214,11 +216,8 @@ public:
// This is the exception to the "Completing the request" guarantees
// outlined above. This is useful for Blink internal crypto and is not part
// of the WebCrypto standard. createDigestor must provide the result via
- // the WebCryptoDigestor object synchronously. createDigestor may return 0
- // if it fails to create a WebCryptoDigestor. If it succeeds, the
- // WebCryptoDigestor returned by createDigestor must be freed by the
- // caller.
- virtual WebCryptoDigestor* createDigestor(WebCryptoAlgorithmId algorithmId) { return nullptr; }
+ // the WebCryptoDigestor object synchronously. This will never return null.
+ virtual std::unique_ptr<WebCryptoDigestor> createDigestor(WebCryptoAlgorithmId algorithmId) { return nullptr; }
// -----------------------
// Structured clone
« no previous file with comments | « third_party/WebKit/Source/platform/Crypto.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698