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

Side by Side Diff: remoting/host/session_manager_factory.cc

Issue 1521883006: Add TransportContext class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | « remoting/host/session_manager_factory.h ('k') | remoting/protocol/chromium_port_allocator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "remoting/host/session_manager_factory.h"
6
7 #include "remoting/protocol/chromium_port_allocator.h"
8 #include "remoting/protocol/chromium_socket_factory.h"
9 #include "remoting/protocol/ice_transport_factory.h"
10 #include "remoting/protocol/jingle_session_manager.h"
11 #include "remoting/protocol/network_settings.h"
12 #include "remoting/protocol/session_manager.h"
13
14 namespace remoting {
15
16 scoped_ptr<protocol::SessionManager> CreateHostSessionManager(
17 SignalStrategy* signal_strategy,
18 const protocol::NetworkSettings& network_settings,
19 const scoped_refptr<net::URLRequestContextGetter>&
20 url_request_context_getter) {
21 // Use Chrome's network stack to allocate ports for peer-to-peer channels.
22 scoped_ptr<protocol::ChromiumPortAllocator> port_allocator(
23 protocol::ChromiumPortAllocator::Create(url_request_context_getter,
24 network_settings));
25
26 scoped_ptr<protocol::TransportFactory> transport_factory(
27 new protocol::IceTransportFactory(
28 signal_strategy, port_allocator.Pass(), network_settings,
29 protocol::TransportRole::SERVER));
30
31 scoped_ptr<protocol::JingleSessionManager> session_manager(
32 new protocol::JingleSessionManager(transport_factory.Pass()));
33 return session_manager.Pass();
34 }
35
36 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/session_manager_factory.h ('k') | remoting/protocol/chromium_port_allocator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698