summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--remoting/host/daemon_process_win.cc2
-rw-r--r--remoting/host/desktop_process.cc2
-rw-r--r--remoting/host/dns_blackhole_checker.cc1
-rw-r--r--remoting/host/heartbeat_sender.cc1
-rw-r--r--remoting/host/host_exit_codes.h (renamed from remoting/host/constants.h)19
-rwxr-xr-xremoting/host/installer/mac/PrivilegedHelperTools/org.chromium.chromoting.me2me.sh2
-rw-r--r--remoting/host/plugin/daemon_installer_win.cc2
-rw-r--r--remoting/host/remoting_me2me_host.cc31
-rw-r--r--remoting/host/signaling_connector.cc1
-rw-r--r--remoting/host/simple_host_process.cc6
-rw-r--r--remoting/host/usage_stats_consent_win.cc4
-rw-r--r--remoting/host/win/omaha.cc (renamed from remoting/host/constants_win.cc)4
-rw-r--r--remoting/host/win/omaha.h15
-rw-r--r--remoting/host/win/wts_session_process_launcher.cc2
-rw-r--r--remoting/remoting.gyp12
-rwxr-xr-xremoting/tools/me2me_virtual_host.py2
16 files changed, 46 insertions, 60 deletions
diff --git a/remoting/host/daemon_process_win.cc b/remoting/host/daemon_process_win.cc
index d8588d5..58d1f85 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/constants.h"
+#include "remoting/host/host_exit_codes.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 dd4ed75..77e5410 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/constants.h"
+#include "remoting/host/host_exit_codes.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 fb4ae03..d057123 100644
--- a/remoting/host/dns_blackhole_checker.cc
+++ b/remoting/host/dns_blackhole_checker.cc
@@ -7,7 +7,6 @@
#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 ee63ffd5..167b5e1 100644
--- a/remoting/host/heartbeat_sender.cc
+++ b/remoting/host/heartbeat_sender.cc
@@ -13,7 +13,6 @@
#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/constants.h b/remoting/host/host_exit_codes.h
index e2723b6..546dbd6 100644
--- a/remoting/host/constants.h
+++ b/remoting/host/host_exit_codes.h
@@ -2,17 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef REMOTING_HOST_CONSTANTS_H_
-#define REMOTING_HOST_CONSTANTS_H_
-
-#include "base/compiler_specific.h"
+#ifndef REMOTING_HOST_HOST_EXIT_CODES_H_
+#define REMOTING_HOST_HOST_EXIT_CODES_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.
@@ -33,11 +29,6 @@ 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_CONSTANTS_H_
+#endif // REMOTING_HOST_HOST_EXIT_CODES_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 ea0383b..3337b2e 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/constants.h.
+# constants in sync with remoting/host/host_exit_codes.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 606c1c8..1dd9d99 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/constants.h"
+#include "remoting/host/win/omaha.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 6317b24..ce69d50 100644
--- a/remoting/host/remoting_me2me_host.cc
+++ b/remoting/host/remoting_me2me_host.cc
@@ -37,7 +37,6 @@
#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/desktop_resizer.h"
@@ -46,6 +45,7 @@
#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"
@@ -201,10 +201,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_MACOSX)
+#if defined(OS_LINUX)
+ want_user_interface = false;
+#elif 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).
@@ -212,15 +212,12 @@ 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().
- if (getuid() == 0) {
- want_user_interface = false;
- }
+ want_user_interface = getuid() != 0;
#endif // OS_MACOSX
if (want_user_interface) {
host_user_interface_.reset(new HostUserInterface(context_.get()));
}
-#endif // OS_MACOSX || OS_WIN
StartWatchingPolicy();
} else {
@@ -243,7 +240,6 @@ 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(),
@@ -252,13 +248,13 @@ class HostProcess
#endif // !defined(REMOTING_MULTI_PROCESS)
}
-#if defined(OS_POSIX)
void ListenForShutdownSignal() {
+#if defined(OS_POSIX)
remoting::RegisterSignalHandler(
SIGTERM,
base::Bind(&HostProcess::SigTermHandler, base::Unretained(this)));
- }
#endif // OS_POSIX
+ }
void CreateAuthenticatorFactory() {
DCHECK(context_->network_task_runner()->BelongsToCurrentThread());
@@ -301,12 +297,10 @@ 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();
}
@@ -317,15 +311,10 @@ 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);
@@ -589,13 +578,11 @@ class HostProcess
resizing_host_observer_.reset(
new ResizingHostObserver(desktop_resizer_.get(), host_));
-#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_);
@@ -689,10 +676,8 @@ 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_;
@@ -720,9 +705,7 @@ 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 960c015..9a12968 100644
--- a/remoting/host/signaling_connector.cc
+++ b/remoting/host/signaling_connector.cc
@@ -8,7 +8,6 @@
#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 8d11db0..bef1447 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/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/dns_blackhole_checker.h"
+#include "remoting/host/event_executor.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 f0d0a1d..fa7345b 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/constants.h"
+#include "remoting/host/win/omaha.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 pollicy once
+ // TODO(alexeypa): report whether the consent is set by policy once
// supported.
*set_by_policy = false;
diff --git a/remoting/host/constants_win.cc b/remoting/host/win/omaha.cc
index 2df3e63..2b1a31d 100644
--- a/remoting/host/constants_win.cc
+++ b/remoting/host/win/omaha.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/constants.h"
+#include "remoting/host/win/omaha.h"
namespace remoting {
// The Omaha Appid of the host. It should be kept in sync with $(var.OmahaAppid)
-// defined in remoting/host/installer/chromoting.wxs and the Omaha server
+// defined in remoting/host/win/chromoting.wxs and the Omaha server
// configuration.
const wchar_t kHostOmahaAppid[] = L"{b210701e-ffc4-49e3-932b-370728c72662}";
diff --git a/remoting/host/win/omaha.h b/remoting/host/win/omaha.h
new file mode 100644
index 0000000..d2d19e5
--- /dev/null
+++ b/remoting/host/win/omaha.h
@@ -0,0 +1,15 @@
+// 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 9696098..29d30be 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 5ff1b86..92180ae 100644
--- a/remoting/remoting.gyp
+++ b/remoting/remoting.gyp
@@ -593,11 +593,10 @@
'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',
@@ -606,6 +605,8 @@
'host/win/host_service_resource.h',
'host/win/launch_process_with_token.cc',
'host/win/launch_process_with_token.h',
+ 'host/win/omaha.cc',
+ 'host/win/omaha.h',
'host/win/worker_process_launcher.cc',
'host/win/worker_process_launcher.h',
'host/win/wts_console_monitor.h',
@@ -902,8 +903,6 @@
'base/breakpad_linux.cc',
'base/breakpad_mac.mm',
'base/breakpad_win.cc',
- 'host/constants.h',
- 'host/constants_win.cc',
],
'conditions': [
['OS=="win"', {
@@ -1299,10 +1298,8 @@
'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',
@@ -1334,6 +1331,7 @@
'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',
@@ -1410,6 +1408,8 @@
'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 bace7c9eb..8485aaf 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/constants.h.
+ # See remoting/host/host_error_codes.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.