Commit 29323d23 authored by olli.raula@intel.com's avatar olli.raula@intel.com

move KeyUsageAllows to more logical place(part1)

move KeyUsageAllows to the class where its data is. That way the 
function and its contexts is much more understandable. 
This is first part, second part can be found here:
https://crrev.com/1181413009/

Review URL: https://codereview.chromium.org/1184123007

git-svn-id: svn://svn.chromium.org/blink/trunk@201040 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 7eb55ee1
...@@ -105,6 +105,11 @@ bool WebCryptoKey::isNull() const ...@@ -105,6 +105,11 @@ bool WebCryptoKey::isNull() const
return m_private.isNull(); return m_private.isNull();
} }
bool WebCryptoKey::keyUsageAllows(const blink::WebCryptoKeyUsage usage) const
{
return ((m_private->usages & usage) != 0);
}
void WebCryptoKey::assign(const WebCryptoKey& other) void WebCryptoKey::assign(const WebCryptoKey& other)
{ {
m_private = other.m_private; m_private = other.m_private;
......
...@@ -120,6 +120,8 @@ public: ...@@ -120,6 +120,8 @@ public:
BLINK_PLATFORM_EXPORT bool isNull() const; BLINK_PLATFORM_EXPORT bool isNull() const;
BLINK_PLATFORM_EXPORT bool keyUsageAllows(const blink::WebCryptoKeyUsage) const;
private: private:
BLINK_PLATFORM_EXPORT void assign(const WebCryptoKey& other); BLINK_PLATFORM_EXPORT void assign(const WebCryptoKey& other);
BLINK_PLATFORM_EXPORT void reset(); BLINK_PLATFORM_EXPORT void reset();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment