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

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: 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
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

Powered by Google App Engine
This is Rietveld 408576698