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

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

Issue 179353002: [webcrypto] Add the KeyAlgorithm interface. (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
Index: Source/modules/crypto/KeyAlgorithm.h
diff --git a/Source/modules/crypto/Algorithm.h b/Source/modules/crypto/KeyAlgorithm.h
similarity index 75%
rename from Source/modules/crypto/Algorithm.h
rename to Source/modules/crypto/KeyAlgorithm.h
index f25d9d0243c616cebe5834a7a332a1f289430c03..7b6fe0c5e2ee3f77a3015ea3eb1ad3b42deb410f 100644
--- a/Source/modules/crypto/Algorithm.h
+++ b/Source/modules/crypto/KeyAlgorithm.h
@@ -28,33 +28,34 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef Algorithm_h
-#define Algorithm_h
+#ifndef KeyAlgorithm_h
+#define KeyAlgorithm_h
#include "bindings/v8/ScriptWrappable.h"
#include "heap/Handle.h"
-#include "public/platform/WebCryptoAlgorithm.h"
+#include "public/platform/WebCryptoKeyAlgorithm.h"
#include "wtf/Forward.h"
#include "wtf/PassRefPtr.h"
#include "wtf/RefCounted.h"
namespace WebCore {
-class Algorithm : public RefCountedWillBeGarbageCollectedFinalized<Algorithm>, public ScriptWrappable {
+class KeyAlgorithm : public RefCountedWillBeGarbageCollectedFinalized<KeyAlgorithm>, public ScriptWrappable {
DECLARE_GC_INFO;
public:
- static PassRefPtrWillBeRawPtr<Algorithm> create(const blink::WebCryptoAlgorithm&);
+ static PassRefPtrWillBeRawPtr<KeyAlgorithm> create(const blink::WebCryptoKeyAlgorithm&);
+ static PassRefPtrWillBeRawPtr<KeyAlgorithm> createHash(const blink::WebCryptoAlgorithm&);
String name();
- blink::WebCryptoAlgorithmParamsType type() const { return m_algorithm.paramsType(); }
+ blink::WebCryptoKeyAlgorithmParamsType type() const;
- void trace(Visitor*) { }
+ void trace(Visitor*);
protected:
- explicit Algorithm(const blink::WebCryptoAlgorithm&);
+ explicit KeyAlgorithm(const blink::WebCryptoKeyAlgorithm&);
- const blink::WebCryptoAlgorithm m_algorithm;
+ blink::WebCryptoKeyAlgorithm m_algorithm;
};
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698