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: third_party/WebKit/Source/modules/peerconnection/RTCCertificate.cpp

Issue 2828563002: RTCCertificate.getFingerprints added (exposed to the web) (Closed)
Patch Set: Rebase Created 3 years, 6 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: third_party/WebKit/Source/modules/peerconnection/RTCCertificate.cpp
diff --git a/third_party/WebKit/Source/modules/peerconnection/RTCCertificate.cpp b/third_party/WebKit/Source/modules/peerconnection/RTCCertificate.cpp
index 25da97fef72217f7da1500badf620efa35702f33..3b7b392ae2b456bffb732407aa8e7ee0fa028c3c 100644
--- a/third_party/WebKit/Source/modules/peerconnection/RTCCertificate.cpp
+++ b/third_party/WebKit/Source/modules/peerconnection/RTCCertificate.cpp
@@ -30,6 +30,8 @@
#include "modules/peerconnection/RTCCertificate.h"
+#include "platform/bindings/ToV8.h"
+#include "platform/bindings/V8Binding.h"
#include "platform/wtf/PtrUtil.h"
namespace blink {
@@ -46,4 +48,18 @@ DOMTimeStamp RTCCertificate::expires() const {
return static_cast<DOMTimeStamp>(certificate_->Expires());
}
+HeapVector<RTCDtlsFingerprint> RTCCertificate::getFingerprints() {
+ WebVector<WebRTCDtlsFingerprint> web_fingerprints =
+ certificate_->GetFingerprints();
+ DCHECK(!web_fingerprints.IsEmpty());
+ HeapVector<RTCDtlsFingerprint> fingerprints(web_fingerprints.size());
+ for (size_t i = 0; i < fingerprints.size(); ++i) {
+ DCHECK(!web_fingerprints[i].Algorithm().IsEmpty());
+ DCHECK(!web_fingerprints[i].Value().IsEmpty());
+ fingerprints[i].setAlgorithm(web_fingerprints[i].Algorithm());
+ fingerprints[i].setValue(web_fingerprints[i].Value());
+ }
+ return fingerprints;
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698