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

Side by Side Diff: webrtc/p2p/client/fakeportallocator.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, 1 month 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 unified diff | Download patch
« no previous file with comments | « webrtc/p2p/client/basicportallocator.cc ('k') | webrtc/p2p/client/portallocator_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2010 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2010 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 FakePortAllocator(rtc::Thread* worker_thread, 94 FakePortAllocator(rtc::Thread* worker_thread,
95 rtc::PacketSocketFactory* factory) 95 rtc::PacketSocketFactory* factory)
96 : worker_thread_(worker_thread), factory_(factory) { 96 : worker_thread_(worker_thread), factory_(factory) {
97 if (factory_ == NULL) { 97 if (factory_ == NULL) {
98 owned_factory_.reset(new rtc::BasicPacketSocketFactory( 98 owned_factory_.reset(new rtc::BasicPacketSocketFactory(
99 worker_thread_)); 99 worker_thread_));
100 factory_ = owned_factory_.get(); 100 factory_ = owned_factory_.get();
101 } 101 }
102 } 102 }
103 103
104 void SetIceServers(
105 const ServerAddresses& stun_servers,
106 const std::vector<RelayServerConfig>& turn_servers) override {
107 stun_servers_ = stun_servers;
108 turn_servers_ = turn_servers;
109 }
110
111 const ServerAddresses& stun_servers() const { return stun_servers_; }
112
113 const std::vector<RelayServerConfig>& turn_servers() const {
114 return turn_servers_;
115 }
116
104 virtual cricket::PortAllocatorSession* CreateSessionInternal( 117 virtual cricket::PortAllocatorSession* CreateSessionInternal(
105 const std::string& content_name, 118 const std::string& content_name,
106 int component, 119 int component,
107 const std::string& ice_ufrag, 120 const std::string& ice_ufrag,
108 const std::string& ice_pwd) { 121 const std::string& ice_pwd) override {
109 return new FakePortAllocatorSession( 122 return new FakePortAllocatorSession(
110 worker_thread_, factory_, content_name, component, ice_ufrag, ice_pwd); 123 worker_thread_, factory_, content_name, component, ice_ufrag, ice_pwd);
111 } 124 }
112 125
113 private: 126 private:
114 rtc::Thread* worker_thread_; 127 rtc::Thread* worker_thread_;
115 rtc::PacketSocketFactory* factory_; 128 rtc::PacketSocketFactory* factory_;
116 rtc::scoped_ptr<rtc::BasicPacketSocketFactory> owned_factory_; 129 rtc::scoped_ptr<rtc::BasicPacketSocketFactory> owned_factory_;
130 ServerAddresses stun_servers_;
131 std::vector<RelayServerConfig> turn_servers_;
117 }; 132 };
118 133
119 } // namespace cricket 134 } // namespace cricket
120 135
121 #endif // WEBRTC_P2P_CLIENT_FAKEPORTALLOCATOR_H_ 136 #endif // WEBRTC_P2P_CLIENT_FAKEPORTALLOCATOR_H_
OLDNEW
« no previous file with comments | « webrtc/p2p/client/basicportallocator.cc ('k') | webrtc/p2p/client/portallocator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698