| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/renderer/media/rtc_certificate.h" | 5 #include "content/renderer/media/rtc_certificate.h" |
| 6 | 6 |
| 7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "url/gurl.h" | 8 #include "url/gurl.h" |
| 9 | 9 |
| 10 namespace content { | 10 namespace content { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 std::unique_ptr<blink::WebRTCCertificate> RTCCertificate::shallowCopy() const { | 21 std::unique_ptr<blink::WebRTCCertificate> RTCCertificate::shallowCopy() const { |
| 22 return base::WrapUnique(new RTCCertificate(certificate_)); | 22 return base::WrapUnique(new RTCCertificate(certificate_)); |
| 23 } | 23 } |
| 24 | 24 |
| 25 uint64_t RTCCertificate::expires() const { | 25 uint64_t RTCCertificate::expires() const { |
| 26 return certificate_->Expires(); | 26 return certificate_->Expires(); |
| 27 } | 27 } |
| 28 | 28 |
| 29 blink::WebRTCCertificatePEM RTCCertificate::toPEM() const { | 29 blink::WebRTCCertificatePEM RTCCertificate::toPEM() const { |
| 30 rtc::RTCCertificatePEM pem = certificate_->ToPEM(); | 30 rtc::RTCCertificatePEM pem = certificate_->ToPEM(); |
| 31 return blink::WebRTCCertificatePEM(pem.private_key(), pem.certificate()); | 31 return blink::WebRTCCertificatePEM( |
| 32 blink::WebString::fromUTF8(pem.private_key()), |
| 33 blink::WebString::fromUTF8(pem.certificate())); |
| 32 } | 34 } |
| 33 | 35 |
| 34 bool RTCCertificate::equals(const blink::WebRTCCertificate& other) const { | 36 bool RTCCertificate::equals(const blink::WebRTCCertificate& other) const { |
| 35 return *certificate_ == | 37 return *certificate_ == |
| 36 *static_cast<const RTCCertificate&>(other).certificate_; | 38 *static_cast<const RTCCertificate&>(other).certificate_; |
| 37 } | 39 } |
| 38 | 40 |
| 39 const rtc::scoped_refptr<rtc::RTCCertificate>& | 41 const rtc::scoped_refptr<rtc::RTCCertificate>& |
| 40 RTCCertificate::rtcCertificate() const { | 42 RTCCertificate::rtcCertificate() const { |
| 41 return certificate_; | 43 return certificate_; |
| 42 } | 44 } |
| 43 | 45 |
| 44 } // namespace content | 46 } // namespace content |
| OLD | NEW |