| Index: talk/app/webrtc/peerconnectionfactory.cc
|
| diff --git a/talk/app/webrtc/peerconnectionfactory.cc b/talk/app/webrtc/peerconnectionfactory.cc
|
| index 3524af7932a4f92f60da84e552f742d1a2aaa7ac..3eb3facb741cd707ba84840fdfe19d274e195ae0 100644
|
| --- a/talk/app/webrtc/peerconnectionfactory.cc
|
| +++ b/talk/app/webrtc/peerconnectionfactory.cc
|
| @@ -28,7 +28,6 @@
|
| #include "talk/app/webrtc/peerconnectionfactory.h"
|
|
|
| #include "talk/app/webrtc/audiotrack.h"
|
| -#include "talk/app/webrtc/dtlsidentityservice.h"
|
| #include "talk/app/webrtc/dtlsidentitystore.h"
|
| #include "talk/app/webrtc/localaudiosource.h"
|
| #include "talk/app/webrtc/mediastreamproxy.h"
|
| @@ -170,7 +169,7 @@ bool PeerConnectionFactory::Initialize() {
|
| }
|
|
|
| dtls_identity_store_.reset(
|
| - new DtlsIdentityStore(signaling_thread_, worker_thread_));
|
| + new DtlsIdentityStoreImpl(signaling_thread_, worker_thread_));
|
| dtls_identity_store_->Initialize();
|
|
|
| return true;
|
| @@ -205,14 +204,19 @@ PeerConnectionFactory::CreatePeerConnection(
|
| const PeerConnectionInterface::RTCConfiguration& configuration,
|
| const MediaConstraintsInterface* constraints,
|
| PortAllocatorFactoryInterface* allocator_factory,
|
| - DTLSIdentityServiceInterface* dtls_identity_service,
|
| - PeerConnectionObserver* observer) {
|
| + PeerConnectionObserver* observer,
|
| + DtlsIdentityStoreInterface* dtls_identity_store,
|
| + rtc::KeyType key_type) {
|
| DCHECK(signaling_thread_->IsCurrent());
|
| DCHECK(allocator_factory || default_allocator_factory_);
|
|
|
| - if (!dtls_identity_service) {
|
| - dtls_identity_service = new DtlsIdentityService(dtls_identity_store_.get());
|
| + // TODO(hbos): Clarify that the API does "use parameter store, or if null use
|
| + // a default DtlsIdentityStoreImpl". Or nuke parameter? (Probably needed in
|
| + // unittest.) Or put it in the end and default it to null.
|
| + if (!dtls_identity_store) {
|
| + dtls_identity_store = dtls_identity_store_.get();
|
| }
|
| + DCHECK(dtls_identity_store);
|
|
|
| PortAllocatorFactoryInterface* chosen_allocator_factory =
|
| allocator_factory ? allocator_factory : default_allocator_factory_.get();
|
| @@ -224,8 +228,9 @@ PeerConnectionFactory::CreatePeerConnection(
|
| configuration,
|
| constraints,
|
| chosen_allocator_factory,
|
| - dtls_identity_service,
|
| - observer)) {
|
| + observer,
|
| + dtls_identity_store,
|
| + key_type)) {
|
| return NULL;
|
| }
|
| return PeerConnectionProxy::Create(signaling_thread(), pc);
|
|
|