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

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

Issue 312393004: Expose WebCrypto's lookupAlgorithmInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@share_normalize
Patch Set: Addressed comment (removed redundant idToName). Created 6 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 | « no previous file | Source/modules/crypto/NormalizeAlgorithm.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/crypto/KeyAlgorithm.cpp
diff --git a/Source/modules/crypto/KeyAlgorithm.cpp b/Source/modules/crypto/KeyAlgorithm.cpp
index ebcbcd0c3237657a4b18bc504ff2ea42a9081c66..9ae965d5d1a1481ab32d12c5f73a22f71c18e739 100644
--- a/Source/modules/crypto/KeyAlgorithm.cpp
+++ b/Source/modules/crypto/KeyAlgorithm.cpp
@@ -36,6 +36,7 @@
#include "modules/crypto/NormalizeAlgorithm.h"
#include "modules/crypto/RsaHashedKeyAlgorithm.h"
#include "modules/crypto/RsaKeyAlgorithm.h"
+#include "public/platform/WebCryptoAlgorithm.h"
#include "wtf/text/WTFString.h"
namespace WebCore {
@@ -75,7 +76,8 @@ KeyAlgorithm::KeyAlgorithm(const blink::WebCryptoKeyAlgorithm& algorithm)
String KeyAlgorithm::name()
{
- return algorithmIdToName(m_algorithm.id());
+ const blink::WebCryptoAlgorithmInfo* info = blink::WebCryptoAlgorithm::lookupAlgorithmInfo(m_algorithm.id());
+ return info->name;
}
bool KeyAlgorithm::isAesKeyAlgorithm() const
« no previous file with comments | « no previous file | Source/modules/crypto/NormalizeAlgorithm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698