diff options
-rw-r--r-- | remoting/host/constants.h (renamed from remoting/host/host_exit_codes.h) | 19 | ||||
-rw-r--r-- | remoting/host/constants_win.cc (renamed from remoting/host/win/omaha.cc) | 4 | ||||
-rw-r--r-- | remoting/host/daemon_process_win.cc | 2 | ||||
-rw-r--r-- | remoting/host/desktop_process.cc | 2 | ||||
-rw-r--r-- | remoting/host/dns_blackhole_checker.cc | 1 | ||||
-rw-r--r-- | remoting/host/heartbeat_sender.cc | 1 | ||||
-rwxr-xr-x | remoting/host/installer/mac/PrivilegedHelperTools/org.chromium.chromoting.me2me.sh | 2 | ||||
-rw-r--r-- | remoting/host/plugin/daemon_installer_win.cc | 2 | ||||
-rw-r--r-- | remoting/host/remoting_me2me_host.cc | 31 | ||||
-rw-r--r-- | remoting/host/signaling_connector.cc | 1 | ||||
-rw-r--r-- | remoting/host/simple_host_process.cc | 6 | ||||
-rw-r--r-- | remoting/host/usage_stats_consent_win.cc | 4 | ||||
-rw-r--r-- | remoting/host/win/omaha.h | 15 | ||||
-rw-r--r-- | remoting/host/win/wts_session_process_launcher.cc | 2 | ||||
-rw-r--r-- | remoting/remoting.gyp | 12 | ||||
-rwxr-xr-x | remoting/tools/me2me_virtual_host.py | 2 |
16 files changed, 60 insertions, 46 deletions
diff --git a/remoting/host/host_exit_codes.h b/remoting/host/constants.h index 546dbd6..e2723b6 100644 --- a/remoting/host/host_exit_codes.h +++ b/remoting/host/constants.h @@ -2,13 +2,17 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef REMOTING_HOST_HOST_EXIT_CODES_H_ -#define REMOTING_HOST_HOST_EXIT_CODES_H_ +#ifndef REMOTING_HOST_CONSTANTS_H_ +#define REMOTING_HOST_CONSTANTS_H_ + +#include "base/compiler_specific.h" namespace remoting { -// Known host exit codes. Please keep this enum in sync with: -// remoting/host/installer/mac/PrivilegedHelperTools/org.chromium.chromoting.me2me.sh +// Known host exit codes. +// Please keep this enum in sync with: +// remoting/host/installer/mac/PrivilegedHelperTools/ +// org.chromium.chromoting.me2me.sh // and remoting/tools/me2me_virtual_host.py. enum HostExitCodes { // Error codes that don't indicate a permanent error condition. @@ -29,6 +33,11 @@ enum HostExitCodes { kMaxPermanentErrorExitCode = kLoginScreenNotSupportedExitCode }; +#if defined(OS_WIN) +// The Omaha Appid of the host. +extern const wchar_t kHostOmahaAppid[]; +#endif // defined(OS_WIN) + } // namespace remoting -#endif // REMOTING_HOST_HOST_EXIT_CODES_H_ +#endif // REMOTING_HOST_CONSTANTS_H_ diff --git a/remoting/host/win/omaha.cc b/remoting/host/constants_win.cc index 2b1a31d..2df3e63 100644 --- a/remoting/host/win/omaha.cc +++ b/remoting/host/constants_win.cc @@ -2,12 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "remoting/host/win/omaha.h" +#include "remoting/host/constants.h" namespace remoting { // The Omaha Appid of the host. It should be kept in sync with $(var.OmahaAppid) -// defined in remoting/host/win/chromoting.wxs and the Omaha server +// defined in remoting/host/installer/chromoting.wxs and the Omaha server // configuration. const wchar_t kHostOmahaAppid[] = L"{b210701e-ffc4-49e3-932b-370728c72662}"; diff --git a/remoting/host/daemon_process_win.cc b/remoting/host/daemon_process_win.cc index 58d1f85..d8588d5 100644 --- a/remoting/host/daemon_process_win.cc +++ b/remoting/host/daemon_process_win.cc @@ -14,7 +14,7 @@ #include "base/timer.h" #include "base/utf_string_conversions.h" #include "base/win/scoped_handle.h" -#include "remoting/host/host_exit_codes.h" +#include "remoting/host/constants.h" #include "remoting/host/win/launch_process_with_token.h" #include "remoting/host/win/worker_process_launcher.h" diff --git a/remoting/host/desktop_process.cc b/remoting/host/desktop_process.cc index 77e5410..dd4ed75 100644 --- a/remoting/host/desktop_process.cc +++ b/remoting/host/desktop_process.cc @@ -16,7 +16,7 @@ #include "base/utf_string_conversions.h" #include "base/win/windows_version.h" #include "remoting/host/branding.h" -#include "remoting/host/host_exit_codes.h" +#include "remoting/host/constants.h" #include "remoting/host/usage_stats_consent.h" #if defined(OS_MACOSX) diff --git a/remoting/host/dns_blackhole_checker.cc b/remoting/host/dns_blackhole_checker.cc index d057123..fb4ae03 100644 --- a/remoting/host/dns_blackhole_checker.cc +++ b/remoting/host/dns_blackhole_checker.cc @@ -7,6 +7,7 @@ #include "googleurl/src/gurl.h" #include "net/url_request/url_fetcher.h" #include "remoting/host/chromoting_host_context.h" +#include "remoting/host/constants.h" namespace remoting { diff --git a/remoting/host/heartbeat_sender.cc b/remoting/host/heartbeat_sender.cc index 167b5e1..ee63ffd5 100644 --- a/remoting/host/heartbeat_sender.cc +++ b/remoting/host/heartbeat_sender.cc @@ -13,6 +13,7 @@ #include "base/string_number_conversions.h" #include "base/time.h" #include "remoting/base/constants.h" +#include "remoting/host/constants.h" #include "remoting/host/server_log_entry.h" #include "remoting/jingle_glue/iq_sender.h" #include "remoting/jingle_glue/signal_strategy.h" diff --git a/remoting/host/installer/mac/PrivilegedHelperTools/org.chromium.chromoting.me2me.sh b/remoting/host/installer/mac/PrivilegedHelperTools/org.chromium.chromoting.me2me.sh index 3337b2e..ea0383b 100755 --- a/remoting/host/installer/mac/PrivilegedHelperTools/org.chromium.chromoting.me2me.sh +++ b/remoting/host/installer/mac/PrivilegedHelperTools/org.chromium.chromoting.me2me.sh @@ -19,7 +19,7 @@ SIGTERM_EXIT_CODE=143 # Range of exit codes returned by the host to indicate that a permanent error # has occurred and that the host should not be restarted. Please, keep these -# constants in sync with remoting/host/host_exit_codes.h. +# constants in sync with remoting/host/constants.h. MIN_PERMANENT_ERROR_EXIT_CODE=2 MAX_PERMANENT_ERROR_EXIT_CODE=6 diff --git a/remoting/host/plugin/daemon_installer_win.cc b/remoting/host/plugin/daemon_installer_win.cc index 1dd9d99..606c1c8 100644 --- a/remoting/host/plugin/daemon_installer_win.cc +++ b/remoting/host/plugin/daemon_installer_win.cc @@ -23,7 +23,7 @@ #include "base/win/windows_version.h" #include "google_update/google_update_idl.h" #include "remoting/base/dispatch_win.h" -#include "remoting/host/win/omaha.h" +#include "remoting/host/constants.h" using base::win::ScopedBstr; using base::win::ScopedComPtr; diff --git a/remoting/host/remoting_me2me_host.cc b/remoting/host/remoting_me2me_host.cc index e9d542a..d1989db 100644 --- a/remoting/host/remoting_me2me_host.cc +++ b/remoting/host/remoting_me2me_host.cc @@ -37,6 +37,7 @@ #include "remoting/host/chromoting_host_context.h" #include "remoting/host/chromoting_messages.h" #include "remoting/host/config_file_watcher.h" +#include "remoting/host/constants.h" #include "remoting/host/config_file_watcher.h" #include "remoting/host/desktop_environment_factory.h" #include "remoting/host/dns_blackhole_checker.h" @@ -44,7 +45,6 @@ #include "remoting/host/heartbeat_sender.h" #include "remoting/host/host_config.h" #include "remoting/host/host_event_logger.h" -#include "remoting/host/host_exit_codes.h" #include "remoting/host/host_user_interface.h" #include "remoting/host/json_host_config.h" #include "remoting/host/log_to_server.h" @@ -198,10 +198,10 @@ class HostProcess // the first configuration update. Otherwise, post a task to create new // authenticator factory in case PIN has changed. if (policy_watcher_.get() == NULL) { +#if defined(OS_MACOSX) || defined(OS_WIN) bool want_user_interface = true; -#if defined(OS_LINUX) - want_user_interface = false; -#elif defined(OS_MACOSX) + +#if defined(OS_MACOSX) // Don't try to display any UI on top of the system's login screen as this // is rejected by the Window Server on OS X 10.7.4, and prevents the // capturer from working (http://crbug.com/140984). @@ -209,12 +209,15 @@ class HostProcess // TODO(lambroslambrou): Use a better technique of detecting whether we're // running in the LoginWindow context, and refactor this into a separate // function to be used here and in CurtainMode::ActivateCurtain(). - want_user_interface = getuid() != 0; + if (getuid() == 0) { + want_user_interface = false; + } #endif // OS_MACOSX if (want_user_interface) { host_user_interface_.reset(new HostUserInterface(context_.get())); } +#endif // OS_MACOSX || OS_WIN StartWatchingPolicy(); } else { @@ -237,6 +240,7 @@ class HostProcess void StartWatchingConfigChanges() { #if !defined(REMOTING_MULTI_PROCESS) + // Start watching the host configuration file. config_watcher_.reset(new ConfigFileWatcher(context_->ui_task_runner(), context_->file_task_runner(), @@ -245,13 +249,13 @@ class HostProcess #endif // !defined(REMOTING_MULTI_PROCESS) } - void ListenForShutdownSignal() { #if defined(OS_POSIX) + void ListenForShutdownSignal() { remoting::RegisterSignalHandler( SIGTERM, base::Bind(&HostProcess::SigTermHandler, base::Unretained(this))); -#endif // OS_POSIX } +#endif // OS_POSIX void CreateAuthenticatorFactory() { DCHECK(context_->network_task_runner()->BelongsToCurrentThread()); @@ -294,10 +298,12 @@ class HostProcess return; } +#if defined(OS_POSIX) context_->network_task_runner()->PostTask( FROM_HERE, base::Bind(&HostProcess::ListenForShutdownSignal, base::Unretained(this))); +#endif // OS_POSIX StartWatchingConfigChanges(); } @@ -308,10 +314,15 @@ class HostProcess void ShutdownHostProcess() { DCHECK(context_->ui_task_runner()->BelongsToCurrentThread()); +#if !defined(REMOTING_MULTI_PROCESS) config_watcher_.reset(); +#endif // !defined(REMOTING_MULTI_PROCESS) daemon_channel_.reset(); + +#if defined(OS_MACOSX) || defined(OS_WIN) host_user_interface_.reset(); +#endif if (policy_watcher_.get()) { base::WaitableEvent done_event(true, false); @@ -570,11 +581,13 @@ class HostProcess new LogToServer(host_, ServerLogEntry::ME2ME, signal_strategy_.get())); host_event_logger_ = HostEventLogger::Create(host_, kApplicationName); +#if defined(OS_MACOSX) || defined(OS_WIN) if (host_user_interface_.get()) { host_user_interface_->Start( host_, base::Bind(&HostProcess::OnDisconnectRequested, base::Unretained(this))); } +#endif host_->Start(xmpp_login_); @@ -662,8 +675,10 @@ class HostProcess scoped_ptr<net::NetworkChangeNotifier> network_change_notifier_; JsonHostConfig config_; +#if !defined(REMOTING_MULTI_PROCESS) FilePath host_config_path_; scoped_ptr<ConfigFileWatcher> config_watcher_; +#endif // !defined(REMOTING_MULTI_PROCESS) std::string host_id_; HostKeyPair key_pair_; @@ -689,7 +704,9 @@ class HostProcess scoped_ptr<LogToServer> log_to_server_; scoped_ptr<HostEventLogger> host_event_logger_; +#if defined(OS_MACOSX) || defined(OS_WIN) scoped_ptr<HostUserInterface> host_user_interface_; +#endif scoped_refptr<ChromotingHost> host_; diff --git a/remoting/host/signaling_connector.cc b/remoting/host/signaling_connector.cc index 9a12968..960c015 100644 --- a/remoting/host/signaling_connector.cc +++ b/remoting/host/signaling_connector.cc @@ -8,6 +8,7 @@ #include "base/callback.h" #include "net/url_request/url_fetcher.h" #include "remoting/host/chromoting_host_context.h" +#include "remoting/host/constants.h" #include "remoting/host/dns_blackhole_checker.h" #include "remoting/host/url_request_context.h" diff --git a/remoting/host/simple_host_process.cc b/remoting/host/simple_host_process.cc index bef1447..8d11db0 100644 --- a/remoting/host/simple_host_process.cc +++ b/remoting/host/simple_host_process.cc @@ -37,13 +37,13 @@ #include "remoting/host/audio_capturer.h" #include "remoting/host/chromoting_host_context.h" #include "remoting/host/chromoting_host.h" +#include "remoting/host/constants.h" #include "remoting/host/desktop_environment.h" -#include "remoting/host/desktop_environment.h" -#include "remoting/host/desktop_environment_factory.h" #include "remoting/host/dns_blackhole_checker.h" #include "remoting/host/event_executor.h" +#include "remoting/host/desktop_environment.h" +#include "remoting/host/desktop_environment_factory.h" #include "remoting/host/heartbeat_sender.h" -#include "remoting/host/host_exit_codes.h" #include "remoting/host/host_key_pair.h" #include "remoting/host/host_secret.h" #include "remoting/host/it2me_host_user_interface.h" diff --git a/remoting/host/usage_stats_consent_win.cc b/remoting/host/usage_stats_consent_win.cc index fa7345b..f0d0a1d 100644 --- a/remoting/host/usage_stats_consent_win.cc +++ b/remoting/host/usage_stats_consent_win.cc @@ -10,7 +10,7 @@ #include "base/logging.h" #include "base/stringprintf.h" #include "base/win/registry.h" -#include "remoting/host/win/omaha.h" +#include "remoting/host/constants.h" namespace { @@ -42,7 +42,7 @@ LONG ReadUsageStatsValue(const wchar_t* state_key, DWORD* usagestats_out) { namespace remoting { bool GetUsageStatsConsent(bool* allowed, bool* set_by_policy) { - // TODO(alexeypa): report whether the consent is set by policy once + // TODO(alexeypa): report whether the consent is set by pollicy once // supported. *set_by_policy = false; diff --git a/remoting/host/win/omaha.h b/remoting/host/win/omaha.h deleted file mode 100644 index d2d19e5..0000000 --- a/remoting/host/win/omaha.h +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef REMOTING_HOST_WIN_OMAHA_H_ -#define REMOTING_HOST_WIN_OMAHA_H_ - -namespace remoting { - -// The Omaha Appid of the host. -extern const wchar_t kHostOmahaAppid[]; - -} // namespace remoting - -#endif // REMOTING_HOST_WIN_OMAHA_H_ diff --git a/remoting/host/win/wts_session_process_launcher.cc b/remoting/host/win/wts_session_process_launcher.cc index 29d30be..9696098 100644 --- a/remoting/host/win/wts_session_process_launcher.cc +++ b/remoting/host/win/wts_session_process_launcher.cc @@ -28,8 +28,8 @@ #include "ipc/ipc_channel_proxy.h" #include "ipc/ipc_message.h" #include "ipc/ipc_message_macros.h" +#include "remoting/host/constants.h" #include "remoting/host/chromoting_messages.h" -#include "remoting/host/host_exit_codes.h" #include "remoting/host/win/launch_process_with_token.h" #include "remoting/host/win/wts_console_monitor.h" diff --git a/remoting/remoting.gyp b/remoting/remoting.gyp index 8aca355..9f01d58 100644 --- a/remoting/remoting.gyp +++ b/remoting/remoting.gyp @@ -593,10 +593,11 @@ 'host/chromoting_messages.h', 'host/config_file_watcher.cc', 'host/config_file_watcher.h', + 'host/constants.h', + 'host/constants_win.cc', 'host/daemon_process.cc', 'host/daemon_process.h', 'host/daemon_process_win.cc', - 'host/host_exit_codes.h', 'host/usage_stats_consent.h', 'host/usage_stats_consent_win.cc', 'host/win/host_service.cc', @@ -945,6 +946,8 @@ 'base/breakpad_linux.cc', 'base/breakpad_mac.mm', 'base/breakpad_win.cc', + 'host/constants.h', + 'host/constants_win.cc', ], 'conditions': [ ['OS=="win"', { @@ -1082,8 +1085,6 @@ 'host/plugin/host_plugin_utils.h', 'host/plugin/host_script_object.cc', 'host/plugin/host_script_object.h', - 'host/win/omaha.cc', - 'host/win/omaha.h', ], 'conditions': [ ['OS=="mac"', { @@ -1342,8 +1343,10 @@ 'host/clipboard_linux.cc', 'host/clipboard_mac.mm', 'host/clipboard_win.cc', + 'host/constants.h', 'host/constants_mac.cc', 'host/constants_mac.h', + 'host/constants_win.cc', 'host/continue_window.h', 'host/continue_window_gtk.cc', 'host/continue_window_mac.mm', @@ -1371,7 +1374,6 @@ 'host/heartbeat_sender.h', 'host/host_config.cc', 'host/host_config.h', - 'host/host_exit_codes.h', 'host/host_key_pair.cc', 'host/host_key_pair.h', 'host/host_port_allocator.cc', @@ -1444,8 +1446,6 @@ 'host/vlog_net_log.h', 'host/win/desktop.cc', 'host/win/desktop.h', - 'host/win/omaha.cc', - 'host/win/omaha.h', 'host/win/scoped_thread_desktop.cc', 'host/win/scoped_thread_desktop.h', 'host/win/session_desktop_environment_factory.cc', diff --git a/remoting/tools/me2me_virtual_host.py b/remoting/tools/me2me_virtual_host.py index 8485aaf..bace7c9eb 100755 --- a/remoting/tools/me2me_virtual_host.py +++ b/remoting/tools/me2me_virtual_host.py @@ -841,7 +841,7 @@ Web Store: https://chrome.google.com/remotedesktop""" desktop.host_proc = None # These exit-codes must match the ones used by the host. - # See remoting/host/host_error_codes.h. + # See remoting/host/constants.h. # Delete the host or auth configuration depending on the returned error # code, so the next time this script is run, a new configuration # will be created and registered. |