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

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

Issue 19885002: WebCrypto: Add interfaces for importKey(). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Use a wrapper for the result rather than raw pointer 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
Index: Source/modules/crypto/CryptoOperation.h
diff --git a/Source/modules/crypto/CryptoOperation.h b/Source/modules/crypto/CryptoOperation.h
index f59a60b8eee3f8d68174985d55b8ac386699b2f8..446723e0dddc9d782f92edf8f849bbed50f8fe36 100644
--- a/Source/modules/crypto/CryptoOperation.h
+++ b/Source/modules/crypto/CryptoOperation.h
@@ -46,10 +46,10 @@ class ScriptPromiseResolver;
typedef int ExceptionCode;
-class CryptoOperation : public ScriptWrappable, public WebKit::WebCryptoOperationResult, public RefCounted<CryptoOperation> {
+class CryptoOperation : public ScriptWrappable, public RefCounted<CryptoOperation> {
public:
~CryptoOperation();
- static PassRefPtr<CryptoOperation> create(const WebKit::WebCryptoAlgorithm&, ExceptionCode*);
+ static PassRefPtr<CryptoOperation> create(const WebKit::WebCryptoAlgorithm&);
CryptoOperation* process(ArrayBuffer* data);
CryptoOperation* process(ArrayBufferView* data);
@@ -59,11 +59,12 @@ public:
Algorithm* algorithm();
- // Implementation of WebKit::WebCryptoOperationResult.
- virtual void initializationFailed() OVERRIDE;
- virtual void initializationSucceded(WebKit::WebCryptoOperation*) OVERRIDE;
- virtual void completeWithError() OVERRIDE;
- virtual void completeWithArrayBuffer(const WebKit::WebArrayBuffer&) OVERRIDE;
+ void initializationFailed();
+ void initializationSucceeded(WebKit::WebCryptoOperation*);
+ void completeWithError();
+ void completeWithArrayBuffer(const WebKit::WebArrayBuffer&);
+
+ CryptoOperation* returnValue(ExceptionCode&);
private:
enum State {
@@ -83,7 +84,7 @@ private:
Done,
};
- CryptoOperation(const WebKit::WebCryptoAlgorithm&, ExceptionCode*);
+ CryptoOperation(const WebKit::WebCryptoAlgorithm&);
abarth-chromium 2013/07/23 21:45:49 Please mark one-argument constructors "explicit"
eroman 2013/07/23 23:29:02 Done.
void process(const unsigned char*, size_t);
@@ -100,7 +101,7 @@ private:
RefPtr<ScriptPromiseResolver> m_promiseResolver;
- ExceptionCode* m_exceptionCode;
+ ExceptionCode m_exceptionCode;
};
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698