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

Side by Side Diff: talk/app/webrtc/statscollector.cc

Issue 1416673006: Convert internal representation of Srtp cryptos from string to int. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Add back an old function name to prevent build break in chromium. Created 5 years, 1 month 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 /* 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 712 matching lines...) Expand 10 before | Expand all | Expand 10 after
723 channel_report->AddInt(StatsReport::kStatsValueNameComponent, 723 channel_report->AddInt(StatsReport::kStatsValueNameComponent,
724 channel_iter.component); 724 channel_iter.component);
725 if (local_cert_report_id.get()) { 725 if (local_cert_report_id.get()) {
726 channel_report->AddId(StatsReport::kStatsValueNameLocalCertificateId, 726 channel_report->AddId(StatsReport::kStatsValueNameLocalCertificateId,
727 local_cert_report_id); 727 local_cert_report_id);
728 } 728 }
729 if (remote_cert_report_id.get()) { 729 if (remote_cert_report_id.get()) {
730 channel_report->AddId(StatsReport::kStatsValueNameRemoteCertificateId, 730 channel_report->AddId(StatsReport::kStatsValueNameRemoteCertificateId,
731 remote_cert_report_id); 731 remote_cert_report_id);
732 } 732 }
733 const std::string& srtp_cipher = channel_iter.srtp_cipher; 733 int srtp_cipher = channel_iter.srtp_cipher;
pthatcher1 2015/11/11 19:59:40 Should we rename srtp_chiper to srtp_crypto_suite?
guoweis_webrtc 2015/11/17 01:21:15 Done.
734 if (!srtp_cipher.empty()) { 734 if (srtp_cipher && rtc::SrtpCryptoSuiteToName(srtp_cipher).length()) {
735 channel_report->AddString(StatsReport::kStatsValueNameSrtpCipher, 735 channel_report->AddString(StatsReport::kStatsValueNameSrtpCipher,
736 srtp_cipher); 736 rtc::SrtpCryptoSuiteToName(srtp_cipher));
737 } 737 }
738 int ssl_cipher = channel_iter.ssl_cipher; 738 int ssl_cipher = channel_iter.ssl_cipher;
pthatcher1 2015/11/11 19:59:40 And should we rename ssl_cipher to ssl_cipher_suit
guoweis_webrtc 2015/11/17 01:21:15 Done.
739 if (ssl_cipher && 739 if (ssl_cipher &&
740 rtc::SSLStreamAdapter::GetSslCipherSuiteName(ssl_cipher).length()) { 740 rtc::SSLStreamAdapter::SslCipherSuiteToName(ssl_cipher).length()) {
741 channel_report->AddString( 741 channel_report->AddString(
742 StatsReport::kStatsValueNameDtlsCipher, 742 StatsReport::kStatsValueNameDtlsCipher,
743 rtc::SSLStreamAdapter::GetSslCipherSuiteName(ssl_cipher)); 743 rtc::SSLStreamAdapter::SslCipherSuiteToName(ssl_cipher));
744 } 744 }
745 745
746 int connection_id = 0; 746 int connection_id = 0;
747 for (const cricket::ConnectionInfo& info : 747 for (const cricket::ConnectionInfo& info :
748 channel_iter.connection_infos) { 748 channel_iter.connection_infos) {
749 StatsReport* connection_report = AddConnectionInfoReport( 749 StatsReport* connection_report = AddConnectionInfoReport(
750 transport_iter.first, channel_iter.component, connection_id++, 750 transport_iter.first, channel_iter.component, connection_id++,
751 channel_report->id(), info); 751 channel_report->id(), info);
752 if (info.best_connection) { 752 if (info.best_connection) {
753 channel_report->AddId( 753 channel_report->AddId(
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
936 StatsReport* report = entry.second; 936 StatsReport* report = entry.second;
937 report->set_timestamp(stats_gathering_started_); 937 report->set_timestamp(stats_gathering_started_);
938 } 938 }
939 } 939 }
940 940
941 void StatsCollector::ClearUpdateStatsCacheForTest() { 941 void StatsCollector::ClearUpdateStatsCacheForTest() {
942 stats_gathering_started_ = 0; 942 stats_gathering_started_ = 0;
943 } 943 }
944 944
945 } // namespace webrtc 945 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698