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

Unified Diff: webrtc/p2p/base/transportcontroller.cc

Issue 2614263002: Remove BaseChannel's dependency on TransportController. (Closed)
Patch Set: cr comments 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/p2p/base/transportcontroller.cc
diff --git a/webrtc/p2p/base/transportcontroller.cc b/webrtc/p2p/base/transportcontroller.cc
index c9ba9fdb3cfd579e575ad9c985b5d4260495771e..e0deec61569a13ce506d6646a476aa2221273323 100644
--- a/webrtc/p2p/base/transportcontroller.cc
+++ b/webrtc/p2p/base/transportcontroller.cc
@@ -227,6 +227,14 @@ void TransportController::SetMetricsObserver(
metrics_observer));
}
+TransportChannel* TransportController::CreateTransportChannel(
+ const std::string& transport_name,
+ int component) {
+ return network_thread_->Invoke<TransportChannel*>(
+ RTC_FROM_HERE, rtc::Bind(&TransportController::CreateTransportChannel_n,
+ this, transport_name, component));
+}
+
TransportChannel* TransportController::CreateTransportChannel_n(
const std::string& transport_name,
int component) {
@@ -292,7 +300,6 @@ void TransportController::DestroyTransportChannel_n(
const std::string& transport_name,
int component) {
RTC_DCHECK(network_thread_->IsCurrent());
-
auto it = GetChannelIterator_n(transport_name, component);
if (it == channels_.end()) {
LOG(LS_WARNING) << "Attempting to delete " << transport_name
@@ -313,7 +320,6 @@ void TransportController::DestroyTransportChannel_n(
if (!t->HasChannels()) {
transports_.erase(transport_name);
}
-
// Removing a channel could cause aggregate state to change.
UpdateAggregateStates_n();
}

Powered by Google App Engine
This is Rietveld 408576698