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

Unified Diff: Source/core/platform/chromium/support/WebCrypto.cpp

Issue 23164012: WebCrypto: Remove support for multi-part operations. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Sync to tot Created 7 years, 4 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 | « LayoutTests/crypto/sign-verify-expected.txt ('k') | Source/modules/crypto/CryptoOperation.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/platform/chromium/support/WebCrypto.cpp
diff --git a/Source/core/platform/chromium/support/WebCrypto.cpp b/Source/core/platform/chromium/support/WebCrypto.cpp
index 9f63634011e01d67f48d1fb2dfc9414073c240b6..0dd1796deb49bf75f4569cd7adaa97431409a5fe 100644
--- a/Source/core/platform/chromium/support/WebCrypto.cpp
+++ b/Source/core/platform/chromium/support/WebCrypto.cpp
@@ -29,92 +29,54 @@
*/
#include "config.h"
+#include "public/platform/WebArrayBuffer.h"
#include "public/platform/WebCrypto.h"
+#include <string.h>
namespace WebKit {
-// FIXME: Assert that these methods are called from the right thread.
-
-void WebCryptoOperationResult::initializationFailed()
-{
- m_impl->initializationFailed();
- reset();
-}
-
-void WebCryptoOperationResult::initializationSucceeded(WebCryptoOperation* op)
-{
- m_impl->initializationSucceeded(op);
- reset();
-}
-
-void WebCryptoOperationResult::completeWithError()
+void WebCryptoResult::completeWithError()
{
m_impl->completeWithError();
reset();
}
-void WebCryptoOperationResult::completeWithArrayBuffer(const WebArrayBuffer& buffer)
+void WebCryptoResult::completeWithBuffer(const WebArrayBuffer& buffer)
{
- m_impl->completeWithArrayBuffer(buffer);
+ m_impl->completeWithBuffer(buffer);
reset();
}
-void WebCryptoOperationResult::completeWithBoolean(bool b)
+void WebCryptoResult::completeWithBuffer(const void* bytes, size_t bytesSize)
{
- m_impl->completeWithBoolean(b);
- reset();
-}
-
-void WebCryptoOperationResult::reset()
-{
- m_impl.reset();
+ WebArrayBuffer buffer = WebKit::WebArrayBuffer::create(bytesSize, 1);
+ memcpy(buffer.data(), bytes, bytesSize);
+ completeWithBuffer(buffer);
}
-void WebCryptoOperationResult::assign(const WebCryptoOperationResult& o)
+void WebCryptoResult::completeWithBoolean(bool b)
{
- m_impl = o.m_impl;
-}
-
-void WebCryptoOperationResult::assign(WebCryptoOperationResultPrivate* impl)
-{
- m_impl = impl;
-}
-
-void WebCryptoKeyOperationResult::initializationFailed()
-{
- m_impl->initializationFailed();
- reset();
-}
-
-void WebCryptoKeyOperationResult::initializationSucceeded(WebCryptoKeyOperation* op)
-{
- m_impl->initializationSucceeded(op);
- reset();
-}
-
-void WebCryptoKeyOperationResult::completeWithError()
-{
- m_impl->completeWithError();
+ m_impl->completeWithBoolean(b);
reset();
}
-void WebCryptoKeyOperationResult::completeWithKey(const WebCryptoKey& key)
+void WebCryptoResult::completeWithKey(const WebCryptoKey& key)
{
m_impl->completeWithKey(key);
reset();
}
-void WebCryptoKeyOperationResult::reset()
+void WebCryptoResult::reset()
{
m_impl.reset();
}
-void WebCryptoKeyOperationResult::assign(const WebCryptoKeyOperationResult& o)
+void WebCryptoResult::assign(const WebCryptoResult& o)
{
m_impl = o.m_impl;
}
-void WebCryptoKeyOperationResult::assign(WebCryptoKeyOperationResultPrivate* impl)
+void WebCryptoResult::assign(WebCryptoResultPrivate* impl)
{
m_impl = impl;
}
« no previous file with comments | « LayoutTests/crypto/sign-verify-expected.txt ('k') | Source/modules/crypto/CryptoOperation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698