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

Unified Diff: webrtc/api/webrtcsession.cc

Issue 1975453002: Add PeerConnection IsClosed check. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Change the webrtcsession constructor. Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/api/webrtcsession.cc
diff --git a/webrtc/api/webrtcsession.cc b/webrtc/api/webrtcsession.cc
index b9a3fc8453389dc040a28f51a47d0a4649e0eb49..df3364fb84ca5d303a873eb2b89f3c57c3c0b816 100644
--- a/webrtc/api/webrtcsession.cc
+++ b/webrtc/api/webrtcsession.cc
@@ -457,16 +457,14 @@ WebRtcSession::WebRtcSession(webrtc::MediaControllerInterface* media_controller,
rtc::Thread* network_thread,
rtc::Thread* worker_thread,
rtc::Thread* signaling_thread,
- cricket::PortAllocator* port_allocator)
+ cricket::PortAllocator* port_allocator,
+ cricket::TransportController* transport_controller)
: worker_thread_(worker_thread),
signaling_thread_(signaling_thread),
// RFC 3264: The numeric value of the session id and version in the
// o line MUST be representable with a "64 bit signed integer".
// Due to this constraint session id |sid_| is max limited to LLONG_MAX.
sid_(rtc::ToString(rtc::CreateRandomId64() & LLONG_MAX)),
- transport_controller_(new cricket::TransportController(signaling_thread,
- network_thread,
- port_allocator)),
media_controller_(media_controller),
channel_manager_(media_controller_->channel_manager()),
ice_observer_(NULL),
@@ -476,6 +474,7 @@ WebRtcSession::WebRtcSession(webrtc::MediaControllerInterface* media_controller,
dtls_enabled_(false),
data_channel_type_(cricket::DCT_NONE),
metrics_observer_(NULL) {
+ transport_controller_.reset(transport_controller);
honghaiz3 2016/06/23 18:36:02 Could this be assigned in the argument list above?
Taylor Brandstetter 2016/06/23 19:42:17 Agreed. Also, it would be slightly better if the a
Zhi Huang 2016/07/11 21:41:20 Done.
transport_controller_->SetIceRole(cricket::ICEROLE_CONTROLLED);
transport_controller_->SignalConnectionState.connect(
this, &WebRtcSession::OnTransportControllerConnectionState);

Powered by Google App Engine
This is Rietveld 408576698