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

Unified Diff: talk/app/webrtc/peerconnectioninterface.h

Issue 1269843005: Added DtlsCertificate, a ref counted object owning an SSLIdentity (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: webrtcsession unittest added to ensure when a cert is provided it is used Created 5 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 side-by-side diff with in-line comments
Download patch
Index: talk/app/webrtc/peerconnectioninterface.h
diff --git a/talk/app/webrtc/peerconnectioninterface.h b/talk/app/webrtc/peerconnectioninterface.h
index 946b1253c99bfca3ce1bd508a0973f6f437e83d6..30adba2de686ca9996af916cd4f8fc9777cfd856 100644
--- a/talk/app/webrtc/peerconnectioninterface.h
+++ b/talk/app/webrtc/peerconnectioninterface.h
@@ -72,6 +72,7 @@
#include <vector>
#include "talk/app/webrtc/datachannelinterface.h"
+#include "talk/app/webrtc/dtlscertificate.h"
#include "talk/app/webrtc/dtlsidentitystore.h"
#include "talk/app/webrtc/dtmfsenderinterface.h"
#include "talk/app/webrtc/jsep.h"
@@ -543,8 +544,24 @@ class PeerConnectionFactoryInterface : public rtc::RefCountInterface {
DTLSIdentityServiceInterface* dtls_identity_service,
rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store,
PeerConnectionObserver* observer) {
+ rtc::scoped_refptr<DtlsCertificate> null_cert = nullptr;
return CreatePeerConnection(configuration, constraints, allocator_factory,
- dtls_identity_service, observer);
+ dtls_identity_service, null_cert, observer);
+ }
+
+ // This method takes the ownership of |dtls_identity_service|.
+ // TODO(hbos): Remove this version of CreatePeerConnection in favor of the
+ // one taking certificate when Chromium uses it.
+ rtc::scoped_refptr<PeerConnectionInterface>
+ CreatePeerConnection(
+ const PeerConnectionInterface::RTCConfiguration& configuration,
+ const MediaConstraintsInterface* constraints,
+ PortAllocatorFactoryInterface* allocator_factory,
+ DTLSIdentityServiceInterface* dtls_identity_service,
+ PeerConnectionObserver* observer) {
+ rtc::scoped_refptr<DtlsCertificate> null_cert = nullptr;
+ return CreatePeerConnection(configuration, constraints, allocator_factory,
+ dtls_identity_service, null_cert, observer);
}
// This method takes the ownership of |dtls_identity_service|.
@@ -554,6 +571,7 @@ class PeerConnectionFactoryInterface : public rtc::RefCountInterface {
const MediaConstraintsInterface* constraints,
PortAllocatorFactoryInterface* allocator_factory,
DTLSIdentityServiceInterface* dtls_identity_service,
+ rtc::scoped_refptr<DtlsCertificate> certificate,
PeerConnectionObserver* observer) = 0;
hbos 2015/08/06 12:11:34 I should add a comment saying what |dtls_identity_
// TODO(mallinath) : Remove below versions after clients are updated
@@ -571,8 +589,9 @@ class PeerConnectionFactoryInterface : public rtc::RefCountInterface {
PeerConnectionObserver* observer) {
PeerConnectionInterface::RTCConfiguration rtc_config;
rtc_config.servers = servers;
+ rtc::scoped_refptr<DtlsCertificate> null_cert = nullptr;
return CreatePeerConnection(rtc_config, constraints, allocator_factory,
- dtls_identity_service, observer);
+ dtls_identity_service, null_cert, observer);
}
virtual rtc::scoped_refptr<MediaStreamInterface>

Powered by Google App Engine
This is Rietveld 408576698