aboutsummaryrefslogtreecommitdiff
path: root/p2p/base/fake_port_allocator.h
diff options
context:
space:
mode:
Diffstat (limited to 'p2p/base/fake_port_allocator.h')
-rw-r--r--p2p/base/fake_port_allocator.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/p2p/base/fake_port_allocator.h b/p2p/base/fake_port_allocator.h
index 9e0e333041..efe9a53a16 100644
--- a/p2p/base/fake_port_allocator.h
+++ b/p2p/base/fake_port_allocator.h
@@ -238,10 +238,19 @@ class FakePortAllocator : public cricket::PortAllocator {
bool initialized() const { return initialized_; }
+ // For testing: Manipulate MdnsObfuscationEnabled()
+ bool MdnsObfuscationEnabled() const override {
+ return mdns_obfuscation_enabled_;
+ }
+ void SetMdnsObfuscationEnabledForTesting(bool enabled) {
+ mdns_obfuscation_enabled_ = enabled;
+ }
+
private:
rtc::Thread* network_thread_;
rtc::PacketSocketFactory* factory_;
std::unique_ptr<rtc::BasicPacketSocketFactory> owned_factory_;
+ bool mdns_obfuscation_enabled_ = false;
};
} // namespace cricket