Removing DtlsIdentityService[Interface] which has been replaced by DtlsIdentityStore[Interface/Impl].
This is CL is part of an effort to land https://codereview.webrtc.org/1176383004 without breaking Chromium. See bug for more information. BUG=webrtc:4899 Review URL: https://codereview.webrtc.org/1282413002 Cr-Commit-Position: refs/heads/master@{#9705}
This commit is contained in:
@ -43,23 +43,6 @@ namespace webrtc {
|
||||
class SSLIdentity;
|
||||
class Thread;
|
||||
|
||||
// Used to receive callbacks of DTLS identity requests.
|
||||
class DTLSIdentityRequestObserver : public rtc::RefCountInterface {
|
||||
public:
|
||||
virtual void OnFailure(int error) = 0;
|
||||
// TODO(jiayl): Unify the OnSuccess method once Chrome code is updated.
|
||||
virtual void OnSuccess(const std::string& der_cert,
|
||||
const std::string& der_private_key) = 0;
|
||||
// |identity| is a scoped_ptr because rtc::SSLIdentity is not copyable and the
|
||||
// client has to get the ownership of the object to make use of it.
|
||||
virtual void OnSuccessWithIdentityObj(
|
||||
rtc::scoped_ptr<rtc::SSLIdentity> identity) = 0;
|
||||
|
||||
protected:
|
||||
virtual ~DTLSIdentityRequestObserver() {}
|
||||
};
|
||||
|
||||
// TODO(hbos): To replace DTLSIdentityRequestObserver.
|
||||
// Used to receive callbacks of DTLS identity requests.
|
||||
class DtlsIdentityRequestObserver : public rtc::RefCountInterface {
|
||||
public:
|
||||
@ -75,7 +58,6 @@ class DtlsIdentityRequestObserver : public rtc::RefCountInterface {
|
||||
virtual ~DtlsIdentityRequestObserver() {}
|
||||
};
|
||||
|
||||
// TODO(hbos): To be implemented.
|
||||
// This interface defines an in-memory DTLS identity store, which generates DTLS
|
||||
// identities.
|
||||
// APIs calls must be made on the signaling thread and the callbacks are also
|
||||
|
@ -468,38 +468,6 @@ class PortAllocatorFactoryInterface : public rtc::RefCountInterface {
|
||||
~PortAllocatorFactoryInterface() {}
|
||||
};
|
||||
|
||||
// TODO(hbos): Remove once cr/1176383004 lands.
|
||||
class DTLSIdentityServiceInterface {
|
||||
public:
|
||||
// Asynchronously request a DTLS identity, including a self-signed certificate
|
||||
// and the private key used to sign the certificate, from the identity store
|
||||
// for the given identity name.
|
||||
// DTLSIdentityRequestObserver::OnSuccess will be called with the identity if
|
||||
// the request succeeded; DTLSIdentityRequestObserver::OnFailure will be
|
||||
// called with an error code if the request failed.
|
||||
//
|
||||
// Only one request can be made at a time. If a second request is called
|
||||
// before the first one completes, RequestIdentity will abort and return
|
||||
// false.
|
||||
//
|
||||
// |identity_name| is an internal name selected by the client to identify an
|
||||
// identity within an origin. E.g. an web site may cache the certificates used
|
||||
// to communicate with differnent peers under different identity names.
|
||||
//
|
||||
// |common_name| is the common name used to generate the certificate. If the
|
||||
// certificate already exists in the store, |common_name| is ignored.
|
||||
//
|
||||
// |observer| is the object to receive success or failure callbacks.
|
||||
//
|
||||
// Returns true if either OnFailure or OnSuccess will be called.
|
||||
virtual bool RequestIdentity(
|
||||
const std::string& identity_name,
|
||||
const std::string& common_name,
|
||||
DTLSIdentityRequestObserver* observer) = 0;
|
||||
|
||||
virtual ~DTLSIdentityServiceInterface() {}
|
||||
};
|
||||
|
||||
// PeerConnectionFactoryInterface is the factory interface use for creating
|
||||
// PeerConnection, MediaStream and media tracks.
|
||||
// PeerConnectionFactoryInterface will create required libjingle threads,
|
||||
@ -535,25 +503,6 @@ class PeerConnectionFactoryInterface : public rtc::RefCountInterface {
|
||||
|
||||
virtual void SetOptions(const Options& options) = 0;
|
||||
|
||||
// TODO(hbos): Temporary CreatePeerConnection function while we transition
|
||||
// from DTLSIdentityServiceInterface to DtlsIdentityStoreInterface.
|
||||
// This method takes the ownership of |dtls_identity_service|.
|
||||
rtc::scoped_refptr<PeerConnectionInterface>
|
||||
CreatePeerConnection(
|
||||
const PeerConnectionInterface::RTCConfiguration& configuration,
|
||||
const MediaConstraintsInterface* constraints,
|
||||
PortAllocatorFactoryInterface* allocator_factory,
|
||||
DTLSIdentityServiceInterface* dtls_identity_service,
|
||||
rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store,
|
||||
PeerConnectionObserver* observer) {
|
||||
if (dtls_identity_service) {
|
||||
// Store used instead of service, our ownership responsibility to delete.
|
||||
delete dtls_identity_service;
|
||||
}
|
||||
return CreatePeerConnection(configuration, constraints, allocator_factory,
|
||||
dtls_identity_store.Pass(), observer);
|
||||
}
|
||||
|
||||
virtual rtc::scoped_refptr<PeerConnectionInterface>
|
||||
CreatePeerConnection(
|
||||
const PeerConnectionInterface::RTCConfiguration& configuration,
|
||||
|
Reference in New Issue
Block a user