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

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

Issue 16820007: Expose crypto.getRandomValues() to workers. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 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/RandomSource.h
diff --git a/Source/modules/crypto/SubtleCrypto.h b/Source/modules/crypto/RandomSource.h
similarity index 85%
copy from Source/modules/crypto/SubtleCrypto.h
copy to Source/modules/crypto/RandomSource.h
index a7550052758fb678221f9c7be4f2209562325cdc..1aaac614a92fd848c4b223d60439685b1db6081e 100644
--- a/Source/modules/crypto/SubtleCrypto.h
+++ b/Source/modules/crypto/RandomSource.h
@@ -26,8 +26,8 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef SubtleCrypto_h
-#define SubtleCrypto_h
+#ifndef RandomSource_h
+#define RandomSource_h
#include "bindings/v8/ScriptWrappable.h"
#include "wtf/Forward.h"
@@ -38,12 +38,14 @@ namespace WebCore {
typedef int ExceptionCode;
-class SubtleCrypto : public ScriptWrappable, public RefCounted<SubtleCrypto> {
+class RandomSource : public ScriptWrappable, public RefCounted<RandomSource> {
public:
- static PassRefPtr<SubtleCrypto> create() { return adoptRef(new SubtleCrypto()); }
+ static PassRefPtr<RandomSource> create() { return adoptRef(new RandomSource()); }
-private:
- SubtleCrypto();
+ void getRandomValues(ArrayBufferView*, ExceptionCode&);
+
+protected:
+ RandomSource();
};
}

Powered by Google App Engine
This is Rietveld 408576698