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

Unified Diff: Source/modules/crypto/CryptoResult.cpp

Issue 23617006: WebCrypto: Add the KeyPair interface. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase onto master Created 7 years, 4 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 | « Source/modules/crypto/CryptoResult.h ('k') | Source/modules/crypto/KeyPair.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/crypto/CryptoResult.cpp
diff --git a/Source/modules/crypto/CryptoResult.cpp b/Source/modules/crypto/CryptoResult.cpp
index d2885527dc1e733361917d1427cb9569d9e01fed..ee89a79c6e4a563d7cb4e557162631f8853e3d64 100644
--- a/Source/modules/crypto/CryptoResult.cpp
+++ b/Source/modules/crypto/CryptoResult.cpp
@@ -32,6 +32,7 @@
#include "modules/crypto/CryptoResult.h"
#include "V8Key.h" // Must precede ScriptPromiseResolver.h
+#include "V8KeyPair.h" // Must precede ScriptPromiseResolver.h
#include "bindings/v8/custom/V8ArrayBufferCustom.h" // Must precede ScriptPromiseResolver.h
#include "bindings/v8/ScriptPromiseResolver.h"
#include "modules/crypto/Key.h"
@@ -78,6 +79,12 @@ void CryptoResult::completeWithKey(const WebKit::WebCryptoKey& key)
finish();
}
+void CryptoResult::completeWithKeyPair(const WebKit::WebCryptoKey& publicKey, const WebKit::WebCryptoKey& privateKey)
+{
+ m_promiseResolver->fulfill(KeyPair::create(publicKey, privateKey));
+ finish();
+}
+
ScriptObject CryptoResult::promise()
{
return m_promiseResolver->promise();
« no previous file with comments | « Source/modules/crypto/CryptoResult.h ('k') | Source/modules/crypto/KeyPair.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698