summaryrefslogtreecommitdiff
path: root/Source/WebCore/crypto/CryptoKeyData.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/crypto/CryptoKeyData.h
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/WebCore/crypto/CryptoKeyData.h')
-rw-r--r--Source/WebCore/crypto/CryptoKeyData.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/Source/WebCore/crypto/CryptoKeyData.h b/Source/WebCore/crypto/CryptoKeyData.h
index 30e166b25..2c2adbcd5 100644
--- a/Source/WebCore/crypto/CryptoKeyData.h
+++ b/Source/WebCore/crypto/CryptoKeyData.h
@@ -23,13 +23,13 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef CryptoKeyData_h
-#define CryptoKeyData_h
-
-#include <wtf/Noncopyable.h>
+#pragma once
#if ENABLE(SUBTLE_CRYPTO)
+#include <wtf/Noncopyable.h>
+#include <wtf/TypeCasts.h>
+
namespace WebCore {
class CryptoKeyData {
@@ -52,10 +52,11 @@ private:
Format m_format;
};
-#define CRYPTO_KEY_DATA_CASTS(ToClassName) \
- TYPE_CASTS_BASE(ToClassName, CryptoKeyData, keyData, WebCore::is##ToClassName(*keyData), WebCore::is##ToClassName(keyData))
-
} // namespace WebCore
+#define SPECIALIZE_TYPE_TRAITS_CRYPTO_KEY_DATA(ToClassName, Format) \
+SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::ToClassName) \
+ static bool isType(const WebCore::CryptoKeyData& keyData) { return keyData.format() == WebCore::Format; } \
+SPECIALIZE_TYPE_TRAITS_END()
+
#endif // ENABLE(SUBTLE_CRYPTO)
-#endif // CryptoKeyData_h