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

Unified Diff: Source/modules/crypto/Key.h

Issue 170243007: [webcrypto] Make all of the crypto.subtle method failures asynchronous. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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 | « LayoutTests/crypto/wrap-unwrap-expected.txt ('k') | Source/modules/crypto/Key.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/crypto/Key.h
diff --git a/Source/modules/crypto/Key.h b/Source/modules/crypto/Key.h
index 128a52a801245c429f2af51504b0341df853213f..6937c14a82bc07b5655be0ee83edf72b8642c317 100644
--- a/Source/modules/crypto/Key.h
+++ b/Source/modules/crypto/Key.h
@@ -43,7 +43,7 @@
namespace WebCore {
class Algorithm;
-class ExceptionState;
+class CryptoResult;
class Key : public RefCountedWillBeGarbageCollectedFinalized<Key>, public ScriptWrappable {
DECLARE_GC_INFO;
@@ -63,11 +63,12 @@ public:
const blink::WebCryptoKey& key() const { return m_key; }
// If the key cannot be used with the indicated algorithm, returns false
- // and fills the provided String with error details.
- bool canBeUsedForAlgorithm(const blink::WebCryptoAlgorithm&, AlgorithmOperation, String&) const;
+ // and completes the CryptoResult with an error.
+ bool canBeUsedForAlgorithm(const blink::WebCryptoAlgorithm&, AlgorithmOperation, CryptoResult*) const;
- static bool parseFormat(const String&, blink::WebCryptoKeyFormat&, ExceptionState&);
- static bool parseUsageMask(const Vector<String>&, blink::WebCryptoKeyUsageMask&, ExceptionState&);
+ // On failure, these return false and complete the CryptoResult with an error.
+ static bool parseFormat(const String&, blink::WebCryptoKeyFormat&, CryptoResult*);
+ static bool parseUsageMask(const Vector<String>&, blink::WebCryptoKeyUsageMask&, CryptoResult*);
void trace(Visitor*);
« no previous file with comments | « LayoutTests/crypto/wrap-unwrap-expected.txt ('k') | Source/modules/crypto/Key.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698