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

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

Issue 17101034: Add static Create method to LibjingleTransportFactory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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 // This file implements a standalone host process for Me2Me. 5 // This file implements a standalone host process for Me2Me.
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/at_exit.h" 9 #include "base/at_exit.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 #include "remoting/host/host_event_logger.h" 50 #include "remoting/host/host_event_logger.h"
51 #include "remoting/host/host_exit_codes.h" 51 #include "remoting/host/host_exit_codes.h"
52 #include "remoting/host/host_main.h" 52 #include "remoting/host/host_main.h"
53 #include "remoting/host/ipc_constants.h" 53 #include "remoting/host/ipc_constants.h"
54 #include "remoting/host/ipc_desktop_environment.h" 54 #include "remoting/host/ipc_desktop_environment.h"
55 #include "remoting/host/ipc_host_event_logger.h" 55 #include "remoting/host/ipc_host_event_logger.h"
56 #include "remoting/host/json_host_config.h" 56 #include "remoting/host/json_host_config.h"
57 #include "remoting/host/log_to_server.h" 57 #include "remoting/host/log_to_server.h"
58 #include "remoting/host/logging.h" 58 #include "remoting/host/logging.h"
59 #include "remoting/host/me2me_desktop_environment.h" 59 #include "remoting/host/me2me_desktop_environment.h"
60 #include "remoting/host/network_settings.h"
61 #include "remoting/host/policy_hack/policy_watcher.h" 60 #include "remoting/host/policy_hack/policy_watcher.h"
62 #include "remoting/host/service_urls.h" 61 #include "remoting/host/service_urls.h"
63 #include "remoting/host/session_manager_factory.h"
64 #include "remoting/host/signaling_connector.h" 62 #include "remoting/host/signaling_connector.h"
65 #include "remoting/host/token_validator_factory_impl.h" 63 #include "remoting/host/token_validator_factory_impl.h"
66 #include "remoting/host/ui_strings.h" 64 #include "remoting/host/ui_strings.h"
67 #include "remoting/host/usage_stats_consent.h" 65 #include "remoting/host/usage_stats_consent.h"
68 #include "remoting/jingle_glue/xmpp_signal_strategy.h" 66 #include "remoting/jingle_glue/xmpp_signal_strategy.h"
69 #include "remoting/protocol/me2me_host_authenticator_factory.h" 67 #include "remoting/protocol/me2me_host_authenticator_factory.h"
68 #include "remoting/protocol/network_settings.h"
70 #include "remoting/protocol/pairing_registry.h" 69 #include "remoting/protocol/pairing_registry.h"
70 #include "remoting/protocol/session_manager_factory.h"
71 71
72 #if defined(OS_POSIX) 72 #if defined(OS_POSIX)
73 #include <signal.h> 73 #include <signal.h>
74 #include <sys/types.h> 74 #include <sys/types.h>
75 #include <unistd.h> 75 #include <unistd.h>
76 #include "base/file_descriptor_posix.h" 76 #include "base/file_descriptor_posix.h"
77 #include "remoting/host/pam_authorization_factory_posix.h" 77 #include "remoting/host/pam_authorization_factory_posix.h"
78 #include "remoting/host/posix/signal_handler.h" 78 #include "remoting/host/posix/signal_handler.h"
79 #endif // defined(OS_POSIX) 79 #endif // defined(OS_POSIX)
80 80
(...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after
923 dns_blackhole_checker.Pass(), 923 dns_blackhole_checker.Pass(),
924 base::Bind(&HostProcess::OnAuthFailed, this))); 924 base::Bind(&HostProcess::OnAuthFailed, this)));
925 925
926 if (!oauth_refresh_token_.empty()) { 926 if (!oauth_refresh_token_.empty()) {
927 scoped_ptr<SignalingConnector::OAuthCredentials> oauth_credentials( 927 scoped_ptr<SignalingConnector::OAuthCredentials> oauth_credentials(
928 new SignalingConnector::OAuthCredentials( 928 new SignalingConnector::OAuthCredentials(
929 xmpp_login_, oauth_refresh_token_)); 929 xmpp_login_, oauth_refresh_token_));
930 signaling_connector_->EnableOAuth(oauth_credentials.Pass()); 930 signaling_connector_->EnableOAuth(oauth_credentials.Pass());
931 } 931 }
932 932
933 NetworkSettings network_settings( 933 protocol::NetworkSettings network_settings(
934 allow_nat_traversal_ ? 934 allow_nat_traversal_ ?
935 NetworkSettings::NAT_TRAVERSAL_ENABLED : 935 protocol::NetworkSettings::NAT_TRAVERSAL_ENABLED :
936 NetworkSettings::NAT_TRAVERSAL_DISABLED); 936 protocol::NetworkSettings::NAT_TRAVERSAL_DISABLED);
937 if (!allow_nat_traversal_) { 937 if (!allow_nat_traversal_) {
938 network_settings.min_port = NetworkSettings::kDefaultMinPort; 938 network_settings.min_port = protocol::NetworkSettings::kDefaultMinPort;
939 network_settings.max_port = NetworkSettings::kDefaultMaxPort; 939 network_settings.max_port = protocol::NetworkSettings::kDefaultMaxPort;
940 } 940 }
941 941
942 host_.reset(new ChromotingHost( 942 host_.reset(new ChromotingHost(
943 signal_strategy_.get(), 943 signal_strategy_.get(),
944 desktop_environment_factory_.get(), 944 desktop_environment_factory_.get(),
945 CreateHostSessionManager(network_settings, 945 protocol::CreateNativeSessionManager(network_settings,
946 context_->url_request_context_getter()), 946 context_->url_request_context_getter()),
947 context_->audio_task_runner(), 947 context_->audio_task_runner(),
948 context_->input_task_runner(), 948 context_->input_task_runner(),
949 context_->video_capture_task_runner(), 949 context_->video_capture_task_runner(),
950 context_->video_encode_task_runner(), 950 context_->video_encode_task_runner(),
951 context_->network_task_runner(), 951 context_->network_task_runner(),
952 context_->ui_task_runner())); 952 context_->ui_task_runner()));
953 953
954 // TODO(simonmorris): Get the maximum session duration from a policy. 954 // TODO(simonmorris): Get the maximum session duration from a policy.
955 #if defined(OS_LINUX) 955 #if defined(OS_LINUX)
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
1101 return exit_code; 1101 return exit_code;
1102 } 1102 }
1103 1103
1104 } // namespace remoting 1104 } // namespace remoting
1105 1105
1106 #if !defined(OS_WIN) 1106 #if !defined(OS_WIN)
1107 int main(int argc, char** argv) { 1107 int main(int argc, char** argv) {
1108 return remoting::HostMain(argc, argv); 1108 return remoting::HostMain(argc, argv);
1109 } 1109 }
1110 #endif // !defined(OS_WIN) 1110 #endif // !defined(OS_WIN)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698