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

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

Issue 144093009: [webcrypto] Remove code supporting Key.algorithm. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 11 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/AesKeyGenParams.idl ('k') | Source/modules/crypto/Algorithm.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/crypto/Algorithm.cpp
diff --git a/Source/modules/crypto/Algorithm.cpp b/Source/modules/crypto/Algorithm.cpp
index 2bede54abd3c2a3a1c09975645ac0c60e57191c2..0170063a24cefbaa596b2e54da79fd776271e037 100644
--- a/Source/modules/crypto/Algorithm.cpp
+++ b/Source/modules/crypto/Algorithm.cpp
@@ -31,46 +31,14 @@
#include "config.h"
#include "modules/crypto/Algorithm.h"
-#include "modules/crypto/AesCbcParams.h"
-#include "modules/crypto/AesCtrParams.h"
-#include "modules/crypto/AesKeyGenParams.h"
-#include "modules/crypto/HmacKeyParams.h"
-#include "modules/crypto/HmacParams.h"
#include "modules/crypto/NormalizeAlgorithm.h"
-#include "modules/crypto/RsaKeyGenParams.h"
-#include "modules/crypto/RsaSsaParams.h"
-#include "platform/NotImplemented.h"
#include "wtf/text/WTFString.h"
namespace WebCore {
PassRefPtr<Algorithm> Algorithm::create(const blink::WebCryptoAlgorithm& algorithm)
{
- switch (algorithm.paramsType()) {
- case blink::WebCryptoAlgorithmParamsTypeNone:
- return adoptRef(new Algorithm(algorithm));
- case blink::WebCryptoAlgorithmParamsTypeAesCbcParams:
- return AesCbcParams::create(algorithm);
- case blink::WebCryptoAlgorithmParamsTypeAesKeyGenParams:
- return AesKeyGenParams::create(algorithm);
- case blink::WebCryptoAlgorithmParamsTypeHmacParams:
- return HmacParams::create(algorithm);
- case blink::WebCryptoAlgorithmParamsTypeHmacKeyParams:
- return HmacKeyParams::create(algorithm);
- case blink::WebCryptoAlgorithmParamsTypeRsaSsaParams:
- return RsaSsaParams::create(algorithm);
- case blink::WebCryptoAlgorithmParamsTypeRsaKeyGenParams:
- return RsaKeyGenParams::create(algorithm);
- case blink::WebCryptoAlgorithmParamsTypeAesCtrParams:
- return AesCtrParams::create(algorithm);
- case blink::WebCryptoAlgorithmParamsTypeAesGcmParams:
- case blink::WebCryptoAlgorithmParamsTypeRsaOaepParams:
- // TODO
- notImplemented();
- break;
- }
- ASSERT_NOT_REACHED();
- return 0;
+ return adoptRef(new Algorithm(algorithm));
}
Algorithm::Algorithm(const blink::WebCryptoAlgorithm& algorithm)
« no previous file with comments | « Source/modules/crypto/AesKeyGenParams.idl ('k') | Source/modules/crypto/Algorithm.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698