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

Side by Side Diff: webrtc/p2p/base/transportcontroller.cc

Issue 2386783002: Add UMA metrics for ICE regathering reasons. (Closed)
Patch Set: Add const to the pooled_sessions method. Created 4 years, 2 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 | « webrtc/p2p/base/transportcontroller.h ('k') | webrtc/p2p/client/basicportallocator.h » ('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 * Copyright 2015 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2015 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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 auto it = FindChannel_n(transport_name, component); 180 auto it = FindChannel_n(transport_name, component);
181 if (it != channels_.end()) { 181 if (it != channels_.end()) {
182 // Channel already exists; increment reference count and return. 182 // Channel already exists; increment reference count and return.
183 it->AddRef(); 183 it->AddRef();
184 return it->get(); 184 return it->get();
185 } 185 }
186 186
187 // Need to create a new channel. 187 // Need to create a new channel.
188 Transport* transport = GetOrCreateTransport_n(transport_name); 188 Transport* transport = GetOrCreateTransport_n(transport_name);
189 TransportChannelImpl* channel = transport->CreateChannel(component); 189 TransportChannelImpl* channel = transport->CreateChannel(component);
190 channel->SetMetricsObserver(metrics_observer_);
190 channel->SignalWritableState.connect( 191 channel->SignalWritableState.connect(
191 this, &TransportController::OnChannelWritableState_n); 192 this, &TransportController::OnChannelWritableState_n);
192 channel->SignalReceivingState.connect( 193 channel->SignalReceivingState.connect(
193 this, &TransportController::OnChannelReceivingState_n); 194 this, &TransportController::OnChannelReceivingState_n);
194 channel->SignalGatheringState.connect( 195 channel->SignalGatheringState.connect(
195 this, &TransportController::OnChannelGatheringState_n); 196 this, &TransportController::OnChannelGatheringState_n);
196 channel->SignalCandidateGathered.connect( 197 channel->SignalCandidateGathered.connect(
197 this, &TransportController::OnChannelCandidateGathered_n); 198 this, &TransportController::OnChannelCandidateGathered_n);
198 channel->SignalCandidatesRemoved.connect( 199 channel->SignalCandidatesRemoved.connect(
199 this, &TransportController::OnChannelCandidatesRemoved_n); 200 this, &TransportController::OnChannelCandidatesRemoved_n);
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
697 signaling_thread_->Post( 698 signaling_thread_->Post(
698 RTC_FROM_HERE, this, MSG_ICEGATHERINGSTATE, 699 RTC_FROM_HERE, this, MSG_ICEGATHERINGSTATE,
699 new rtc::TypedMessageData<IceGatheringState>(new_gathering_state)); 700 new rtc::TypedMessageData<IceGatheringState>(new_gathering_state));
700 } 701 }
701 } 702 }
702 703
703 void TransportController::OnDtlsHandshakeError(rtc::SSLHandshakeError error) { 704 void TransportController::OnDtlsHandshakeError(rtc::SSLHandshakeError error) {
704 SignalDtlsHandshakeError(error); 705 SignalDtlsHandshakeError(error);
705 } 706 }
706 707
708 void TransportController::SetMetricsObserver(
709 webrtc::MetricsObserverInterface* metrics_observer) {
710 metrics_observer_ = metrics_observer;
711 for (auto channel : channels_) {
712 channel->SetMetricsObserver(metrics_observer);
713 }
714 }
715
707 } // namespace cricket 716 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/p2p/base/transportcontroller.h ('k') | webrtc/p2p/client/basicportallocator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698