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

Side by Side Diff: content/renderer/media/rtc_certificate.cc

Issue 2147413002: WebRTCCertificateGenerator should not use std::string. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | content/renderer/media/rtc_certificate_generator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/rtc_certificate_generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698