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

Side by Side Diff: webrtc/media/sctp/sctptransport.cc

Issue 2606123002: Remove the dependency of TransportChannel and TransportChannelImpl. (Closed)
Patch Set: Revert the change of stun_unittests Created 3 years, 11 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 (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 << "SendThresholdCallback: Failed to get transport for socket " 377 << "SendThresholdCallback: Failed to get transport for socket "
378 << sock; 378 << sock;
379 return 0; 379 return 0;
380 } 380 }
381 transport->OnSendThresholdCallback(); 381 transport->OnSendThresholdCallback();
382 return 0; 382 return 0;
383 } 383 }
384 }; 384 };
385 385
386 SctpTransport::SctpTransport(rtc::Thread* network_thread, 386 SctpTransport::SctpTransport(rtc::Thread* network_thread,
387 TransportChannel* channel) 387 DtlsTransportInternal* channel)
388 : network_thread_(network_thread), 388 : network_thread_(network_thread),
389 transport_channel_(channel), 389 transport_channel_(channel),
390 was_ever_writable_(channel->writable()) { 390 was_ever_writable_(channel->writable()) {
391 RTC_DCHECK(network_thread_); 391 RTC_DCHECK(network_thread_);
392 RTC_DCHECK(transport_channel_); 392 RTC_DCHECK(transport_channel_);
393 RTC_DCHECK_RUN_ON(network_thread_); 393 RTC_DCHECK_RUN_ON(network_thread_);
394 ConnectTransportChannelSignals(); 394 ConnectTransportChannelSignals();
395 } 395 }
396 396
397 SctpTransport::~SctpTransport() { 397 SctpTransport::~SctpTransport() {
398 // Close abruptly; no reset procedure. 398 // Close abruptly; no reset procedure.
399 CloseSctpSocket(); 399 CloseSctpSocket();
400 } 400 }
401 401
402 void SctpTransport::SetTransportChannel(cricket::TransportChannel* channel) { 402 void SctpTransport::SetTransportChannel(
403 cricket::DtlsTransportInternal* channel) {
403 RTC_DCHECK_RUN_ON(network_thread_); 404 RTC_DCHECK_RUN_ON(network_thread_);
404 RTC_DCHECK(channel); 405 RTC_DCHECK(channel);
405 DisconnectTransportChannelSignals(); 406 DisconnectTransportChannelSignals();
406 transport_channel_ = channel; 407 transport_channel_ = channel;
407 ConnectTransportChannelSignals(); 408 ConnectTransportChannelSignals();
408 if (!was_ever_writable_ && channel->writable()) { 409 if (!was_ever_writable_ && channel->writable()) {
409 was_ever_writable_ = true; 410 was_ever_writable_ = true;
410 // New channel is writable, now we can start the SCTP connection if Start 411 // New channel is writable, now we can start the SCTP connection if Start
411 // was called already. 412 // was called already.
412 if (started_) { 413 if (started_) {
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after
1081 } 1082 }
1082 } 1083 }
1083 } 1084 }
1084 1085
1085 // Always try to send the queued RESET because this call indicates that the 1086 // Always try to send the queued RESET because this call indicates that the
1086 // last local RESET or remote RESET has made some progress. 1087 // last local RESET or remote RESET has made some progress.
1087 SendQueuedStreamResets(); 1088 SendQueuedStreamResets();
1088 } 1089 }
1089 1090
1090 } // namespace cricket 1091 } // namespace cricket
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698