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

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

Issue 1391013007: Adding the ability to change ICE servers through SetConfiguration. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 2 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/client/fakeportallocator.h
diff --git a/webrtc/p2p/client/fakeportallocator.h b/webrtc/p2p/client/fakeportallocator.h
index dca86f633e7c39664cd82a17a2823132791c400a..7508b96dee37cd2b3838e6312e1a8dbf2536e2c6 100644
--- a/webrtc/p2p/client/fakeportallocator.h
+++ b/webrtc/p2p/client/fakeportallocator.h
@@ -101,11 +101,22 @@ class FakePortAllocator : public cricket::PortAllocator {
}
}
+ void SetIceServers(
+ const ServerAddresses& stun_servers,
+ const std::vector<RelayServerConfig>& turn_servers) override {
+ stun_servers_ = stun_servers;
+ relays_ = turn_servers;
pthatcher1 2015/10/15 05:36:58 Can we be consistent with naming? I recommend we
Taylor Brandstetter 2015/10/15 17:13:37 Done.
+ }
+
+ const ServerAddresses& stun_servers() const { return stun_servers_; }
+
+ const std::vector<RelayServerConfig>& relays() const { return relays_; }
pthatcher1 2015/10/20 18:31:27 relay_servers()
+
virtual cricket::PortAllocatorSession* CreateSessionInternal(
const std::string& content_name,
int component,
const std::string& ice_ufrag,
- const std::string& ice_pwd) {
+ const std::string& ice_pwd) override {
return new FakePortAllocatorSession(
worker_thread_, factory_, content_name, component, ice_ufrag, ice_pwd);
}
@@ -114,6 +125,8 @@ class FakePortAllocator : public cricket::PortAllocator {
rtc::Thread* worker_thread_;
rtc::PacketSocketFactory* factory_;
rtc::scoped_ptr<rtc::BasicPacketSocketFactory> owned_factory_;
+ ServerAddresses stun_servers_;
+ std::vector<RelayServerConfig> relays_;
pthatcher1 2015/10/20 18:31:27 relay_servers_
};
} // namespace cricket
« webrtc/p2p/client/basicportallocator.cc ('K') | « webrtc/p2p/client/basicportallocator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698