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

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

Issue 312393004: Expose WebCrypto's lookupAlgorithmInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@share_normalize
Patch Set: Created 6 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 class WebCryptoAlgorithm { 108 class WebCryptoAlgorithm {
109 public: 109 public:
110 #if INSIDE_BLINK 110 #if INSIDE_BLINK
111 WebCryptoAlgorithm() { } 111 WebCryptoAlgorithm() { }
112 BLINK_PLATFORM_EXPORT WebCryptoAlgorithm(WebCryptoAlgorithmId, PassOwnPtr<We bCryptoAlgorithmParams>); 112 BLINK_PLATFORM_EXPORT WebCryptoAlgorithm(WebCryptoAlgorithmId, PassOwnPtr<We bCryptoAlgorithmParams>);
113 #endif 113 #endif
114 114
115 BLINK_PLATFORM_EXPORT static WebCryptoAlgorithm createNull(); 115 BLINK_PLATFORM_EXPORT static WebCryptoAlgorithm createNull();
116 BLINK_PLATFORM_EXPORT static WebCryptoAlgorithm adoptParamsAndCreate(WebCryp toAlgorithmId, WebCryptoAlgorithmParams*); 116 BLINK_PLATFORM_EXPORT static WebCryptoAlgorithm adoptParamsAndCreate(WebCryp toAlgorithmId, WebCryptoAlgorithmParams*);
117 117
118 // Returns the canonical (case-sensitive) name for the algorithm with the
119 // given ID as a null-terminated C-string literal. Caller can assume the
120 // pointer will be valid for the program's entire runtime.
121 BLINK_PLATFORM_EXPORT static const char* idToName(WebCryptoAlgorithmId);
122
118 ~WebCryptoAlgorithm() { reset(); } 123 ~WebCryptoAlgorithm() { reset(); }
119 124
120 WebCryptoAlgorithm(const WebCryptoAlgorithm& other) { assign(other); } 125 WebCryptoAlgorithm(const WebCryptoAlgorithm& other) { assign(other); }
121 WebCryptoAlgorithm& operator=(const WebCryptoAlgorithm& other) 126 WebCryptoAlgorithm& operator=(const WebCryptoAlgorithm& other)
122 { 127 {
123 assign(other); 128 assign(other);
124 return *this; 129 return *this;
125 } 130 }
126 131
127 BLINK_PLATFORM_EXPORT bool isNull() const; 132 BLINK_PLATFORM_EXPORT bool isNull() const;
(...skipping 20 matching lines...) Expand all
148 private: 153 private:
149 BLINK_PLATFORM_EXPORT void assign(const WebCryptoAlgorithm& other); 154 BLINK_PLATFORM_EXPORT void assign(const WebCryptoAlgorithm& other);
150 BLINK_PLATFORM_EXPORT void reset(); 155 BLINK_PLATFORM_EXPORT void reset();
151 156
152 WebPrivatePtr<WebCryptoAlgorithmPrivate> m_private; 157 WebPrivatePtr<WebCryptoAlgorithmPrivate> m_private;
153 }; 158 };
154 159
155 } // namespace blink 160 } // namespace blink
156 161
157 #endif 162 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698