Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(36)

Unified Diff: content/renderer/media/rtc_certificate_generator.cc

Issue 1949033002: Ability to persist RTCCertificate in IndexedDB (enables cloning). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/renderer/media/rtc_certificate_generator.cc
diff --git a/content/renderer/media/rtc_certificate_generator.cc b/content/renderer/media/rtc_certificate_generator.cc
index 5344feda4a87478be93fe06c585f7a3f85c4cf9f..94b94fb1c899520cd8520b5bde5b9b1c9ebc4e6a 100644
--- a/content/renderer/media/rtc_certificate_generator.cc
+++ b/content/renderer/media/rtc_certificate_generator.cc
@@ -115,7 +115,7 @@ class RTCCertificateIdentityObserver
FROM_HERE,
base::Bind(&RTCCertificateIdentityObserver::DoCallbackOnMainThread,
this, base::Passed(base::WrapUnique(
- new RTCCertificate(key_params_, certificate)))));
+ new RTCCertificate(certificate)))));
}
void DoCallbackOnMainThread(
@@ -197,4 +197,14 @@ bool RTCCertificateGenerator::isSupportedKeyParams(
return WebRTCKeyParamsToKeyParams(key_params).IsValid();
}
+std::unique_ptr<blink::WebRTCCertificate> RTCCertificateGenerator::fromPEM(
+ const std::string& pem_private_key,
+ const std::string& pem_certificate) {
+ rtc::scoped_refptr<rtc::RTCCertificate> certificate =
+ rtc::RTCCertificate::FromPEM(
+ rtc::RTCCertificatePEM(pem_private_key, pem_certificate));
+ return std::unique_ptr<blink::WebRTCCertificate>(
+ new RTCCertificate(certificate));
+}
+
} // namespace content
« no previous file with comments | « content/renderer/media/rtc_certificate_generator.h ('k') | third_party/WebKit/Source/bindings/core/v8/SerializationTag.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698