OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
696 // | 696 // |
697 StatsReport::Id local_cert_report_id, remote_cert_report_id; | 697 StatsReport::Id local_cert_report_id, remote_cert_report_id; |
698 rtc::scoped_refptr<rtc::RTCCertificate> certificate; | 698 rtc::scoped_refptr<rtc::RTCCertificate> certificate; |
699 if (pc_->session()->GetLocalCertificate( | 699 if (pc_->session()->GetLocalCertificate( |
700 transport_iter.second.transport_name, &certificate)) { | 700 transport_iter.second.transport_name, &certificate)) { |
701 StatsReport* r = AddCertificateReports(&(certificate->ssl_certificate())); | 701 StatsReport* r = AddCertificateReports(&(certificate->ssl_certificate())); |
702 if (r) | 702 if (r) |
703 local_cert_report_id = r->id(); | 703 local_cert_report_id = r->id(); |
704 } | 704 } |
705 | 705 |
706 rtc::scoped_ptr<rtc::SSLCertificate> cert; | 706 rtc::scoped_ptr<rtc::SSLCertificate> cert = |
707 if (pc_->session()->GetRemoteSSLCertificate( | 707 pc_->session()->GetRemoteSSLCertificate( |
708 transport_iter.second.transport_name, cert.accept())) { | 708 transport_iter.second.transport_name); |
| 709 if (cert) { |
709 StatsReport* r = AddCertificateReports(cert.get()); | 710 StatsReport* r = AddCertificateReports(cert.get()); |
710 if (r) | 711 if (r) |
711 remote_cert_report_id = r->id(); | 712 remote_cert_report_id = r->id(); |
712 } | 713 } |
713 | 714 |
714 for (const auto& channel_iter : transport_iter.second.channel_stats) { | 715 for (const auto& channel_iter : transport_iter.second.channel_stats) { |
715 StatsReport::Id id(StatsReport::NewComponentId( | 716 StatsReport::Id id(StatsReport::NewComponentId( |
716 transport_iter.second.transport_name, channel_iter.component)); | 717 transport_iter.second.transport_name, channel_iter.component)); |
717 StatsReport* channel_report = reports_.ReplaceOrAddNew(id); | 718 StatsReport* channel_report = reports_.ReplaceOrAddNew(id); |
718 channel_report->set_timestamp(stats_gathering_started_); | 719 channel_report->set_timestamp(stats_gathering_started_); |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
938 StatsReport* report = entry.second; | 939 StatsReport* report = entry.second; |
939 report->set_timestamp(stats_gathering_started_); | 940 report->set_timestamp(stats_gathering_started_); |
940 } | 941 } |
941 } | 942 } |
942 | 943 |
943 void StatsCollector::ClearUpdateStatsCacheForTest() { | 944 void StatsCollector::ClearUpdateStatsCacheForTest() { |
944 stats_gathering_started_ = 0; | 945 stats_gathering_started_ = 0; |
945 } | 946 } |
946 | 947 |
947 } // namespace webrtc | 948 } // namespace webrtc |
OLD | NEW |