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

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

Issue 1351673003: Replace readable with receiving where receiving means receiving anything (stun ping, response or da… (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Resync, rebase, and address comments. Created 5 years, 3 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/transport.cc
diff --git a/webrtc/p2p/base/transport.cc b/webrtc/p2p/base/transport.cc
index e3e6ca0c0888d8f66226a8bd197807c8ab7ee077..c96ddc724532eb90cadff2990f9423f6c5846ced 100644
--- a/webrtc/p2p/base/transport.cc
+++ b/webrtc/p2p/base/transport.cc
@@ -240,7 +240,6 @@ TransportChannelImpl* Transport::CreateChannel(int component) {
if (local_description_ && remote_description_)
ApplyNegotiatedTransportDescription(impl, NULL);
- impl->SignalReadableState.connect(this, &Transport::OnChannelReadableState);
impl->SignalWritableState.connect(this, &Transport::OnChannelWritableState);
impl->SignalReceivingState.connect(this, &Transport::OnChannelReceivingState);
impl->SignalGatheringState.connect(this, &Transport::OnChannelGatheringState);
@@ -293,7 +292,6 @@ void Transport::DestroyChannel(int component) {
DestroyTransportChannel(impl);
// Need to update aggregate state after destroying a channel,
// for example if it was the only one that wasn't yet writable.
- UpdateReadableState();
UpdateWritableState();
UpdateReceivingState();
UpdateGatheringState();
@@ -431,10 +429,6 @@ bool Transport::AddRemoteCandidates(const std::vector<Candidate>& candidates,
return true;
}
-void Transport::OnChannelReadableState(TransportChannel* channel) {
- UpdateReadableState();
-}
-
void Transport::OnChannelWritableState(TransportChannel* channel) {
LOG(LS_INFO) << name() << " TransportChannel " << channel->component()
<< " writability changed to " << channel->writable()
@@ -453,9 +447,6 @@ TransportState Transport::GetTransportState(TransportStateType state_type) {
for (const auto iter : channels_) {
bool b = false;
switch (state_type) {
- case TRANSPORT_READABLE_STATE:
- b = iter.second->readable();
- break;
case TRANSPORT_WRITABLE_STATE:
b = iter.second->writable();
break;
@@ -595,14 +586,6 @@ void Transport::UpdateWritableState() {
}
}
-void Transport::UpdateReadableState() {
- TransportState readable = GetTransportState(TRANSPORT_READABLE_STATE);
- if (readable_ != readable) {
- readable_ = readable;
- SignalReadableState(this);
- }
-}
-
bool Transport::ApplyLocalTransportDescription(TransportChannelImpl* ch,
std::string* error_desc) {
ch->SetIceCredentials(local_description_->ice_ufrag,

Powered by Google App Engine
This is Rietveld 408576698