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

Side by Side Diff: content/renderer/media/rtc_certificate_generator.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
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_generator.h" 5 #include "content/renderer/media/rtc_certificate_generator.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 observer->onError(); 144 observer->onError();
145 #endif 145 #endif
146 } 146 }
147 147
148 bool RTCCertificateGenerator::isSupportedKeyParams( 148 bool RTCCertificateGenerator::isSupportedKeyParams(
149 const blink::WebRTCKeyParams& key_params) { 149 const blink::WebRTCKeyParams& key_params) {
150 return WebRTCKeyParamsToKeyParams(key_params).IsValid(); 150 return WebRTCKeyParamsToKeyParams(key_params).IsValid();
151 } 151 }
152 152
153 std::unique_ptr<blink::WebRTCCertificate> RTCCertificateGenerator::fromPEM( 153 std::unique_ptr<blink::WebRTCCertificate> RTCCertificateGenerator::fromPEM(
154 const std::string& pem_private_key, 154 blink::WebString pem_private_key,
155 const std::string& pem_certificate) { 155 blink::WebString pem_certificate) {
156 rtc::scoped_refptr<rtc::RTCCertificate> certificate = 156 rtc::scoped_refptr<rtc::RTCCertificate> certificate =
157 rtc::RTCCertificate::FromPEM( 157 rtc::RTCCertificate::FromPEM(
158 rtc::RTCCertificatePEM(pem_private_key, pem_certificate)); 158 rtc::RTCCertificatePEM(pem_private_key.utf8(),
159 pem_certificate.utf8()));
159 return std::unique_ptr<blink::WebRTCCertificate>( 160 return std::unique_ptr<blink::WebRTCCertificate>(
160 new RTCCertificate(certificate)); 161 new RTCCertificate(certificate));
161 } 162 }
162 163
163 } // namespace content 164 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698