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

Unified Diff: remoting/host/chromoting_host.cc

Issue 10160012: Pass TransportConfig to TransportFactory instead of Transport. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 | remoting/protocol/jingle_session.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/chromoting_host.cc
diff --git a/remoting/host/chromoting_host.cc b/remoting/host/chromoting_host.cc
index 64753316151cc98fa26cacd86457aea950dc9b57..aea2466c48dfda36926139fc39830192ed510229 100644
--- a/remoting/host/chromoting_host.cc
+++ b/remoting/host/chromoting_host.cc
@@ -107,22 +107,19 @@ void ChromotingHost::Start() {
new talk_base::BasicNetworkManager());
scoped_ptr<talk_base::PacketSocketFactory> socket_factory(
new talk_base::BasicPacketSocketFactory());
- scoped_ptr<cricket::PortAllocator> port_allocator;
+ scoped_ptr<cricket::HttpPortAllocatorBase> port_allocator(
+ new cricket::HttpPortAllocator(
+ network_manager.get(), socket_factory.get(), ""));
+
// We always use PseudoTcp to provide a reliable channel. It
// provides poor performance when combined with TCP-based transport,
// so we have to disable TCP ports.
int port_allocator_flags = cricket::PORTALLOCATOR_DISABLE_TCP;
- if (network_settings_.nat_traversal_mode ==
+ if (network_settings_.nat_traversal_mode !=
NetworkSettings::NAT_TRAVERSAL_ENABLED) {
- port_allocator.reset(new cricket::HttpPortAllocator(
- network_manager.get(), socket_factory.get(), ""));
- } else {
port_allocator_flags |= cricket::PORTALLOCATOR_DISABLE_STUN |
cricket::PORTALLOCATOR_DISABLE_RELAY;
- port_allocator.reset(
- new cricket::BasicPortAllocator(network_manager.get(),
- socket_factory.get()));
}
port_allocator->set_flags(port_allocator_flags);
port_allocator->SetPortRange(network_settings_.min_port,
« no previous file with comments | « no previous file | remoting/protocol/jingle_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698