OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_RENDERER_WEBCRYPTO_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_WEBCRYPTO_IMPL_H_ |
6 #define CONTENT_RENDERER_WEBCRYPTO_IMPL_H_ | 6 #define CONTENT_RENDERER_WEBCRYPTO_IMPL_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/gtest_prod_util.h" | |
11 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
12 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
13 #include "third_party/WebKit/public/platform/WebCrypto.h" | 12 #include "third_party/WebKit/public/platform/WebCrypto.h" |
14 | 13 |
15 namespace content { | 14 namespace content { |
16 | 15 |
17 class CONTENT_EXPORT WebCryptoImpl | 16 class CONTENT_EXPORT WebCryptoImpl |
18 : NON_EXPORTED_BASE(public WebKit::WebCrypto) { | 17 : NON_EXPORTED_BASE(public WebKit::WebCrypto) { |
19 public: | 18 public: |
20 WebCryptoImpl(); | 19 WebCryptoImpl(); |
(...skipping 12 matching lines...) Expand all Loading... |
33 WebKit::WebCryptoKeyUsageMask usage_mask, | 32 WebKit::WebCryptoKeyUsageMask usage_mask, |
34 WebKit::WebCryptoResult result); | 33 WebKit::WebCryptoResult result); |
35 virtual void sign( | 34 virtual void sign( |
36 const WebKit::WebCryptoAlgorithm& algorithm, | 35 const WebKit::WebCryptoAlgorithm& algorithm, |
37 const WebKit::WebCryptoKey& key, | 36 const WebKit::WebCryptoKey& key, |
38 const unsigned char* data, | 37 const unsigned char* data, |
39 unsigned data_size, | 38 unsigned data_size, |
40 WebKit::WebCryptoResult result); | 39 WebKit::WebCryptoResult result); |
41 | 40 |
42 protected: | 41 protected: |
43 FRIEND_TEST_ALL_PREFIXES(WebCryptoImplTest, DigestSampleSets); | 42 friend class WebCryptoImplTest; |
44 FRIEND_TEST_ALL_PREFIXES(WebCryptoImplTest, HMACSampleSets); | |
45 | 43 |
46 void Init(); | 44 void Init(); |
47 | 45 |
48 bool DigestInternal( | 46 bool DigestInternal( |
49 const WebKit::WebCryptoAlgorithm& algorithm, | 47 const WebKit::WebCryptoAlgorithm& algorithm, |
50 const unsigned char* data, | 48 const unsigned char* data, |
51 unsigned data_size, | 49 unsigned data_size, |
52 WebKit::WebArrayBuffer* buffer); | 50 WebKit::WebArrayBuffer* buffer); |
53 bool ImportKeyInternal( | 51 bool ImportKeyInternal( |
54 WebKit::WebCryptoKeyFormat format, | 52 WebKit::WebCryptoKeyFormat format, |
(...skipping 10 matching lines...) Expand all Loading... |
65 unsigned data_size, | 63 unsigned data_size, |
66 WebKit::WebArrayBuffer* buffer); | 64 WebKit::WebArrayBuffer* buffer); |
67 | 65 |
68 private: | 66 private: |
69 DISALLOW_COPY_AND_ASSIGN(WebCryptoImpl); | 67 DISALLOW_COPY_AND_ASSIGN(WebCryptoImpl); |
70 }; | 68 }; |
71 | 69 |
72 } // namespace content | 70 } // namespace content |
73 | 71 |
74 #endif // CONTENT_RENDERER_WEBCRYPTO_IMPL_H_ | 72 #endif // CONTENT_RENDERER_WEBCRYPTO_IMPL_H_ |
OLD | NEW |