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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 WebCryptoAlgorithmId id; | 49 WebCryptoAlgorithmId id; |
50 const char* const name; | 50 const char* const name; |
51 OwnPtr<WebCryptoAlgorithmParams> params; | 51 OwnPtr<WebCryptoAlgorithmParams> params; |
52 }; | 52 }; |
53 | 53 |
54 WebCryptoAlgorithm::WebCryptoAlgorithm(WebCryptoAlgorithmId id, const char* name
, PassOwnPtr<WebCryptoAlgorithmParams> params) | 54 WebCryptoAlgorithm::WebCryptoAlgorithm(WebCryptoAlgorithmId id, const char* name
, PassOwnPtr<WebCryptoAlgorithmParams> params) |
55 : m_private(adoptRef(new WebCryptoAlgorithmPrivate(id, name, params))) | 55 : m_private(adoptRef(new WebCryptoAlgorithmPrivate(id, name, params))) |
56 { | 56 { |
57 } | 57 } |
58 | 58 |
| 59 WebCryptoAlgorithm WebCryptoAlgorithm::adoptParamsAndCreate(WebCryptoAlgorithmId
id, const char* name, WebCryptoAlgorithmParams* params) |
| 60 { |
| 61 return WebCryptoAlgorithm(id, name, adoptPtr(params)); |
| 62 } |
| 63 |
59 WebCryptoAlgorithmId WebCryptoAlgorithm::id() const | 64 WebCryptoAlgorithmId WebCryptoAlgorithm::id() const |
60 { | 65 { |
61 return m_private->id; | 66 return m_private->id; |
62 } | 67 } |
63 | 68 |
64 const char* WebCryptoAlgorithm::name() const | 69 const char* WebCryptoAlgorithm::name() const |
65 { | 70 { |
66 return m_private->name; | 71 return m_private->name; |
67 } | 72 } |
68 | 73 |
(...skipping 29 matching lines...) Expand all Loading... |
98 { | 103 { |
99 m_private = other.m_private; | 104 m_private = other.m_private; |
100 } | 105 } |
101 | 106 |
102 void WebCryptoAlgorithm::reset() | 107 void WebCryptoAlgorithm::reset() |
103 { | 108 { |
104 m_private.reset(); | 109 m_private.reset(); |
105 } | 110 } |
106 | 111 |
107 } // namespace WebKit | 112 } // namespace WebKit |
OLD | NEW |