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

Unified Diff: remoting/host/session_manager_factory.cc

Issue 17101034: Add static Create method to LibjingleTransportFactory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved it back and added LibjingleTransportFactory::Create Created 7 years, 6 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: remoting/host/session_manager_factory.cc
diff --git a/remoting/host/session_manager_factory.cc b/remoting/host/session_manager_factory.cc
index df2178675a728a91c01c7445a506ad7d62af6cd9..2a356950b76fcb5cb4f8a3301bf2effb9f6ad58d 100644
--- a/remoting/host/session_manager_factory.cc
+++ b/remoting/host/session_manager_factory.cc
@@ -4,11 +4,11 @@
#include "remoting/host/session_manager_factory.h"
-#include "net/url_request/url_request_context_getter.h"
-#include "remoting/host/host_port_allocator.h"
-#include "remoting/host/network_settings.h"
-#include "remoting/protocol/libjingle_transport_factory.h"
+#include "remoting/jingle_glue/chromium_port_allocator.h"
+#include "remoting/jingle_glue/network_settings.h"
#include "remoting/protocol/jingle_session_manager.h"
+#include "remoting/protocol/libjingle_transport_factory.h"
+#include "remoting/protocol/session_manager.h"
namespace remoting {
@@ -16,20 +16,9 @@ scoped_ptr<protocol::SessionManager> CreateHostSessionManager(
const NetworkSettings& network_settings,
const scoped_refptr<net::URLRequestContextGetter>&
url_request_context_getter) {
- // Use Chrome's network stack to allocate ports for peer-to-peer channels.
- scoped_ptr<HostPortAllocator> port_allocator(
- HostPortAllocator::Create(url_request_context_getter,
- network_settings));
-
- bool incoming_only = network_settings.nat_traversal_mode ==
- NetworkSettings::NAT_TRAVERSAL_DISABLED;
-
- // Use libjingle for negotiation of peer-to-peer channels over
- // HostPortAllocator allocated ports.
scoped_ptr<protocol::TransportFactory> transport_factory(
- new protocol::LibjingleTransportFactory(
- port_allocator.PassAs<cricket::HttpPortAllocatorBase>(),
- incoming_only));
+ protocol::LibjingleTransportFactory::Create(network_settings,
+ url_request_context_getter));
Sergey Ulanov 2013/06/21 00:48:13 incorrect indentation. http://google-styleguide.go
// Use the Jingle protocol for channel-negotiation signalling between
// peer TransportFactories.

Powered by Google App Engine
This is Rietveld 408576698