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

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

Issue 320403002: Pull out common code from client and host versions of LogToServer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
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_change_notification_listener.h" 50 #include "remoting/host/host_change_notification_listener.h"
51 #include "remoting/host/host_config.h" 51 #include "remoting/host/host_config.h"
52 #include "remoting/host/host_event_logger.h" 52 #include "remoting/host/host_event_logger.h"
53 #include "remoting/host/host_exit_codes.h" 53 #include "remoting/host/host_exit_codes.h"
54 #include "remoting/host/host_main.h" 54 #include "remoting/host/host_main.h"
55 #include "remoting/host/host_status_sender.h" 55 #include "remoting/host/host_status_sender.h"
56 #include "remoting/host/ipc_constants.h" 56 #include "remoting/host/ipc_constants.h"
57 #include "remoting/host/ipc_desktop_environment.h" 57 #include "remoting/host/ipc_desktop_environment.h"
58 #include "remoting/host/ipc_host_event_logger.h" 58 #include "remoting/host/ipc_host_event_logger.h"
59 #include "remoting/host/json_host_config.h" 59 #include "remoting/host/json_host_config.h"
60 #include "remoting/host/log_to_server.h" 60 #include "remoting/host/log_to_server_host.h"
61 #include "remoting/host/logging.h" 61 #include "remoting/host/logging.h"
62 #include "remoting/host/me2me_desktop_environment.h" 62 #include "remoting/host/me2me_desktop_environment.h"
63 #include "remoting/host/pairing_registry_delegate.h" 63 #include "remoting/host/pairing_registry_delegate.h"
64 #include "remoting/host/policy_hack/policy_watcher.h" 64 #include "remoting/host/policy_hack/policy_watcher.h"
65 #include "remoting/host/service_urls.h" 65 #include "remoting/host/service_urls.h"
66 #include "remoting/host/session_manager_factory.h" 66 #include "remoting/host/session_manager_factory.h"
67 #include "remoting/host/signaling_connector.h" 67 #include "remoting/host/signaling_connector.h"
68 #include "remoting/host/token_validator_factory_impl.h" 68 #include "remoting/host/token_validator_factory_impl.h"
69 #include "remoting/host/usage_stats_consent.h" 69 #include "remoting/host/usage_stats_consent.h"
70 #include "remoting/host/username.h" 70 #include "remoting/host/username.h"
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 bool curtain_required_; 299 bool curtain_required_;
300 ThirdPartyAuthConfig third_party_auth_config_; 300 ThirdPartyAuthConfig third_party_auth_config_;
301 bool enable_gnubby_auth_; 301 bool enable_gnubby_auth_;
302 302
303 scoped_ptr<OAuthTokenGetter> oauth_token_getter_; 303 scoped_ptr<OAuthTokenGetter> oauth_token_getter_;
304 scoped_ptr<XmppSignalStrategy> signal_strategy_; 304 scoped_ptr<XmppSignalStrategy> signal_strategy_;
305 scoped_ptr<SignalingConnector> signaling_connector_; 305 scoped_ptr<SignalingConnector> signaling_connector_;
306 scoped_ptr<HeartbeatSender> heartbeat_sender_; 306 scoped_ptr<HeartbeatSender> heartbeat_sender_;
307 scoped_ptr<HostStatusSender> host_status_sender_; 307 scoped_ptr<HostStatusSender> host_status_sender_;
308 scoped_ptr<HostChangeNotificationListener> host_change_notification_listener_; 308 scoped_ptr<HostChangeNotificationListener> host_change_notification_listener_;
309 scoped_ptr<LogToServer> log_to_server_; 309 scoped_ptr<LogToServerHost> log_to_server_;
310 scoped_ptr<HostEventLogger> host_event_logger_; 310 scoped_ptr<HostEventLogger> host_event_logger_;
311 311
312 scoped_ptr<ChromotingHost> host_; 312 scoped_ptr<ChromotingHost> host_;
313 313
314 // Used to keep this HostProcess alive until it is shutdown. 314 // Used to keep this HostProcess alive until it is shutdown.
315 scoped_refptr<HostProcess> self_; 315 scoped_refptr<HostProcess> self_;
316 316
317 #if defined(REMOTING_MULTI_PROCESS) 317 #if defined(REMOTING_MULTI_PROCESS)
318 DesktopSessionConnector* desktop_session_connector_; 318 DesktopSessionConnector* desktop_session_connector_;
319 #endif // defined(REMOTING_MULTI_PROCESS) 319 #endif // defined(REMOTING_MULTI_PROCESS)
(...skipping 872 matching lines...) Expand 10 before | Expand all | Expand 10 after
1192 this, host_id_, signal_strategy_.get(), key_pair_, 1192 this, host_id_, signal_strategy_.get(), key_pair_,
1193 directory_bot_jid_)); 1193 directory_bot_jid_));
1194 1194
1195 host_status_sender_.reset(new HostStatusSender( 1195 host_status_sender_.reset(new HostStatusSender(
1196 host_id_, signal_strategy_.get(), key_pair_, directory_bot_jid_)); 1196 host_id_, signal_strategy_.get(), key_pair_, directory_bot_jid_));
1197 1197
1198 host_change_notification_listener_.reset(new HostChangeNotificationListener( 1198 host_change_notification_listener_.reset(new HostChangeNotificationListener(
1199 this, host_id_, signal_strategy_.get(), directory_bot_jid_)); 1199 this, host_id_, signal_strategy_.get(), directory_bot_jid_));
1200 1200
1201 log_to_server_.reset( 1201 log_to_server_.reset(
1202 new LogToServer(host_->AsWeakPtr(), ServerLogEntry::ME2ME, 1202 new LogToServerHost(host_->AsWeakPtr(), ServerLogEntry::ME2ME,
1203 signal_strategy_.get(), directory_bot_jid_)); 1203 signal_strategy_.get(), directory_bot_jid_));
1204 1204
1205 // Set up repoting the host status notifications. 1205 // Set up repoting the host status notifications.
1206 #if defined(REMOTING_MULTI_PROCESS) 1206 #if defined(REMOTING_MULTI_PROCESS)
1207 host_event_logger_.reset( 1207 host_event_logger_.reset(
1208 new IpcHostEventLogger(host_->AsWeakPtr(), daemon_channel_.get())); 1208 new IpcHostEventLogger(host_->AsWeakPtr(), daemon_channel_.get()));
1209 #else // !defined(REMOTING_MULTI_PROCESS) 1209 #else // !defined(REMOTING_MULTI_PROCESS)
1210 host_event_logger_ = 1210 host_event_logger_ =
1211 HostEventLogger::Create(host_->AsWeakPtr(), kApplicationName); 1211 HostEventLogger::Create(host_->AsWeakPtr(), kApplicationName);
1212 #endif // !defined(REMOTING_MULTI_PROCESS) 1212 #endif // !defined(REMOTING_MULTI_PROCESS)
1213 1213
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
1353 return exit_code; 1353 return exit_code;
1354 } 1354 }
1355 1355
1356 } // namespace remoting 1356 } // namespace remoting
1357 1357
1358 #if !defined(OS_WIN) 1358 #if !defined(OS_WIN)
1359 int main(int argc, char** argv) { 1359 int main(int argc, char** argv) {
1360 return remoting::HostMain(argc, argv); 1360 return remoting::HostMain(argc, argv);
1361 } 1361 }
1362 #endif // !defined(OS_WIN) 1362 #endif // !defined(OS_WIN)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698