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/peerconnectionfactory.h b/talk/app/webrtc/peerconnectionfactory.h
index d6bf03f..c5855f4 100644
--- a/talk/app/webrtc/peerconnectionfactory.h
+++ b/talk/app/webrtc/peerconnectionfactory.h
@@ -30,15 +30,18 @@
 
 #include <string>
 
+#include "talk/app/webrtc/dtlsidentitystore.h"
 #include "talk/app/webrtc/mediastreaminterface.h"
 #include "talk/app/webrtc/peerconnectioninterface.h"
 #include "talk/session/media/channelmanager.h"
 #include "webrtc/base/scoped_ptr.h"
+#include "webrtc/base/scoped_ref_ptr.h"
 #include "webrtc/base/thread.h"
 
 namespace webrtc {
 
-class DtlsIdentityStore;
+typedef rtc::RefCountedObject<DtlsIdentityStoreImpl>
+    RefCountedDtlsIdentityStore;
 
 class PeerConnectionFactory : public PeerConnectionFactoryInterface {
  public:
@@ -46,13 +49,14 @@
     options_ = options;
   }
 
-  virtual rtc::scoped_refptr<PeerConnectionInterface>
+  // webrtc::PeerConnectionFactoryInterface override;
+  rtc::scoped_refptr<PeerConnectionInterface>
       CreatePeerConnection(
           const PeerConnectionInterface::RTCConfiguration& configuration,
           const MediaConstraintsInterface* constraints,
           PortAllocatorFactoryInterface* allocator_factory,
-          DTLSIdentityServiceInterface* dtls_identity_service,
-          PeerConnectionObserver* observer);
+          rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store,
+          PeerConnectionObserver* observer) override;
 
   bool Initialize();
 
@@ -112,7 +116,7 @@
   rtc::scoped_ptr<cricket::WebRtcVideoDecoderFactory>
       video_decoder_factory_;
 
-  rtc::scoped_ptr<webrtc::DtlsIdentityStore> dtls_identity_store_;
+  rtc::scoped_refptr<RefCountedDtlsIdentityStore> dtls_identity_store_;
 };
 
 }  // namespace webrtc