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

Side by Side Diff: third_party/WebKit/public/platform/WebRTCCertificate.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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WebRTCCertificate_h 5 #ifndef WebRTCCertificate_h
6 #define WebRTCCertificate_h 6 #define WebRTCCertificate_h
7 7
8 #include "public/platform/WebPassOwnPtr.h"
8 #include "public/platform/WebRTCKeyParams.h" 9 #include "public/platform/WebRTCKeyParams.h"
9 10
10 namespace blink { 11 namespace blink {
11 12
12 // WebRTCCertificate is an interface defining what Blink needs to know about cer tificates, 13 // WebRTCCertificate is an interface defining what Blink needs to know about cer tificates,
13 // hiding Chromium and WebRTC layer implementation details. It is possible to cr eate 14 // hiding Chromium and WebRTC layer implementation details. It is possible to cr eate
14 // shallow copies of the WebRTCCertificate. When all copies are destroyed, the 15 // shallow copies of the WebRTCCertificate. When all copies are destroyed, the
15 // implementation specific data must be freed. WebRTCCertificate objects thus ac t as 16 // implementation specific data must be freed. WebRTCCertificate objects thus ac t as
16 // references to the reference counted internal data. 17 // references to the reference counted internal data.
17 class WebRTCCertificate { 18 class WebRTCCertificate {
18 public: 19 public:
19 WebRTCCertificate() = default; 20 WebRTCCertificate() = default;
20 virtual ~WebRTCCertificate() = default; 21 virtual ~WebRTCCertificate() = default;
21 22
22 // Copies the WebRTCCertificate object without copying the underlying implem entation 23 // Copies the WebRTCCertificate object without copying the underlying implem entation
23 // specific (WebRTC layer) certificate. When all copies are destroyed the un derlying 24 // specific (WebRTC layer) certificate. When all copies are destroyed the un derlying
24 // data is freed. 25 // data is freed.
25 virtual WebRTCCertificate* shallowCopy() const = 0; 26 virtual WebPassOwnPtr<WebRTCCertificate> shallowCopy() const = 0;
26 27
27 virtual const WebRTCKeyParams& keyParams() const = 0; 28 virtual const WebRTCKeyParams& keyParams() const = 0;
28 29
29 // Returns the expiration time in ms relative to epoch, 1970-01-01T00:00:00Z . 30 // Returns the expiration time in ms relative to epoch, 1970-01-01T00:00:00Z .
30 virtual uint64_t expires() const = 0; 31 virtual uint64_t expires() const = 0;
31 32
32 private: 33 private:
33 WebRTCCertificate(const WebRTCCertificate&) = delete; 34 WebRTCCertificate(const WebRTCCertificate&) = delete;
34 WebRTCCertificate& operator=(const WebRTCCertificate&) = delete; 35 WebRTCCertificate& operator=(const WebRTCCertificate&) = delete;
35 }; 36 };
36 37
37 } // namespace blink 38 } // namespace blink
38 39
39 #endif // WebRTCCertificate_h 40 #endif // WebRTCCertificate_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698