OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 28 matching lines...) Expand all Loading... |
39 | 39 |
40 class WebCryptoKeyPrivate : public ThreadSafeRefCounted<WebCryptoKeyPrivate> { | 40 class WebCryptoKeyPrivate : public ThreadSafeRefCounted<WebCryptoKeyPrivate> { |
41 public: | 41 public: |
42 WebCryptoKeyPrivate(PassOwnPtr<WebCryptoKeyHandle> handle, WebCryptoKeyType
type, bool extractable, const WebCryptoAlgorithm& algorithm, WebCryptoKeyUsageMa
sk usages) | 42 WebCryptoKeyPrivate(PassOwnPtr<WebCryptoKeyHandle> handle, WebCryptoKeyType
type, bool extractable, const WebCryptoAlgorithm& algorithm, WebCryptoKeyUsageMa
sk usages) |
43 : handle(handle) | 43 : handle(handle) |
44 , type(type) | 44 , type(type) |
45 , extractable(extractable) | 45 , extractable(extractable) |
46 , algorithm(algorithm) | 46 , algorithm(algorithm) |
47 , usages(usages) | 47 , usages(usages) |
48 { | 48 { |
| 49 ASSERT(!algorithm.isNull()); |
49 } | 50 } |
50 | 51 |
51 const OwnPtr<WebCryptoKeyHandle> handle; | 52 const OwnPtr<WebCryptoKeyHandle> handle; |
52 const WebCryptoKeyType type; | 53 const WebCryptoKeyType type; |
53 const bool extractable; | 54 const bool extractable; |
54 const WebCryptoAlgorithm algorithm; | 55 const WebCryptoAlgorithm algorithm; |
55 const WebCryptoKeyUsageMask usages; | 56 const WebCryptoKeyUsageMask usages; |
56 }; | 57 }; |
57 | 58 |
58 WebCryptoKey WebCryptoKey::create(WebCryptoKeyHandle* handle, WebCryptoKeyType t
ype, bool extractable, const WebCryptoAlgorithm& algorithm, WebCryptoKeyUsageMas
k usages) | 59 WebCryptoKey WebCryptoKey::create(WebCryptoKeyHandle* handle, WebCryptoKeyType t
ype, bool extractable, const WebCryptoAlgorithm& algorithm, WebCryptoKeyUsageMas
k usages) |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 { | 92 { |
92 m_private = other.m_private; | 93 m_private = other.m_private; |
93 } | 94 } |
94 | 95 |
95 void WebCryptoKey::reset() | 96 void WebCryptoKey::reset() |
96 { | 97 { |
97 m_private.reset(); | 98 m_private.reset(); |
98 } | 99 } |
99 | 100 |
100 } // namespace WebKit | 101 } // namespace WebKit |
OLD | NEW |