DtlsIdentityStoreInterface added and the implementation is called DtlsIdentityStoreImpl (previously named without the -Impl bit and without an interface).
DtlsIdentityStoreImpl is updated to take KeyType into account, something which will be relevant after this CL lands:
https://codereview.webrtc.org/1189583002
The DtlsIdentityService[Interface] classes are about to be removed (to be removed when Chromium no longer implements and uses the interface). This was an unnecessary layer of complexity. The FakeIdentityService is now instead a FakeDtlsIdentityStore.
Where a service was previously passed around, a store is now passed around.
Identity generation is now commonly performed using DtlsIdentityStoreInterface. Previously, if a service was not specified, WebRtcSessionDescriptionFactory could fall back on its own generation code. Now, a store has to be provided for generation to occur.
For more information about the steps being taken to land this without breaking Chromium, see referenced bug.
BUG=webrtc:4899
R=magjed@webrtc.org, tommi@webrtc.org
Review URL: https://codereview.webrtc.org/1176383004 .
Cr-Commit-Position: refs/heads/master@{#9696}
diff --git a/talk/app/webrtc/peerconnectioninterface_unittest.cc b/talk/app/webrtc/peerconnectioninterface_unittest.cc
index 9e68f5a..03ceaf2 100644
--- a/talk/app/webrtc/peerconnectioninterface_unittest.cc
+++ b/talk/app/webrtc/peerconnectioninterface_unittest.cc
@@ -32,7 +32,7 @@
#include "talk/app/webrtc/mediastreaminterface.h"
#include "talk/app/webrtc/peerconnectioninterface.h"
#include "talk/app/webrtc/test/fakeconstraints.h"
-#include "talk/app/webrtc/test/fakedtlsidentityservice.h"
+#include "talk/app/webrtc/test/fakedtlsidentitystore.h"
#include "talk/app/webrtc/test/mockpeerconnectionobservers.h"
#include "talk/app/webrtc/test/testsdpstrings.h"
#include "talk/app/webrtc/videosource.h"
@@ -264,17 +264,17 @@
webrtc::MediaConstraintsInterface::kEnableDtlsSrtp, false);
}
- FakeIdentityService* dtls_service = NULL;
+ scoped_ptr<webrtc::DtlsIdentityStoreInterface> dtls_identity_store;
bool dtls;
if (FindConstraint(constraints,
webrtc::MediaConstraintsInterface::kEnableDtlsSrtp,
&dtls,
- NULL) && dtls) {
- dtls_service = new FakeIdentityService();
+ nullptr) && dtls) {
+ dtls_identity_store.reset(new FakeDtlsIdentityStore());
}
pc_ = pc_factory_->CreatePeerConnection(servers, constraints,
port_allocator_factory_.get(),
- dtls_service,
+ dtls_identity_store.Pass(),
&observer_);
ASSERT_TRUE(pc_.get() != NULL);
observer_.SetPeerConnectionInterface(pc_.get());