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

Unified Diff: webrtc/p2p/base/p2ptransportchannel.h

Issue 2163403002: Prepare for ICE-renomination (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Updated comments Created 4 years, 4 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
« no previous file with comments | « no previous file | webrtc/p2p/base/p2ptransportchannel.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/p2ptransportchannel.h
diff --git a/webrtc/p2p/base/p2ptransportchannel.h b/webrtc/p2p/base/p2ptransportchannel.h
index 6fafaa4c3ebdc1069ce39b8b1af1fad9631ed377..7d5e304bb3318b6cd959e6b6445a0d801f71b462 100644
--- a/webrtc/p2p/base/p2ptransportchannel.h
+++ b/webrtc/p2p/base/p2ptransportchannel.h
@@ -209,6 +209,11 @@ class P2PTransportChannel : public TransportChannelImpl,
return remote_candidates_;
}
+ // Public for unit tests.
+ void set_remote_supports_renomination(bool remote_supports_renomination) {
+ remote_supports_renomination_ = remote_supports_renomination;
+ }
+
private:
rtc::Thread* thread() const { return worker_thread_; }
bool IsGettingPorts() { return allocator_session()->IsGettingPorts(); }
@@ -313,6 +318,9 @@ class P2PTransportChannel : public TransportChannelImpl,
void OnCheckAndPing();
void OnRegatherOnFailedNetworks();
+ uint32_t GetNominationAttr(Connection* conn) const;
+ bool GetUseCandidateAttr(Connection* conn, NominationMode mode) const;
+
// Returns true if we should switch to the new connection.
// sets |missed_receiving_unchanged_threshold| to true if either
// the selected connection or the new connection missed its
@@ -402,6 +410,13 @@ class P2PTransportChannel : public TransportChannelImpl,
IceConfig config_;
int last_sent_packet_id_ = -1; // -1 indicates no packet was sent before.
bool started_pinging_ = false;
+ // TODO(honghaiz): Put this and ICE role inside ICEParameters and rename this
+ // as renomination. Set its value in subsequent CLs based on signaling
+ // exchange.
+ bool remote_supports_renomination_ = false;
+ // The value put in the "nomination" attribute for the next nominated
+ // connection. A zero-value indicates the connection will not be nominated.
+ uint32_t nomination_ = 0;
RTC_DISALLOW_COPY_AND_ASSIGN(P2PTransportChannel);
};
« no previous file with comments | « no previous file | webrtc/p2p/base/p2ptransportchannel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698