OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_peer_connection_handler.h" | 5 #include "content/renderer/media/rtc_peer_connection_handler.h" |
6 | 6 |
7 #include <string.h> | 7 #include <string.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
775 | 775 |
776 class PeerConnectionUMAObserver : public webrtc::UMAObserver { | 776 class PeerConnectionUMAObserver : public webrtc::UMAObserver { |
777 public: | 777 public: |
778 PeerConnectionUMAObserver() {} | 778 PeerConnectionUMAObserver() {} |
779 ~PeerConnectionUMAObserver() override {} | 779 ~PeerConnectionUMAObserver() override {} |
780 void IncrementEnumCounter(webrtc::PeerConnectionEnumCounterType counter_type, | 780 void IncrementEnumCounter(webrtc::PeerConnectionEnumCounterType counter_type, |
781 int counter, | 781 int counter, |
782 int counter_max) override { | 782 int counter_max) override { |
783 switch (counter_type) { | 783 switch (counter_type) { |
784 case webrtc::kEnumCounterAddressFamily: | 784 case webrtc::kEnumCounterAddressFamily: |
785 UMA_HISTOGRAM_ENUMERATION("WebRTC.PeerConnection.IPMetrics", counter, | 785 UMA_HISTOGRAM_EXACT_LINEAR("WebRTC.PeerConnection.IPMetrics", counter, |
786 counter_max); | 786 counter_max); |
787 break; | 787 break; |
788 case webrtc::kEnumCounterIceCandidatePairTypeUdp: | 788 case webrtc::kEnumCounterIceCandidatePairTypeUdp: |
789 UMA_HISTOGRAM_ENUMERATION("WebRTC.PeerConnection.CandidatePairType_UDP", | 789 UMA_HISTOGRAM_EXACT_LINEAR( |
790 counter, counter_max); | 790 "WebRTC.PeerConnection.CandidatePairType_UDP", counter, |
| 791 counter_max); |
791 break; | 792 break; |
792 case webrtc::kEnumCounterIceCandidatePairTypeTcp: | 793 case webrtc::kEnumCounterIceCandidatePairTypeTcp: |
793 UMA_HISTOGRAM_ENUMERATION("WebRTC.PeerConnection.CandidatePairType_TCP", | 794 UMA_HISTOGRAM_EXACT_LINEAR( |
794 counter, counter_max); | 795 "WebRTC.PeerConnection.CandidatePairType_TCP", counter, |
| 796 counter_max); |
795 break; | 797 break; |
796 case webrtc::kEnumCounterDtlsHandshakeError: | 798 case webrtc::kEnumCounterDtlsHandshakeError: |
797 UMA_HISTOGRAM_ENUMERATION("WebRTC.PeerConnection.DtlsHandshakeError", | 799 UMA_HISTOGRAM_EXACT_LINEAR("WebRTC.PeerConnection.DtlsHandshakeError", |
798 counter, counter_max); | 800 counter, counter_max); |
799 break; | 801 break; |
800 case webrtc::kEnumCounterIceRestart: | 802 case webrtc::kEnumCounterIceRestart: |
801 UMA_HISTOGRAM_ENUMERATION("WebRTC.PeerConnection.IceRestartState", | 803 UMA_HISTOGRAM_EXACT_LINEAR("WebRTC.PeerConnection.IceRestartState", |
802 counter, counter_max); | 804 counter, counter_max); |
803 break; | 805 break; |
804 case webrtc::kEnumCounterIceRegathering: | 806 case webrtc::kEnumCounterIceRegathering: |
805 UMA_HISTOGRAM_ENUMERATION("WebRTC.PeerConnection.IceRegatheringReason", | 807 UMA_HISTOGRAM_EXACT_LINEAR("WebRTC.PeerConnection.IceRegatheringReason", |
806 counter, counter_max); | 808 counter, counter_max); |
807 break; | 809 break; |
808 default: | 810 default: |
809 // The default clause is expected to reach when new enum types are | 811 // The default clause is expected to reach when new enum types are |
810 // added. | 812 // added. |
811 break; | 813 break; |
812 } | 814 } |
813 } | 815 } |
814 | 816 |
815 void IncrementSparseEnumCounter( | 817 void IncrementSparseEnumCounter( |
816 webrtc::PeerConnectionEnumCounterType counter_type, | 818 webrtc::PeerConnectionEnumCounterType counter_type, |
(...skipping 1268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2085 } | 2087 } |
2086 | 2088 |
2087 void RTCPeerConnectionHandler::ResetUMAStats() { | 2089 void RTCPeerConnectionHandler::ResetUMAStats() { |
2088 DCHECK(thread_checker_.CalledOnValidThread()); | 2090 DCHECK(thread_checker_.CalledOnValidThread()); |
2089 num_local_candidates_ipv6_ = 0; | 2091 num_local_candidates_ipv6_ = 0; |
2090 num_local_candidates_ipv4_ = 0; | 2092 num_local_candidates_ipv4_ = 0; |
2091 ice_connection_checking_start_ = base::TimeTicks(); | 2093 ice_connection_checking_start_ = base::TimeTicks(); |
2092 memset(ice_state_seen_, 0, sizeof(ice_state_seen_)); | 2094 memset(ice_state_seen_, 0, sizeof(ice_state_seen_)); |
2093 } | 2095 } |
2094 } // namespace content | 2096 } // namespace content |
OLD | NEW |