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

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

Issue 1804563002: Refactor WebRTC certificate generation to use WebPassOwnPtr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « third_party/WebKit/public/platform/WebRTCCertificate.h ('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) 2015 Google Inc. All rights reserved. 2 * Copyright (C) 2015 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 14 matching lines...) Expand all
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
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 WebRTCCertificateGenerator_h 31 #ifndef WebRTCCertificateGenerator_h
32 #define WebRTCCertificateGenerator_h 32 #define WebRTCCertificateGenerator_h
33 33
34 #include "public/platform/WebCallbacks.h" 34 #include "public/platform/WebCallbacks.h"
35 #include "public/platform/WebPassOwnPtr.h"
35 #include "public/platform/WebRTCCertificate.h" 36 #include "public/platform/WebRTCCertificate.h"
36 #include "public/platform/WebRTCKeyParams.h" 37 #include "public/platform/WebRTCKeyParams.h"
37 #include "public/platform/WebURL.h" 38 #include "public/platform/WebURL.h"
38 39
39 namespace blink { 40 namespace blink {
40 41
42 using WebRTCCertificateCallback = WebCallbacks<WebPassOwnPtr<WebRTCCertificate>, void>;
43
41 // Interface defining a class that can generate WebRTCCertificates asynchronousl y. 44 // Interface defining a class that can generate WebRTCCertificates asynchronousl y.
42 class WebRTCCertificateGenerator { 45 class WebRTCCertificateGenerator {
43 public: 46 public:
44 virtual ~WebRTCCertificateGenerator() {} 47 virtual ~WebRTCCertificateGenerator() {}
45 48
46 // Start generating a certificate asynchronously. The |observer| is invoked on the 49 // Start generating a certificate asynchronously. |observer| is invoked on t he
47 // same thread that called generateCertificate when the operation is complet ed. 50 // same thread that called generateCertificate when the operation is complet ed.
48 virtual void generateCertificate( 51 virtual void generateCertificate(
49 const WebRTCKeyParams&, 52 const WebRTCKeyParams&,
50 const WebURL&, 53 const WebURL&,
51 const WebURL& firstPartyForCookies, 54 const WebURL& firstPartyForCookies,
52 WebCallbacks<WebRTCCertificate*, void>* observer) = 0; 55 WebPassOwnPtr<WebRTCCertificateCallback> observer) = 0;
53 56
54 // Determines if the parameters are supported by generateCertificate. 57 // Determines if the parameters are supported by generateCertificate.
55 // For example, if the number of bits of some parameter is too small or too large we 58 // For example, if the number of bits of some parameter is too small or too large we
56 // may want to reject it for security or performance reasons. 59 // may want to reject it for security or performance reasons.
57 virtual bool isSupportedKeyParams(const WebRTCKeyParams&) = 0; 60 virtual bool isSupportedKeyParams(const WebRTCKeyParams&) = 0;
58 }; 61 };
59 62
60 } // namespace blink 63 } // namespace blink
61 64
62 #endif // WebRTCCertificateGenerator_h 65 #endif // WebRTCCertificateGenerator_h
OLDNEW
« no previous file with comments | « third_party/WebKit/public/platform/WebRTCCertificate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698