From 3b7c7935749a955996575e11e718603e4c8cd3a6 Mon Sep 17 00:00:00 2001 From: hbos Date: Wed, 21 Oct 2015 01:44:21 -0700 Subject: [PATCH] New DtlsIdentityStoreInterface::RequestIdentity added that takes rtc::KeyParams. The old RequestIdentity still exists that take rtc::KeyType. Default implementation added that invokes the other RequestIdentity method, adding default parameters or dropping the parameters. This CL is in preparation for removing the RequestIdentity that takes rtc::KeyType, necessary as to not break Chromium. BUG=webrtc:4927, 528250 Review URL: https://codereview.webrtc.org/1414243003 Cr-Commit-Position: refs/heads/master@{#10351} --- talk/app/webrtc/dtlsidentitystore.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/talk/app/webrtc/dtlsidentitystore.h b/talk/app/webrtc/dtlsidentitystore.h index 3d4a078f0c..a0eef98e1b 100644 --- a/talk/app/webrtc/dtlsidentitystore.h +++ b/talk/app/webrtc/dtlsidentitystore.h @@ -72,9 +72,24 @@ class DtlsIdentityStoreInterface { // The |observer| will be called when the requested identity is ready, or when // identity generation fails. + // TODO(torbjorng,hbos): The following RequestIdentity is about to be removed, + // see below todo. virtual void RequestIdentity( rtc::KeyType key_type, - const rtc::scoped_refptr& observer) = 0; + const rtc::scoped_refptr& observer) { + // Add default parameterization. + RequestIdentity(rtc::KeyParams(key_type), observer); + } + // TODO(torbjorng,hbos): Parameterized key types! The following + // RequestIdentity should replace the old one that takes rtc::KeyType. When + // the new one is implemented by Chromium and WebRTC the old one should be + // removed. crbug.com/544902, webrtc:5092. + virtual void RequestIdentity( + rtc::KeyParams key_params, + const rtc::scoped_refptr& observer) { + // Drop parameterization. + RequestIdentity(key_params.type(), observer); + } }; // The WebRTC default implementation of DtlsIdentityStoreInterface.