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

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

Issue 1373023002: RTCCertificate, RTCPeerConnection.generateCertificate (WebRTC JavaScript) added. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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.cc
diff --git a/content/renderer/media/rtc_certificate.cc b/content/renderer/media/rtc_certificate.cc
new file mode 100644
index 0000000000000000000000000000000000000000..1ef3072ee0589629b2df446b478ba6963f226e90
--- /dev/null
+++ b/content/renderer/media/rtc_certificate.cc
@@ -0,0 +1,39 @@
+// Copyright (c) 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "content/renderer/media/rtc_certificate.h"
+
+#include "content/renderer/media/peer_connection_identity_store.h"
+#include "url/gurl.h"
+
+namespace content {
+
+RTCCertificate::RTCCertificate(
+ const blink::WebRTCKeyType& key_type,
+ const rtc::scoped_refptr<rtc::RTCCertificate>& certificate)
+ : key_type_(key_type), certificate_(certificate) {
+ DCHECK(certificate_);
+}
+
+RTCCertificate::~RTCCertificate() {
+}
+
+RTCCertificate* RTCCertificate::shallowCopy() const {
+ return new RTCCertificate(key_type_, certificate_);
+}
+
+const blink::WebRTCKeyType& RTCCertificate::keyType() const {
+ return key_type_;
+}
+
+double RTCCertificate::expires() const {
+ return static_cast<double>(certificate_->expires_timestamp_ns());
+}
+
+const rtc::scoped_refptr<rtc::RTCCertificate>*
+RTCCertificate::rtcCertificate() const {
+ return &certificate_;
+}
+
+} // namespace content

Powered by Google App Engine
This is Rietveld 408576698