| 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 "content/renderer/media/peer_connection_identity_store.h" | 7 #include "content/renderer/media/peer_connection_identity_store.h" |
| 8 #include "url/gurl.h" | 8 #include "url/gurl.h" |
| 9 | 9 |
| 10 namespace content { | 10 namespace content { |
| 11 | 11 |
| 12 RTCCertificate::RTCCertificate( | 12 RTCCertificate::RTCCertificate( |
| 13 const blink::WebRTCKeyParams& key_params, | 13 const blink::WebRTCKeyParams& key_params, |
| 14 const rtc::scoped_refptr<rtc::RTCCertificate>& certificate) | 14 const rtc::scoped_refptr<rtc::RTCCertificate>& certificate) |
| 15 : key_params_(key_params), certificate_(certificate) { | 15 : key_params_(key_params), certificate_(certificate) { |
| 16 DCHECK(certificate_); | 16 DCHECK(certificate_); |
| 17 } | 17 } |
| 18 | 18 |
| 19 RTCCertificate::~RTCCertificate() { | 19 RTCCertificate::~RTCCertificate() { |
| 20 } | 20 } |
| 21 | 21 |
| 22 RTCCertificate* RTCCertificate::shallowCopy() const { | 22 blink::WebPassOwnPtr<blink::WebRTCCertificate> RTCCertificate::shallowCopy() |
| 23 return new RTCCertificate(key_params_, certificate_); | 23 const { |
| 24 return blink::adoptWebPtr(new RTCCertificate(key_params_, certificate_)); |
| 24 } | 25 } |
| 25 | 26 |
| 26 const blink::WebRTCKeyParams& RTCCertificate::keyParams() const { | 27 const blink::WebRTCKeyParams& RTCCertificate::keyParams() const { |
| 27 return key_params_; | 28 return key_params_; |
| 28 } | 29 } |
| 29 | 30 |
| 30 uint64_t RTCCertificate::expires() const { | 31 uint64_t RTCCertificate::expires() const { |
| 31 return certificate_->Expires(); | 32 return certificate_->Expires(); |
| 32 } | 33 } |
| 33 | 34 |
| 34 const rtc::scoped_refptr<rtc::RTCCertificate>& | 35 const rtc::scoped_refptr<rtc::RTCCertificate>& |
| 35 RTCCertificate::rtcCertificate() const { | 36 RTCCertificate::rtcCertificate() const { |
| 36 return certificate_; | 37 return certificate_; |
| 37 } | 38 } |
| 38 | 39 |
| 39 } // namespace content | 40 } // namespace content |
| OLD | NEW |