| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 const WebCryptoKeyUsageMask usages; | 61 const WebCryptoKeyUsageMask usages; |
| 62 }; | 62 }; |
| 63 | 63 |
| 64 WebCryptoKey WebCryptoKey::create(WebCryptoKeyHandle* handle, | 64 WebCryptoKey WebCryptoKey::create(WebCryptoKeyHandle* handle, |
| 65 WebCryptoKeyType type, | 65 WebCryptoKeyType type, |
| 66 bool extractable, | 66 bool extractable, |
| 67 const WebCryptoKeyAlgorithm& algorithm, | 67 const WebCryptoKeyAlgorithm& algorithm, |
| 68 WebCryptoKeyUsageMask usages) { | 68 WebCryptoKeyUsageMask usages) { |
| 69 WebCryptoKey key; | 69 WebCryptoKey key; |
| 70 key.m_private = adoptRef(new WebCryptoKeyPrivate( | 70 key.m_private = adoptRef(new WebCryptoKeyPrivate( |
| 71 wrapUnique(handle), type, extractable, algorithm, usages)); | 71 WTF::wrapUnique(handle), type, extractable, algorithm, usages)); |
| 72 return key; | 72 return key; |
| 73 } | 73 } |
| 74 | 74 |
| 75 WebCryptoKey WebCryptoKey::createNull() { | 75 WebCryptoKey WebCryptoKey::createNull() { |
| 76 return WebCryptoKey(); | 76 return WebCryptoKey(); |
| 77 } | 77 } |
| 78 | 78 |
| 79 WebCryptoKeyHandle* WebCryptoKey::handle() const { | 79 WebCryptoKeyHandle* WebCryptoKey::handle() const { |
| 80 ASSERT(!isNull()); | 80 ASSERT(!isNull()); |
| 81 return m_private->handle.get(); | 81 return m_private->handle.get(); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 111 | 111 |
| 112 void WebCryptoKey::assign(const WebCryptoKey& other) { | 112 void WebCryptoKey::assign(const WebCryptoKey& other) { |
| 113 m_private = other.m_private; | 113 m_private = other.m_private; |
| 114 } | 114 } |
| 115 | 115 |
| 116 void WebCryptoKey::reset() { | 116 void WebCryptoKey::reset() { |
| 117 m_private.reset(); | 117 m_private.reset(); |
| 118 } | 118 } |
| 119 | 119 |
| 120 } // namespace blink | 120 } // namespace blink |
| OLD | NEW |