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

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

Issue 2416023002: Introduce rtc::PacketTransportInterface and let cricket::TransportChannel inherit. (Closed)
Patch Set: Rebase. 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
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 547 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 TransportStats* stats) { 558 TransportStats* stats) {
559 RTC_DCHECK(network_thread_->IsCurrent()); 559 RTC_DCHECK(network_thread_->IsCurrent());
560 560
561 Transport* transport = GetTransport_n(transport_name); 561 Transport* transport = GetTransport_n(transport_name);
562 if (!transport) { 562 if (!transport) {
563 return false; 563 return false;
564 } 564 }
565 return transport->GetStats(stats); 565 return transport->GetStats(stats);
566 } 566 }
567 567
568 void TransportController::OnChannelWritableState_n(TransportChannel* channel) { 568 void TransportController::OnChannelWritableState_n(
569 rtc::PacketTransportInterface* transport) {
569 RTC_DCHECK(network_thread_->IsCurrent()); 570 RTC_DCHECK(network_thread_->IsCurrent());
570 LOG(LS_INFO) << channel->transport_name() << " TransportChannel " 571 LOG(LS_INFO) << " TransportChannel " << transport->debug_name()
571 << channel->component() << " writability changed to " 572 << " writability changed to " << transport->writable() << ".";
572 << channel->writable() << ".";
573 UpdateAggregateStates_n(); 573 UpdateAggregateStates_n();
574 } 574 }
575 575
576 void TransportController::OnChannelReceivingState_n(TransportChannel* channel) { 576 void TransportController::OnChannelReceivingState_n(TransportChannel* channel) {
577 RTC_DCHECK(network_thread_->IsCurrent()); 577 RTC_DCHECK(network_thread_->IsCurrent());
578 UpdateAggregateStates_n(); 578 UpdateAggregateStates_n();
579 } 579 }
580 580
581 void TransportController::OnChannelGatheringState_n( 581 void TransportController::OnChannelGatheringState_n(
582 TransportChannelImpl* channel) { 582 TransportChannelImpl* channel) {
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
707 707
708 void TransportController::SetMetricsObserver( 708 void TransportController::SetMetricsObserver(
709 webrtc::MetricsObserverInterface* metrics_observer) { 709 webrtc::MetricsObserverInterface* metrics_observer) {
710 metrics_observer_ = metrics_observer; 710 metrics_observer_ = metrics_observer;
711 for (auto channel : channels_) { 711 for (auto channel : channels_) {
712 channel->SetMetricsObserver(metrics_observer); 712 channel->SetMetricsObserver(metrics_observer);
713 } 713 }
714 } 714 }
715 715
716 } // namespace cricket 716 } // namespace cricket
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698