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

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

Issue 21185005: Expose a constructor for WebCryptoAlgorithm. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add a factory method instead of constructor Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/platform/chromium/support/WebCryptoAlgorithm.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 class WebCryptoAlgorithmPrivate; 68 class WebCryptoAlgorithmPrivate;
69 69
70 // The WebCryptoAlgorithm represents a normalized algorithm and its parameters. 70 // The WebCryptoAlgorithm represents a normalized algorithm and its parameters.
71 // * Immutable 71 // * Immutable
72 // * Threadsafe 72 // * Threadsafe
73 // * Copiable (cheaply) 73 // * Copiable (cheaply)
74 class WebCryptoAlgorithm { 74 class WebCryptoAlgorithm {
75 public: 75 public:
76 #if WEBKIT_IMPLEMENTATION 76 #if WEBKIT_IMPLEMENTATION
77 WebCryptoAlgorithm() { } 77 WebCryptoAlgorithm() { }
78 WebCryptoAlgorithm(WebCryptoAlgorithmId, const char*, PassOwnPtr<WebCryptoAl gorithmParams>); 78 WebCryptoAlgorithm(WebCryptoAlgorithmId, const char* name, PassOwnPtr<WebCry ptoAlgorithmParams>);
79 #endif 79 #endif
80 80
81 WEBKIT_EXPORT static WebCryptoAlgorithm adoptParamsAndCreate(WebCryptoAlgori thmId, const char* name, WebCryptoAlgorithmParams*);
82
81 ~WebCryptoAlgorithm() { reset(); } 83 ~WebCryptoAlgorithm() { reset(); }
82 84
83 WebCryptoAlgorithm(const WebCryptoAlgorithm& other) { assign(other); } 85 WebCryptoAlgorithm(const WebCryptoAlgorithm& other) { assign(other); }
84 WebCryptoAlgorithm& operator=(const WebCryptoAlgorithm& other) 86 WebCryptoAlgorithm& operator=(const WebCryptoAlgorithm& other)
85 { 87 {
86 assign(other); 88 assign(other);
87 return *this; 89 return *this;
88 } 90 }
89 91
90 WEBKIT_EXPORT WebCryptoAlgorithmId id() const; 92 WEBKIT_EXPORT WebCryptoAlgorithmId id() const;
(...skipping 10 matching lines...) Expand all
101 private: 103 private:
102 WEBKIT_EXPORT void assign(const WebCryptoAlgorithm& other); 104 WEBKIT_EXPORT void assign(const WebCryptoAlgorithm& other);
103 WEBKIT_EXPORT void reset(); 105 WEBKIT_EXPORT void reset();
104 106
105 WebPrivatePtr<WebCryptoAlgorithmPrivate> m_private; 107 WebPrivatePtr<WebCryptoAlgorithmPrivate> m_private;
106 }; 108 };
107 109
108 } // namespace WebKit 110 } // namespace WebKit
109 111
110 #endif 112 #endif
OLDNEW
« no previous file with comments | « Source/core/platform/chromium/support/WebCryptoAlgorithm.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698