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

Unified Diff: Source/modules/crypto/CryptoOperation.h

Issue 19401003: Revert "WebCrypto: Add SHA-1 support to crypto.subtle.digest()." (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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 | « Source/core/platform/chromium/support/WebArrayBuffer.cpp ('k') | Source/modules/crypto/CryptoOperation.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/crypto/CryptoOperation.h
diff --git a/Source/modules/crypto/CryptoOperation.h b/Source/modules/crypto/CryptoOperation.h
index c4307dd8566d3ad5bcce051ffd391ab639663dd9..001747eb26e92fdea2ca96ba41e45434ac76e314 100644
--- a/Source/modules/crypto/CryptoOperation.h
+++ b/Source/modules/crypto/CryptoOperation.h
@@ -31,10 +31,8 @@
#ifndef CryptoOperation_h
#define CryptoOperation_h
-#include "bindings/v8/ScriptObject.h"
#include "bindings/v8/ScriptWrappable.h"
#include "modules/crypto/Algorithm.h"
-#include "public/platform/WebCrypto.h"
#include "public/platform/WebCryptoAlgorithm.h"
#include "wtf/Forward.h"
#include "wtf/PassRefPtr.h"
@@ -42,55 +40,19 @@
namespace WebCore {
-class ScriptPromiseResolver;
-
typedef int ExceptionCode;
class CryptoOperation : public ScriptWrappable, public RefCounted<CryptoOperation> {
public:
- ~CryptoOperation();
- static PassRefPtr<CryptoOperation> create(const WebKit::WebCryptoAlgorithm&, WebKit::WebCryptoOperation*);
-
- CryptoOperation* process(ArrayBuffer* data);
- CryptoOperation* process(ArrayBufferView* data);
-
- ScriptObject finish();
- ScriptObject abort();
+ static PassRefPtr<CryptoOperation> create(const WebKit::WebCryptoAlgorithm& algorithm) { return adoptRef(new CryptoOperation(algorithm)); }
Algorithm* algorithm();
private:
- class Result;
- friend class Result;
-
- enum State {
- // Accepting calls to process().
- Processing,
-
- // finish() has been called, but the Promise has not been resolved yet.
- Finishing,
-
- // The operation either:
- // - completed successfully
- // - failed
- // - was aborted
- Done,
- };
-
- CryptoOperation(const WebKit::WebCryptoAlgorithm&, WebKit::WebCryptoOperation*);
-
- void process(const unsigned char*, size_t);
-
- ScriptPromiseResolver* promiseResolver();
+ explicit CryptoOperation(const WebKit::WebCryptoAlgorithm&);
WebKit::WebCryptoAlgorithm m_algorithm;
- WebKit::WebCryptoOperation* m_impl;
RefPtr<Algorithm> m_algorithmNode;
- State m_state;
-
- RefPtr<ScriptPromiseResolver> m_promiseResolver;
-
- OwnPtr<Result> m_result;
};
} // namespace WebCore
« no previous file with comments | « Source/core/platform/chromium/support/WebArrayBuffer.cpp ('k') | Source/modules/crypto/CryptoOperation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698