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..7a3a2c709cbbbfd2481ead42bbddb2f1f11fb59f 100644 |
--- a/Source/core/platform/chromium/support/WebCrypto.cpp |
+++ b/Source/core/platform/chromium/support/WebCrypto.cpp |
@@ -28,95 +28,19 @@ |
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
+#include <string.h> // for memcpy() |
abarth-chromium
2013/08/16 04:53:07
Please alphabetize this include with the rest of t
eroman
2013/08/16 22:59:41
Done.
|
+ |
#include "config.h" |
#include "public/platform/WebCrypto.h" |
+#include "public/platform/WebArrayBuffer.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() |
-{ |
- m_impl->completeWithError(); |
- reset(); |
-} |
- |
-void WebCryptoOperationResult::completeWithArrayBuffer(const WebArrayBuffer& buffer) |
-{ |
- m_impl->completeWithArrayBuffer(buffer); |
- reset(); |
-} |
- |
-void WebCryptoOperationResult::completeWithBoolean(bool b) |
-{ |
- m_impl->completeWithBoolean(b); |
- reset(); |
-} |
- |
-void WebCryptoOperationResult::reset() |
-{ |
- m_impl.reset(); |
-} |
- |
-void WebCryptoOperationResult::assign(const WebCryptoOperationResult& o) |
-{ |
- 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(); |
- reset(); |
-} |
- |
-void WebCryptoKeyOperationResult::completeWithKey(const WebCryptoKey& key) |
-{ |
- m_impl->completeWithKey(key); |
- reset(); |
-} |
- |
-void WebCryptoKeyOperationResult::reset() |
-{ |
- m_impl.reset(); |
-} |
- |
-void WebCryptoKeyOperationResult::assign(const WebCryptoKeyOperationResult& o) |
-{ |
- m_impl = o.m_impl; |
-} |
- |
-void WebCryptoKeyOperationResult::assign(WebCryptoKeyOperationResultPrivate* impl) |
+void WebCryptoOperationResult::completeWithBuffer(const void* bytes, size_t bytesSize) |
{ |
- m_impl = impl; |
+ WebArrayBuffer buffer = WebKit::WebArrayBuffer::create(bytesSize, 1); |
+ memcpy(buffer.data(), bytes, bytesSize); |
+ completeWithBuffer(buffer); |
} |
} // namespace WebKit |