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

Side by Side Diff: content/child/webcrypto/shared_crypto.h

Issue 278513004: [webcrypto] Fix a race in BlinkPlatformImpl::crypto(), by using eager initilization of WebCryptoImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address sleevi comments Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/child/blink_platform_impl.cc ('k') | content/child/webcrypto/webcrypto_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 one-time initialization. It is safe to call this multiple times.
25 // May be called concurrently from multiple threads.
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
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_
OLDNEW
« no previous file with comments | « content/child/blink_platform_impl.cc ('k') | content/child/webcrypto/webcrypto_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698