OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_CHILD_WEBCRYPTO_SHARED_CRYPTO_H_ | 5 #ifndef CONTENT_CHILD_WEBCRYPTO_SHARED_CRYPTO_H_ |
6 #define CONTENT_CHILD_WEBCRYPTO_SHARED_CRYPTO_H_ | 6 #define CONTENT_CHILD_WEBCRYPTO_SHARED_CRYPTO_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "content/common/content_export.h" | 13 #include "content/common/content_export.h" |
14 #include "third_party/WebKit/public/platform/WebCrypto.h" | 14 #include "third_party/WebKit/public/platform/WebCrypto.h" |
15 #include "third_party/WebKit/public/platform/WebCryptoAlgorithmParams.h" | 15 #include "third_party/WebKit/public/platform/WebCryptoAlgorithmParams.h" |
16 | 16 |
17 namespace content { | 17 namespace content { |
18 | 18 |
19 namespace webcrypto { | 19 namespace webcrypto { |
20 | 20 |
21 class CryptoData; | 21 class CryptoData; |
22 class Status; | 22 class Status; |
23 | 23 |
24 // Do one-time initialization. It is safe to call this multiple times. | 24 // Do lazy initialization. It should be safe to call this multiple times and |
25 // from concurrent threads. | |
Ryan Sleevi
2014/05/13 05:47:20
lazy vs one-time is an artifact of how it's used,
eroman
2014/05/13 18:27:15
Changed back to original comment, but with a menti
| |
25 CONTENT_EXPORT void Init(); | 26 CONTENT_EXPORT void Init(); |
26 | 27 |
27 // The functions exported by shared_crypto.h provide a common entry point for | 28 // The functions exported by shared_crypto.h provide a common entry point for |
28 // synchronous crypto operations. | 29 // synchronous crypto operations. |
29 // | 30 // |
30 // Here is how the layer cake looks. | 31 // Here is how the layer cake looks. |
31 // | 32 // |
32 // Blink | 33 // Blink |
33 // | | 34 // | |
34 // ==============|========================== | 35 // ==============|========================== |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
157 bool extractable, | 158 bool extractable, |
158 blink::WebCryptoKeyUsageMask usage_mask, | 159 blink::WebCryptoKeyUsageMask usage_mask, |
159 const CryptoData& key_data, | 160 const CryptoData& key_data, |
160 blink::WebCryptoKey* key); | 161 blink::WebCryptoKey* key); |
161 | 162 |
162 } // namespace webcrypto | 163 } // namespace webcrypto |
163 | 164 |
164 } // namespace content | 165 } // namespace content |
165 | 166 |
166 #endif // CONTENT_CHILD_WEBCRYPTO_SHARED_CRYPTO_H_ | 167 #endif // CONTENT_CHILD_WEBCRYPTO_SHARED_CRYPTO_H_ |
OLD | NEW |