Index: public/platform/WebCrypto.h |
diff --git a/public/platform/WebCrypto.h b/public/platform/WebCrypto.h |
index 606957792e26db49fcc655d7d76c91db90eea2fd..cc8d15b910b9de146c75f9c506e4fd302b921e22 100644 |
--- a/public/platform/WebCrypto.h |
+++ b/public/platform/WebCrypto.h |
@@ -44,6 +44,9 @@ namespace WebCore { class CryptoResult; } |
namespace WTF { template <typename T> class PassRefPtr; } |
#endif |
+// FIXME: Remove once chromium side rolls. |
+#define WEBCRYPTO_RESULT_HAS_CANCELLED 1 |
+ |
namespace blink { |
class WebArrayBuffer; |
@@ -95,6 +98,10 @@ public: |
BLINK_PLATFORM_EXPORT void completeWithKey(const WebCryptoKey&); |
BLINK_PLATFORM_EXPORT void completeWithKeyPair(const WebCryptoKey& publicKey, const WebCryptoKey& privateKey); |
+ // Returns true if the underlying operation was cancelled. |
+ // This method can be called from any thread. |
+ BLINK_PLATFORM_EXPORT bool cancelled() const; |
+ |
#if INSIDE_BLINK |
BLINK_PLATFORM_EXPORT explicit WebCryptoResult(const WTF::PassRefPtr<WebCore::CryptoResult>&); |
#endif |
@@ -146,6 +153,9 @@ public: |
// asynchronously make a copy of the WebCryptoResult and call it from the |
// same thread that started the request. |
// |
+ // If the request was cancelled it is not necessary for implementations to |
+ // set the result. |
+ // |
// ----------------------- |
// Threading |
// ----------------------- |