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

Unified Diff: webrtc/api/peerconnectioninterface.h

Issue 2017943002: Replacing DtlsIdentityStoreInterface with RTCCertificateGeneratorInterface. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/api/peerconnectionfactoryproxy.h ('k') | webrtc/api/peerconnectioninterface_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/peerconnectioninterface.h
diff --git a/webrtc/api/peerconnectioninterface.h b/webrtc/api/peerconnectioninterface.h
index 4fa9bf2408d76826ea788354fa579508d04b3d8d..b02e672fb2647af15a018cb210c46c3c455abe43 100644
--- a/webrtc/api/peerconnectioninterface.h
+++ b/webrtc/api/peerconnectioninterface.h
@@ -68,6 +68,7 @@
#include "webrtc/base/fileutils.h"
#include "webrtc/base/network.h"
#include "webrtc/base/rtccertificate.h"
+#include "webrtc/base/rtccertificategenerator.h"
#include "webrtc/base/socketaddress.h"
#include "webrtc/base/sslstreamadapter.h"
#include "webrtc/media/base/mediachannel.h"
@@ -580,14 +581,48 @@ class PeerConnectionFactoryInterface : public rtc::RefCountInterface {
const PeerConnectionInterface::RTCConfiguration& configuration,
const MediaConstraintsInterface* constraints,
std::unique_ptr<cricket::PortAllocator> allocator,
- std::unique_ptr<DtlsIdentityStoreInterface> dtls_identity_store,
+ std::unique_ptr<rtc::RTCCertificateGeneratorInterface> cert_generator,
PeerConnectionObserver* observer) = 0;
+ // TODO(hbos): To be removed in favor of the |cert_generator| version as soon
+ // as unittests stop using this version. See bugs.webrtc.org/5707,
+ // bugs.webrtc.org/5708.
+ rtc::scoped_refptr<PeerConnectionInterface> CreatePeerConnectionWithStore(
+ const PeerConnectionInterface::RTCConfiguration& configuration,
+ const MediaConstraintsInterface* constraints,
+ std::unique_ptr<cricket::PortAllocator> allocator,
+ std::unique_ptr<DtlsIdentityStoreInterface> dtls_identity_store,
+ PeerConnectionObserver* observer) {
+ return CreatePeerConnection(
+ configuration,
+ constraints,
+ std::move(allocator),
+ std::unique_ptr<rtc::RTCCertificateGeneratorInterface>(
+ dtls_identity_store ? new RTCCertificateGeneratorStoreWrapper(
+ std::move(dtls_identity_store)) : nullptr),
+ observer);
+ }
virtual rtc::scoped_refptr<PeerConnectionInterface> CreatePeerConnection(
const PeerConnectionInterface::RTCConfiguration& configuration,
std::unique_ptr<cricket::PortAllocator> allocator,
- std::unique_ptr<DtlsIdentityStoreInterface> dtls_identity_store,
+ std::unique_ptr<rtc::RTCCertificateGeneratorInterface> cert_generator,
PeerConnectionObserver* observer) = 0;
+ // TODO(hbos): To be removed in favor of the |cert_generator| version as soon
+ // as unittests stop using this version. See bugs.webrtc.org/5707,
+ // bugs.webrtc.org/5708.
+ rtc::scoped_refptr<PeerConnectionInterface> CreatePeerConnectionWithStore(
+ const PeerConnectionInterface::RTCConfiguration& configuration,
+ std::unique_ptr<cricket::PortAllocator> allocator,
+ std::unique_ptr<DtlsIdentityStoreInterface> dtls_identity_store,
+ PeerConnectionObserver* observer) {
+ return CreatePeerConnection(
+ configuration,
+ std::move(allocator),
+ std::unique_ptr<rtc::RTCCertificateGeneratorInterface>(
+ dtls_identity_store ? new RTCCertificateGeneratorStoreWrapper(
+ std::move(dtls_identity_store)) : nullptr),
+ observer);
+ }
virtual rtc::scoped_refptr<MediaStreamInterface>
CreateLocalMediaStream(const std::string& label) = 0;
« no previous file with comments | « webrtc/api/peerconnectionfactoryproxy.h ('k') | webrtc/api/peerconnectioninterface_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698