| 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 } | 59 } |
| 60 | 60 |
| 61 void WebCryptoResult::completeWithBoolean(bool b) | 61 void WebCryptoResult::completeWithBoolean(bool b) |
| 62 { | 62 { |
| 63 m_impl->completeWithBoolean(b); | 63 m_impl->completeWithBoolean(b); |
| 64 reset(); | 64 reset(); |
| 65 } | 65 } |
| 66 | 66 |
| 67 void WebCryptoResult::completeWithKey(const WebCryptoKey& key) | 67 void WebCryptoResult::completeWithKey(const WebCryptoKey& key) |
| 68 { | 68 { |
| 69 ASSERT(!key.isNull()); |
| 69 m_impl->completeWithKey(key); | 70 m_impl->completeWithKey(key); |
| 70 reset(); | 71 reset(); |
| 71 } | 72 } |
| 72 | 73 |
| 73 void WebCryptoResult::completeWithKeyPair(const WebCryptoKey& publicKey, const W
ebCryptoKey& privateKey) | 74 void WebCryptoResult::completeWithKeyPair(const WebCryptoKey& publicKey, const W
ebCryptoKey& privateKey) |
| 74 { | 75 { |
| 76 ASSERT(!publicKey.isNull()); |
| 77 ASSERT(!privateKey.isNull()); |
| 75 m_impl->completeWithKeyPair(publicKey, privateKey); | 78 m_impl->completeWithKeyPair(publicKey, privateKey); |
| 76 reset(); | 79 reset(); |
| 77 } | 80 } |
| 78 | 81 |
| 79 WebCryptoResult::WebCryptoResult(const WTF::PassRefPtr<WebCore::CryptoResult>& i
mpl) | 82 WebCryptoResult::WebCryptoResult(const WTF::PassRefPtr<WebCore::CryptoResult>& i
mpl) |
| 80 : m_impl(impl) | 83 : m_impl(impl) |
| 81 { | 84 { |
| 82 ASSERT(m_impl.get()); | 85 ASSERT(m_impl.get()); |
| 83 } | 86 } |
| 84 | 87 |
| 85 void WebCryptoResult::reset() | 88 void WebCryptoResult::reset() |
| 86 { | 89 { |
| 87 m_impl.reset(); | 90 m_impl.reset(); |
| 88 } | 91 } |
| 89 | 92 |
| 90 void WebCryptoResult::assign(const WebCryptoResult& o) | 93 void WebCryptoResult::assign(const WebCryptoResult& o) |
| 91 { | 94 { |
| 92 m_impl = o.m_impl; | 95 m_impl = o.m_impl; |
| 93 } | 96 } |
| 94 | 97 |
| 95 } // namespace WebKit | 98 } // namespace WebKit |
| OLD | NEW |