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

Side by Side Diff: remoting/host/it2me/it2me_host.cc

Issue 1681393006: Use UrlRequest in PortAllocator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "remoting/host/it2me/it2me_host.h" 5 #include "remoting/host/it2me/it2me_host.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
11 #include "base/bind.h" 11 #include "base/bind.h"
12 #include "base/callback_helpers.h" 12 #include "base/callback_helpers.h"
13 #include "base/strings/string_util.h" 13 #include "base/strings/string_util.h"
14 #include "base/threading/platform_thread.h" 14 #include "base/threading/platform_thread.h"
15 #include "net/socket/client_socket_factory.h" 15 #include "net/socket/client_socket_factory.h"
16 #include "net/url_request/url_request_context_getter.h" 16 #include "net/url_request/url_request_context_getter.h"
17 #include "policy/policy_constants.h" 17 #include "policy/policy_constants.h"
18 #include "remoting/base/auto_thread.h" 18 #include "remoting/base/auto_thread.h"
19 #include "remoting/base/chromium_url_request.h"
19 #include "remoting/base/logging.h" 20 #include "remoting/base/logging.h"
20 #include "remoting/base/rsa_key_pair.h" 21 #include "remoting/base/rsa_key_pair.h"
21 #include "remoting/host/chromoting_host.h" 22 #include "remoting/host/chromoting_host.h"
22 #include "remoting/host/chromoting_host_context.h" 23 #include "remoting/host/chromoting_host_context.h"
23 #include "remoting/host/host_event_logger.h" 24 #include "remoting/host/host_event_logger.h"
24 #include "remoting/host/host_secret.h" 25 #include "remoting/host/host_secret.h"
25 #include "remoting/host/host_status_logger.h" 26 #include "remoting/host/host_status_logger.h"
26 #include "remoting/host/it2me/it2me_confirmation_dialog.h" 27 #include "remoting/host/it2me/it2me_confirmation_dialog.h"
27 #include "remoting/host/it2me_desktop_environment.h" 28 #include "remoting/host/it2me_desktop_environment.h"
28 #include "remoting/host/policy_watcher.h" 29 #include "remoting/host/policy_watcher.h"
29 #include "remoting/host/register_support_host_request.h" 30 #include "remoting/host/register_support_host_request.h"
30 #include "remoting/protocol/chromium_port_allocator.h" 31 #include "remoting/protocol/chromium_port_allocator_factory.h"
31 #include "remoting/protocol/ice_transport.h" 32 #include "remoting/protocol/ice_transport.h"
32 #include "remoting/protocol/it2me_host_authenticator_factory.h" 33 #include "remoting/protocol/it2me_host_authenticator_factory.h"
33 #include "remoting/protocol/jingle_session_manager.h" 34 #include "remoting/protocol/jingle_session_manager.h"
34 #include "remoting/protocol/network_settings.h" 35 #include "remoting/protocol/network_settings.h"
35 #include "remoting/protocol/transport_context.h" 36 #include "remoting/protocol/transport_context.h"
36 #include "remoting/signaling/server_log_entry.h" 37 #include "remoting/signaling/server_log_entry.h"
37 38
38 namespace remoting { 39 namespace remoting {
39 40
40 namespace { 41 namespace {
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 if (!nat_traversal_enabled_) { 232 if (!nat_traversal_enabled_) {
232 network_settings.port_range.min_port = 233 network_settings.port_range.min_port =
233 protocol::NetworkSettings::kDefaultMinPort; 234 protocol::NetworkSettings::kDefaultMinPort;
234 network_settings.port_range.max_port = 235 network_settings.port_range.max_port =
235 protocol::NetworkSettings::kDefaultMaxPort; 236 protocol::NetworkSettings::kDefaultMaxPort;
236 } 237 }
237 238
238 scoped_refptr<protocol::TransportContext> transport_context = 239 scoped_refptr<protocol::TransportContext> transport_context =
239 new protocol::TransportContext( 240 new protocol::TransportContext(
240 signal_strategy_.get(), 241 signal_strategy_.get(),
241 make_scoped_ptr(new protocol::ChromiumPortAllocatorFactory( 242 make_scoped_ptr(new protocol::ChromiumPortAllocatorFactory()),
243 make_scoped_ptr(new ChromiumUrlRequestFactory(
242 host_context_->url_request_context_getter())), 244 host_context_->url_request_context_getter())),
243 network_settings, protocol::TransportRole::SERVER); 245 network_settings, protocol::TransportRole::SERVER);
244 246
245 scoped_ptr<protocol::SessionManager> session_manager( 247 scoped_ptr<protocol::SessionManager> session_manager(
246 new protocol::JingleSessionManager(signal_strategy_.get())); 248 new protocol::JingleSessionManager(signal_strategy_.get()));
247 249
248 scoped_ptr<protocol::CandidateSessionConfig> protocol_config = 250 scoped_ptr<protocol::CandidateSessionConfig> protocol_config =
249 protocol::CandidateSessionConfig::CreateDefault(); 251 protocol::CandidateSessionConfig::CreateDefault();
250 // Disable audio by default. 252 // Disable audio by default.
251 // TODO(sergeyu): Add UI to enable it. 253 // TODO(sergeyu): Add UI to enable it.
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 scoped_ptr<It2MeConfirmationDialogFactory> confirmation_dialog_factory( 513 scoped_ptr<It2MeConfirmationDialogFactory> confirmation_dialog_factory(
512 new It2MeConfirmationDialogFactory()); 514 new It2MeConfirmationDialogFactory());
513 scoped_ptr<PolicyWatcher> policy_watcher = 515 scoped_ptr<PolicyWatcher> policy_watcher =
514 PolicyWatcher::Create(policy_service_, context->file_task_runner()); 516 PolicyWatcher::Create(policy_service_, context->file_task_runner());
515 return new It2MeHost(std::move(context), std::move(policy_watcher), 517 return new It2MeHost(std::move(context), std::move(policy_watcher),
516 std::move(confirmation_dialog_factory), observer, 518 std::move(confirmation_dialog_factory), observer,
517 xmpp_server_config, directory_bot_jid); 519 xmpp_server_config, directory_bot_jid);
518 } 520 }
519 521
520 } // namespace remoting 522 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/client/plugin/pepper_port_allocator_factory.cc ('k') | remoting/host/remoting_me2me_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698