OLD | NEW |
---|---|
(Empty) | |
1 #include "remoting/host/jingle_session_manager_factory.h" | |
Wez
2012/06/11 22:17:06
You're missing a Copyright header.
simonmorris
2012/06/11 23:08:59
Done.
| |
2 | |
3 #include "net/url_request/url_request_context_getter.h" | |
4 #include "remoting/host/host_port_allocator.h" | |
5 #include "remoting/host/network_settings.h" | |
6 #include "remoting/protocol/libjingle_transport_factory.h" | |
7 #include "remoting/protocol/jingle_session_manager.h" | |
8 | |
9 namespace remoting { | |
10 | |
11 JingleSessionManagerFactory::JingleSessionManagerFactory() { | |
12 } | |
13 | |
14 JingleSessionManagerFactory::~JingleSessionManagerFactory() { | |
15 } | |
16 | |
17 scoped_ptr<protocol::SessionManager> | |
18 JingleSessionManagerFactory::MakeSessionManager( | |
19 const NetworkSettings& network_settings, | |
20 const scoped_refptr<net::URLRequestContextGetter>& | |
21 url_request_context_getter) { | |
22 // Create port allocator and transport factory. | |
Wez
2012/06/11 22:17:06
nit: Suggest "Create a cricket::PortAllocator that
simonmorris
2012/06/11 23:08:59
Done.
| |
23 scoped_ptr<HostPortAllocator> port_allocator( | |
24 HostPortAllocator::Create(url_request_context_getter, | |
25 network_settings)); | |
26 | |
27 bool incoming_only = network_settings.nat_traversal_mode == | |
Wez
2012/06/11 22:17:06
nit: Suggest comment "Create a libjingle Transport
simonmorris
2012/06/11 23:08:59
Done.
| |
28 NetworkSettings::NAT_TRAVERSAL_DISABLED; | |
29 | |
30 scoped_ptr<protocol::TransportFactory> transport_factory( | |
31 new protocol::LibjingleTransportFactory( | |
32 port_allocator.PassAs<cricket::HttpPortAllocatorBase>(), | |
33 incoming_only)); | |
34 | |
35 // Create and session manager. | |
Wez
2012/06/11 22:17:06
nit: Suggest "Create a Jingle-protocol SessionMana
simonmorris
2012/06/11 23:08:59
Done.
| |
36 bool fetch_stun_relay_info = network_settings.nat_traversal_mode == | |
37 NetworkSettings::NAT_TRAVERSAL_ENABLED; | |
38 scoped_ptr<protocol::JingleSessionManager> session_manager( | |
39 new protocol::JingleSessionManager( | |
40 transport_factory.Pass(), fetch_stun_relay_info)); | |
41 return session_manager.PassAs<protocol::SessionManager>(); | |
42 } | |
43 | |
44 } // namespace remoting | |
OLD | NEW |