Skip to content

Commit

Permalink
Switch RTCCertificateGenerator away from WebString
Browse files Browse the repository at this point in the history
... and use WTF::String instead now that RTCCertificateGenerator
resides solely in blink/renderer.

BUG=787254
R=guidou@chromium.org, haraken@chromium.org

Change-Id: Ie87bdada35e05a868763b52ffc2ae8778c0e355f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1882130
Commit-Queue: Antonio Gomes <tonikitoo@igalia.com>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Guido Urdaneta <guidou@chromium.org>
Cr-Commit-Position: refs/heads/master@{#712033}
  • Loading branch information
tonikitoo authored and Commit Bot committed Nov 3, 2019
1 parent 248d7dd commit 0f17c8e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ bool RTCCertificateGenerator::IsSupportedKeyParams(
}

rtc::scoped_refptr<rtc::RTCCertificate> RTCCertificateGenerator::FromPEM(
blink::WebString pem_private_key,
blink::WebString pem_certificate) {
String pem_private_key,
String pem_certificate) {
rtc::scoped_refptr<rtc::RTCCertificate> certificate =
rtc::RTCCertificate::FromPEM(rtc::RTCCertificatePEM(
pem_private_key.Utf8(), pem_certificate.Utf8()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

#include "base/macros.h"
#include "third_party/blink/public/platform/web_rtc_key_params.h"
#include "third_party/blink/public/platform/web_string.h"
#include "third_party/blink/renderer/modules/modules_export.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
#include "third_party/webrtc/api/peer_connection_interface.h"

namespace base {
Expand All @@ -25,8 +25,6 @@ using RTCCertificateCallback =
// Chromium's WebRTCCertificateGenerator implementation; uses the
// PeerConnectionIdentityStore/SSLIdentity::Generate to generate the identity,
// rtc::RTCCertificate and blink::RTCCertificate.
//
// TODO(crbug.com/787254): Convert use of WebString to WTF::String.
class MODULES_EXPORT RTCCertificateGenerator {
public:
RTCCertificateGenerator() {}
Expand All @@ -52,9 +50,8 @@ class MODULES_EXPORT RTCCertificateGenerator {

// Creates a certificate from the PEM strings. See also
// |rtc::RTCCertificate::ToPEM|.
rtc::scoped_refptr<rtc::RTCCertificate> FromPEM(
blink::WebString pem_private_key,
blink::WebString pem_certificate);
rtc::scoped_refptr<rtc::RTCCertificate> FromPEM(String pem_private_key,
String pem_certificate);

private:
DISALLOW_COPY_AND_ASSIGN(RTCCertificateGenerator);
Expand Down

0 comments on commit 0f17c8e

Please sign in to comment.