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

Unified Diff: webrtc/p2p/client/basicportallocator.cc

Issue 2120733002: Make the state transition for a PortAllocatorSession in each derived class (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: . 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
« no previous file with comments | « webrtc/p2p/client/basicportallocator.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/client/basicportallocator.cc
diff --git a/webrtc/p2p/client/basicportallocator.cc b/webrtc/p2p/client/basicportallocator.cc
index 7f8ad528892a9c14dd93b0db14a566249445f56a..fabbc429e5292a941ec726f0571cbb113f01be47 100644
--- a/webrtc/p2p/client/basicportallocator.cc
+++ b/webrtc/p2p/client/basicportallocator.cc
@@ -238,7 +238,7 @@ void BasicPortAllocatorSession::SetCandidateFilter(uint32_t filter) {
void BasicPortAllocatorSession::StartGettingPorts() {
network_thread_ = rtc::Thread::Current();
- PortAllocatorSession::StartGettingPorts();
+ state_ = SessionState::GATHERING;
if (!socket_factory_) {
owned_socket_factory_.reset(
new rtc::BasicPacketSocketFactory(network_thread_));
@@ -257,7 +257,7 @@ void BasicPortAllocatorSession::StopGettingPorts() {
ClearGettingPorts();
// Note: this must be called after ClearGettingPorts because both may set the
// session state and we should set the state to STOPPED.
- PortAllocatorSession::StopGettingPorts();
+ state_ = SessionState::STOPPED;
}
void BasicPortAllocatorSession::ClearGettingPorts() {
@@ -266,7 +266,7 @@ void BasicPortAllocatorSession::ClearGettingPorts() {
for (uint32_t i = 0; i < sequences_.size(); ++i) {
sequences_[i]->Stop();
}
- PortAllocatorSession::ClearGettingPorts();
+ state_ = SessionState::CLEARED;
}
std::vector<rtc::Network*> BasicPortAllocatorSession::GetFailedNetworks() {
« no previous file with comments | « webrtc/p2p/client/basicportallocator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698