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

Unified Diff: talk/app/webrtc/fakeportallocatorfactory.h

Issue 1414313003: Reland of Adding the ability to change ICE servers through SetConfiguration. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Adding "override" to applicable methods to fix compile warning. 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
« no previous file with comments | « no previous file | talk/app/webrtc/peerconnection.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/app/webrtc/fakeportallocatorfactory.h
diff --git a/talk/app/webrtc/fakeportallocatorfactory.h b/talk/app/webrtc/fakeportallocatorfactory.h
index f326b6204383a16103e3f62e82e2350bfae26598..eb73b76d08d6e41df04e4624fa1a284c97ff52a3 100644
--- a/talk/app/webrtc/fakeportallocatorfactory.h
+++ b/talk/app/webrtc/fakeportallocatorfactory.h
@@ -49,7 +49,9 @@ class FakePortAllocatorFactory : public PortAllocatorFactoryInterface {
const std::vector<TurnConfiguration>& turn_configurations) {
stun_configs_ = stun_configurations;
turn_configs_ = turn_configurations;
- return new cricket::FakePortAllocator(rtc::Thread::Current(), NULL);
+ last_created_allocator_ =
+ new cricket::FakePortAllocator(rtc::Thread::Current(), nullptr);
+ return last_created_allocator_;
}
const std::vector<StunConfiguration>& stun_configs() const {
@@ -62,6 +64,12 @@ class FakePortAllocatorFactory : public PortAllocatorFactoryInterface {
void SetNetworkIgnoreMask(int network_ignore_mask) {}
+ // Up to caller to ensure this isn't called after the allocator has been
+ // destroyed.
+ cricket::FakePortAllocator* last_created_allocator() {
+ return last_created_allocator_;
+ }
+
protected:
FakePortAllocatorFactory() {}
~FakePortAllocatorFactory() {}
@@ -69,6 +77,7 @@ class FakePortAllocatorFactory : public PortAllocatorFactoryInterface {
private:
std::vector<PortAllocatorFactoryInterface::StunConfiguration> stun_configs_;
std::vector<PortAllocatorFactoryInterface::TurnConfiguration> turn_configs_;
+ cricket::FakePortAllocator* last_created_allocator_ = nullptr;
};
} // namespace webrtc
« no previous file with comments | « no previous file | talk/app/webrtc/peerconnection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698