| 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_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 Loading... |
| 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 |
| OLD | NEW |