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

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

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 | « no previous file | webrtc/p2p/base/portallocator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/fakeportallocator.h
diff --git a/webrtc/p2p/base/fakeportallocator.h b/webrtc/p2p/base/fakeportallocator.h
index 15e793769481dac4ac3bde5d224381e2dc9aab52..001308543ea47e7692949a4e77d1c13343618e2e 100644
--- a/webrtc/p2p/base/fakeportallocator.h
+++ b/webrtc/p2p/base/fakeportallocator.h
@@ -123,7 +123,6 @@ class FakePortAllocatorSession : public PortAllocatorSession {
}
void StartGettingPorts() override {
- PortAllocatorSession::StartGettingPorts();
if (!port_) {
rtc::Network& network =
(rtc::HasIPv6Enabled() && (flags() & PORTALLOCATOR_ENABLE_IPV6))
@@ -137,8 +136,13 @@ class FakePortAllocatorSession : public PortAllocatorSession {
AddPort(port_.get());
}
++port_config_count_;
+ running_ = true;
}
+ void StopGettingPorts() override { running_ = false; }
+ bool IsGettingPorts() override { return running_; }
+ void ClearGettingPorts() override {}
+
std::vector<PortInterface*> ReadyPorts() const override {
return ready_ports_;
}
@@ -204,6 +208,7 @@ class FakePortAllocatorSession : public PortAllocatorSession {
std::vector<RelayServerConfig> turn_servers_;
uint32_t candidate_filter_ = CF_ALL;
int transport_info_update_count_ = 0;
+ bool running_ = false;
};
class FakePortAllocator : public cricket::PortAllocator {
« no previous file with comments | « no previous file | webrtc/p2p/base/portallocator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698