| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
| 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 */ | 27 */ |
| 28 | 28 |
| 29 #include "modules/crypto/Crypto.h" | 29 #include "modules/crypto/Crypto.h" |
| 30 | 30 |
| 31 #include "bindings/core/v8/ExceptionState.h" | 31 #include "bindings/core/v8/ExceptionState.h" |
| 32 #include "core/dom/DOMArrayBufferView.h" | 32 #include "core/dom/DOMArrayBufferView.h" |
| 33 #include "core/dom/ExceptionCode.h" | 33 #include "core/dom/ExceptionCode.h" |
| 34 #include "wtf/CryptographicallyRandomNumber.h" | 34 #include "platform/wtf/CryptographicallyRandomNumber.h" |
| 35 | 35 |
| 36 namespace blink { | 36 namespace blink { |
| 37 | 37 |
| 38 namespace { | 38 namespace { |
| 39 | 39 |
| 40 bool IsIntegerArray(DOMArrayBufferView* array) { | 40 bool IsIntegerArray(DOMArrayBufferView* array) { |
| 41 DOMArrayBufferView::ViewType type = array->GetType(); | 41 DOMArrayBufferView::ViewType type = array->GetType(); |
| 42 return type == DOMArrayBufferView::kTypeInt8 || | 42 return type == DOMArrayBufferView::kTypeInt8 || |
| 43 type == DOMArrayBufferView::kTypeUint8 || | 43 type == DOMArrayBufferView::kTypeUint8 || |
| 44 type == DOMArrayBufferView::kTypeUint8Clamped || | 44 type == DOMArrayBufferView::kTypeUint8Clamped || |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 if (!subtle_crypto_) | 78 if (!subtle_crypto_) |
| 79 subtle_crypto_ = SubtleCrypto::Create(); | 79 subtle_crypto_ = SubtleCrypto::Create(); |
| 80 return subtle_crypto_.Get(); | 80 return subtle_crypto_.Get(); |
| 81 } | 81 } |
| 82 | 82 |
| 83 DEFINE_TRACE(Crypto) { | 83 DEFINE_TRACE(Crypto) { |
| 84 visitor->Trace(subtle_crypto_); | 84 visitor->Trace(subtle_crypto_); |
| 85 } | 85 } |
| 86 | 86 |
| 87 } // namespace blink | 87 } // namespace blink |
| OLD | NEW |