OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
(...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
727 } | 727 } |
728 if (remote_cert_report_id.get()) { | 728 if (remote_cert_report_id.get()) { |
729 channel_report->AddId(StatsReport::kStatsValueNameRemoteCertificateId, | 729 channel_report->AddId(StatsReport::kStatsValueNameRemoteCertificateId, |
730 remote_cert_report_id); | 730 remote_cert_report_id); |
731 } | 731 } |
732 const std::string& srtp_cipher = channel_iter.srtp_cipher; | 732 const std::string& srtp_cipher = channel_iter.srtp_cipher; |
733 if (!srtp_cipher.empty()) { | 733 if (!srtp_cipher.empty()) { |
734 channel_report->AddString(StatsReport::kStatsValueNameSrtpCipher, | 734 channel_report->AddString(StatsReport::kStatsValueNameSrtpCipher, |
735 srtp_cipher); | 735 srtp_cipher); |
736 } | 736 } |
737 uint16_t ssl_cipher = channel_iter.ssl_cipher; | 737 const std::string& ssl_cipher = channel_iter.ssl_cipher; |
738 if (ssl_cipher && | 738 if (!ssl_cipher.empty()) { |
739 rtc::SSLStreamAdapter::GetSslCipherSuiteName(ssl_cipher).length()) { | 739 channel_report->AddString(StatsReport::kStatsValueNameDtlsCipher, |
740 channel_report->AddString( | 740 ssl_cipher); |
741 StatsReport::kStatsValueNameDtlsCipher, | |
742 rtc::SSLStreamAdapter::GetSslCipherSuiteName(ssl_cipher)); | |
743 } | 741 } |
744 | 742 |
745 int connection_id = 0; | 743 int connection_id = 0; |
746 for (const cricket::ConnectionInfo& info : | 744 for (const cricket::ConnectionInfo& info : |
747 channel_iter.connection_infos) { | 745 channel_iter.connection_infos) { |
748 StatsReport* connection_report = AddConnectionInfoReport( | 746 StatsReport* connection_report = AddConnectionInfoReport( |
749 transport_iter.first, channel_iter.component, connection_id++, | 747 transport_iter.first, channel_iter.component, connection_id++, |
750 channel_report->id(), info); | 748 channel_report->id(), info); |
751 if (info.best_connection) { | 749 if (info.best_connection) { |
752 channel_report->AddId( | 750 channel_report->AddId( |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
935 StatsReport* report = entry.second; | 933 StatsReport* report = entry.second; |
936 report->set_timestamp(stats_gathering_started_); | 934 report->set_timestamp(stats_gathering_started_); |
937 } | 935 } |
938 } | 936 } |
939 | 937 |
940 void StatsCollector::ClearUpdateStatsCacheForTest() { | 938 void StatsCollector::ClearUpdateStatsCacheForTest() { |
941 stats_gathering_started_ = 0; | 939 stats_gathering_started_ = 0; |
942 } | 940 } |
943 | 941 |
944 } // namespace webrtc | 942 } // namespace webrtc |
OLD | NEW |