Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(123)

Side by Side Diff: third_party/WebKit/public/platform/WebCryptoAlgorithm.h

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 17 matching lines...) Expand all
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef WebCryptoAlgorithm_h 31 #ifndef WebCryptoAlgorithm_h
32 #define WebCryptoAlgorithm_h 32 #define WebCryptoAlgorithm_h
33 33
34 #include "WebCommon.h" 34 #include "WebCommon.h"
35 #include "WebPrivatePtr.h" 35 #include "WebPrivatePtr.h"
36 36
37 #if INSIDE_BLINK 37 #if INSIDE_BLINK
38 #include "wtf/PassOwnPtr.h" 38 #include <memory>
39 #endif 39 #endif
40 40
41 namespace blink { 41 namespace blink {
42 42
43 enum WebCryptoOperation { 43 enum WebCryptoOperation {
44 WebCryptoOperationEncrypt, 44 WebCryptoOperationEncrypt,
45 WebCryptoOperationDecrypt, 45 WebCryptoOperationDecrypt,
46 WebCryptoOperationSign, 46 WebCryptoOperationSign,
47 WebCryptoOperationVerify, 47 WebCryptoOperationVerify,
48 WebCryptoOperationDigest, 48 WebCryptoOperationDigest,
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 // * Immutable 146 // * Immutable
147 // * Threadsafe 147 // * Threadsafe
148 // * Copiable (cheaply) 148 // * Copiable (cheaply)
149 // 149 //
150 // If WebCryptoAlgorithm "isNull()" then it is invalid to call any of the other 150 // If WebCryptoAlgorithm "isNull()" then it is invalid to call any of the other
151 // methods on it (other than destruction, assignment, or isNull()). 151 // methods on it (other than destruction, assignment, or isNull()).
152 class WebCryptoAlgorithm { 152 class WebCryptoAlgorithm {
153 public: 153 public:
154 #if INSIDE_BLINK 154 #if INSIDE_BLINK
155 WebCryptoAlgorithm() { } 155 WebCryptoAlgorithm() { }
156 BLINK_PLATFORM_EXPORT WebCryptoAlgorithm(WebCryptoAlgorithmId, PassOwnPtr<We bCryptoAlgorithmParams>); 156 BLINK_PLATFORM_EXPORT WebCryptoAlgorithm(WebCryptoAlgorithmId, std::unique_p tr<WebCryptoAlgorithmParams>);
157 #endif 157 #endif
158 158
159 BLINK_PLATFORM_EXPORT static WebCryptoAlgorithm createNull(); 159 BLINK_PLATFORM_EXPORT static WebCryptoAlgorithm createNull();
160 BLINK_PLATFORM_EXPORT static WebCryptoAlgorithm adoptParamsAndCreate(WebCryp toAlgorithmId, WebCryptoAlgorithmParams*); 160 BLINK_PLATFORM_EXPORT static WebCryptoAlgorithm adoptParamsAndCreate(WebCryp toAlgorithmId, WebCryptoAlgorithmParams*);
161 161
162 // Returns a WebCryptoAlgorithmInfo for the algorithm with the given ID. If 162 // Returns a WebCryptoAlgorithmInfo for the algorithm with the given ID. If
163 // the ID is invalid, return 0. The caller can assume the pointer will be 163 // the ID is invalid, return 0. The caller can assume the pointer will be
164 // valid for the program's entire runtime. 164 // valid for the program's entire runtime.
165 BLINK_PLATFORM_EXPORT static const WebCryptoAlgorithmInfo* lookupAlgorithmIn fo(WebCryptoAlgorithmId); 165 BLINK_PLATFORM_EXPORT static const WebCryptoAlgorithmInfo* lookupAlgorithmIn fo(WebCryptoAlgorithmId);
166 166
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 private: 207 private:
208 BLINK_PLATFORM_EXPORT void assign(const WebCryptoAlgorithm& other); 208 BLINK_PLATFORM_EXPORT void assign(const WebCryptoAlgorithm& other);
209 BLINK_PLATFORM_EXPORT void reset(); 209 BLINK_PLATFORM_EXPORT void reset();
210 210
211 WebPrivatePtr<WebCryptoAlgorithmPrivate> m_private; 211 WebPrivatePtr<WebCryptoAlgorithmPrivate> m_private;
212 }; 212 };
213 213
214 } // namespace blink 214 } // namespace blink
215 215
216 #endif 216 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698