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

Unified Diff: Source/modules/crypto/Crypto.cpp

Issue 15897025: Add window.crypto.subtle behind a runtime feature flag ("Crypto") (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on head 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
« no previous file with comments | « Source/modules/crypto/Crypto.h ('k') | Source/modules/crypto/Crypto.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/crypto/Crypto.cpp
diff --git a/Source/modules/crypto/Crypto.cpp b/Source/modules/crypto/Crypto.cpp
index 849e1cad2e75dfd38ac8c1649fc2c70dd1a5c635..a2e55daaa82295fd417022c3b1cbe7a6cb09e019 100644
--- a/Source/modules/crypto/Crypto.cpp
+++ b/Source/modules/crypto/Crypto.cpp
@@ -70,4 +70,11 @@ void Crypto::getRandomValues(ArrayBufferView* array, ExceptionCode& ec)
cryptographicallyRandomValues(array->baseAddress(), array->byteLength());
}
+SubtleCrypto* Crypto::subtle()
+{
+ if (!m_subtleCrypto)
+ m_subtleCrypto = SubtleCrypto::create();
+ return m_subtleCrypto.get();
+}
+
}
« no previous file with comments | « Source/modules/crypto/Crypto.h ('k') | Source/modules/crypto/Crypto.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698