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

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

Issue 1335923002: Add RTC_ prefix to (D)CHECKs and related macros. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase. Created 5 years, 3 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
« no previous file with comments | « talk/app/webrtc/test/fakedtlsidentitystore.h ('k') | talk/app/webrtc/webrtcsession_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 728 matching lines...) Expand 10 before | Expand all | Expand 10 after
739 signaling_thread(), 739 signaling_thread(),
740 channel_manager_, 740 channel_manager_,
741 mediastream_signaling_, 741 mediastream_signaling_,
742 this, 742 this,
743 id(), 743 id(),
744 data_channel_type_)); 744 data_channel_type_));
745 } else { 745 } else {
746 // Construct with DTLS enabled. 746 // Construct with DTLS enabled.
747 if (!certificate) { 747 if (!certificate) {
748 // Use the |dtls_identity_store| to generate a certificate. 748 // Use the |dtls_identity_store| to generate a certificate.
749 DCHECK(dtls_identity_store); 749 RTC_DCHECK(dtls_identity_store);
750 webrtc_session_desc_factory_.reset(new WebRtcSessionDescriptionFactory( 750 webrtc_session_desc_factory_.reset(new WebRtcSessionDescriptionFactory(
751 signaling_thread(), 751 signaling_thread(),
752 channel_manager_, 752 channel_manager_,
753 mediastream_signaling_, 753 mediastream_signaling_,
754 dtls_identity_store.Pass(), 754 dtls_identity_store.Pass(),
755 this, 755 this,
756 id(), 756 id(),
757 data_channel_type_)); 757 data_channel_type_));
758 } else { 758 } else {
759 // Use the already generated certificate. 759 // Use the already generated certificate.
(...skipping 1239 matching lines...) Expand 10 before | Expand all | Expand 10 after
1999 transport_proxy = GetTransportProxy(content.name); 1999 transport_proxy = GetTransportProxy(content.name);
2000 2000
2001 return transport_proxy && transport_proxy->local_description_set() && 2001 return transport_proxy && transport_proxy->local_description_set() &&
2002 transport_proxy->remote_description_set(); 2002 transport_proxy->remote_description_set();
2003 } 2003 }
2004 2004
2005 // Walk through the ConnectionInfos to gather best connection usage 2005 // Walk through the ConnectionInfos to gather best connection usage
2006 // for IPv4 and IPv6. 2006 // for IPv4 and IPv6.
2007 void WebRtcSession::ReportBestConnectionState( 2007 void WebRtcSession::ReportBestConnectionState(
2008 const cricket::TransportStats& stats) { 2008 const cricket::TransportStats& stats) {
2009 DCHECK(metrics_observer_ != NULL); 2009 RTC_DCHECK(metrics_observer_ != NULL);
2010 for (cricket::TransportChannelStatsList::const_iterator it = 2010 for (cricket::TransportChannelStatsList::const_iterator it =
2011 stats.channel_stats.begin(); 2011 stats.channel_stats.begin();
2012 it != stats.channel_stats.end(); ++it) { 2012 it != stats.channel_stats.end(); ++it) {
2013 for (cricket::ConnectionInfos::const_iterator it_info = 2013 for (cricket::ConnectionInfos::const_iterator it_info =
2014 it->connection_infos.begin(); 2014 it->connection_infos.begin();
2015 it_info != it->connection_infos.end(); ++it_info) { 2015 it_info != it->connection_infos.end(); ++it_info) {
2016 if (!it_info->best_connection) { 2016 if (!it_info->best_connection) {
2017 continue; 2017 continue;
2018 } 2018 }
2019 2019
2020 PeerConnectionEnumCounterType type = kPeerConnectionEnumCounterMax; 2020 PeerConnectionEnumCounterType type = kPeerConnectionEnumCounterMax;
2021 const cricket::Candidate& local = it_info->local_candidate; 2021 const cricket::Candidate& local = it_info->local_candidate;
2022 const cricket::Candidate& remote = it_info->remote_candidate; 2022 const cricket::Candidate& remote = it_info->remote_candidate;
2023 2023
2024 // Increment the counter for IceCandidatePairType. 2024 // Increment the counter for IceCandidatePairType.
2025 if (local.protocol() == cricket::TCP_PROTOCOL_NAME || 2025 if (local.protocol() == cricket::TCP_PROTOCOL_NAME ||
2026 (local.type() == RELAY_PORT_TYPE && 2026 (local.type() == RELAY_PORT_TYPE &&
2027 local.relay_protocol() == cricket::TCP_PROTOCOL_NAME)) { 2027 local.relay_protocol() == cricket::TCP_PROTOCOL_NAME)) {
2028 type = kEnumCounterIceCandidatePairTypeTcp; 2028 type = kEnumCounterIceCandidatePairTypeTcp;
2029 } else if (local.protocol() == cricket::UDP_PROTOCOL_NAME) { 2029 } else if (local.protocol() == cricket::UDP_PROTOCOL_NAME) {
2030 type = kEnumCounterIceCandidatePairTypeUdp; 2030 type = kEnumCounterIceCandidatePairTypeUdp;
2031 } else { 2031 } else {
2032 CHECK(0); 2032 RTC_CHECK(0);
2033 } 2033 }
2034 metrics_observer_->IncrementEnumCounter( 2034 metrics_observer_->IncrementEnumCounter(
2035 type, GetIceCandidatePairCounter(local, remote), 2035 type, GetIceCandidatePairCounter(local, remote),
2036 kIceCandidatePairMax); 2036 kIceCandidatePairMax);
2037 2037
2038 // Increment the counter for IP type. 2038 // Increment the counter for IP type.
2039 if (local.address().family() == AF_INET) { 2039 if (local.address().family() == AF_INET) {
2040 metrics_observer_->IncrementEnumCounter( 2040 metrics_observer_->IncrementEnumCounter(
2041 kEnumCounterAddressFamily, kBestConnections_IPv4, 2041 kEnumCounterAddressFamily, kBestConnections_IPv4,
2042 kPeerConnectionAddressFamilyCounter_Max); 2042 kPeerConnectionAddressFamilyCounter_Max);
2043 2043
2044 } else if (local.address().family() == AF_INET6) { 2044 } else if (local.address().family() == AF_INET6) {
2045 metrics_observer_->IncrementEnumCounter( 2045 metrics_observer_->IncrementEnumCounter(
2046 kEnumCounterAddressFamily, kBestConnections_IPv6, 2046 kEnumCounterAddressFamily, kBestConnections_IPv6,
2047 kPeerConnectionAddressFamilyCounter_Max); 2047 kPeerConnectionAddressFamilyCounter_Max);
2048 } else { 2048 } else {
2049 CHECK(0); 2049 RTC_CHECK(0);
2050 } 2050 }
2051 2051
2052 return; 2052 return;
2053 } 2053 }
2054 } 2054 }
2055 } 2055 }
2056 2056
2057 void WebRtcSession::ReportNegotiatedCiphers( 2057 void WebRtcSession::ReportNegotiatedCiphers(
2058 const cricket::TransportStats& stats) { 2058 const cricket::TransportStats& stats) {
2059 DCHECK(metrics_observer_ != NULL); 2059 RTC_DCHECK(metrics_observer_ != NULL);
2060 if (!dtls_enabled_ || stats.channel_stats.empty()) { 2060 if (!dtls_enabled_ || stats.channel_stats.empty()) {
2061 return; 2061 return;
2062 } 2062 }
2063 2063
2064 const std::string& srtp_cipher = stats.channel_stats[0].srtp_cipher; 2064 const std::string& srtp_cipher = stats.channel_stats[0].srtp_cipher;
2065 const std::string& ssl_cipher = stats.channel_stats[0].ssl_cipher; 2065 const std::string& ssl_cipher = stats.channel_stats[0].ssl_cipher;
2066 if (srtp_cipher.empty() && ssl_cipher.empty()) { 2066 if (srtp_cipher.empty() && ssl_cipher.empty()) {
2067 return; 2067 return;
2068 } 2068 }
2069 2069
(...skipping 15 matching lines...) Expand all
2085 2085
2086 if (!srtp_cipher.empty()) { 2086 if (!srtp_cipher.empty()) {
2087 metrics_observer_->AddHistogramSample(srtp_name, srtp_cipher); 2087 metrics_observer_->AddHistogramSample(srtp_name, srtp_cipher);
2088 } 2088 }
2089 if (!ssl_cipher.empty()) { 2089 if (!ssl_cipher.empty()) {
2090 metrics_observer_->AddHistogramSample(ssl_name, ssl_cipher); 2090 metrics_observer_->AddHistogramSample(ssl_name, ssl_cipher);
2091 } 2091 }
2092 } 2092 }
2093 2093
2094 } // namespace webrtc 2094 } // namespace webrtc
OLDNEW
« no previous file with comments | « talk/app/webrtc/test/fakedtlsidentitystore.h ('k') | talk/app/webrtc/webrtcsession_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698