summaryrefslogtreecommitdiffstats
path: root/remoting/host
diff options
context:
space:
mode:
Diffstat (limited to 'remoting/host')
-rw-r--r--remoting/host/constants_mac.cc8
-rw-r--r--remoting/host/installer/linux/Makefile4
-rw-r--r--remoting/host/installer/mac/ChromotingHostService.pkgproj4
-rwxr-xr-xremoting/host/installer/mac/PrivilegedHelperTools/org.chromium.chromoting.me2me.sh8
-rw-r--r--remoting/host/installer/mac/do_signing.props10
-rwxr-xr-xremoting/host/installer/mac/do_signing.sh30
-rw-r--r--remoting/host/it2me/remote_assistance_host-Info.plist36
-rw-r--r--remoting/host/it2me/remote_assistance_host-InfoPlist.strings.jinja21
-rw-r--r--remoting/host/setup/me2me_native_messaging_host_main.cc20
-rw-r--r--remoting/host/setup/native_messaging_host-Info.plist36
-rw-r--r--remoting/host/setup/native_messaging_host-InfoPlist.strings.jinja21
11 files changed, 135 insertions, 23 deletions
diff --git a/remoting/host/constants_mac.cc b/remoting/host/constants_mac.cc
index 7491414..2d98723 100644
--- a/remoting/host/constants_mac.cc
+++ b/remoting/host/constants_mac.cc
@@ -7,6 +7,8 @@
namespace remoting {
#define SERVICE_NAME "org.chromium.chromoting"
+#define PREFPANE_BUNDLE_NAME "ChromeRemoteDesktop.prefPane"
+#define HOST_BUNDLE_NAME "ChromeRemoteDesktopHost.bundle"
#define APPLICATIONS_DIR "/Applications/"
#define HELPER_TOOLS_DIR "/Library/PrivilegedHelperTools/"
@@ -17,14 +19,14 @@ namespace remoting {
const char kServiceName[] = SERVICE_NAME;
-const char kPrefPaneFileName[] = SERVICE_NAME ".prefPane";
-const char kPrefPaneFilePath[] = PREFERENCE_PANES_DIR SERVICE_NAME ".prefPane";
+const char kPrefPaneFileName[] = PREFPANE_BUNDLE_NAME;
+const char kPrefPaneFilePath[] = PREFERENCE_PANES_DIR PREFPANE_BUNDLE_NAME;
const char kHostConfigFileName[] = SERVICE_NAME ".json";
const char kHostConfigFilePath[] = HELPER_TOOLS_DIR SERVICE_NAME ".json";
const char kHostHelperScriptPath[] = HELPER_TOOLS_DIR SERVICE_NAME ".me2me.sh";
-const char kHostBinaryPath[] = HELPER_TOOLS_DIR SERVICE_NAME ".me2me_host.app";
+const char kHostBinaryPath[] = HELPER_TOOLS_DIR HOST_BUNDLE_NAME;
const char kHostEnabledPath[] = HELPER_TOOLS_DIR SERVICE_NAME ".me2me_enabled";
const char kServicePlistPath[] = LAUNCH_AGENTS_DIR SERVICE_NAME ".plist";
diff --git a/remoting/host/installer/linux/Makefile b/remoting/host/installer/linux/Makefile
index ee29505..f136621 100644
--- a/remoting/host/installer/linux/Makefile
+++ b/remoting/host/installer/linux/Makefile
@@ -16,9 +16,9 @@ ME2ME_PROGNAME = $(BUILD_DIR)/remoting_me2me_host
ME2ME_DEBUGFILE = $(ME2ME_PROGNAME).debug
START_PROGNAME = $(BUILD_DIR)/remoting_start_host
START_DEBUGFILE = $(START_PROGNAME).debug
-ME2ME_NM_PROGNAME = $(BUILD_DIR)/remoting_native_messaging_host
+ME2ME_NM_PROGNAME = $(BUILD_DIR)/native_messaging_host
ME2ME_NM_DEBUGFILE = $(ME2ME_NM_PROGNAME).debug
-REMOTE_ASSISTANCE_PROGNAME = $(BUILD_DIR)/remoting_it2me_native_messaging_host
+REMOTE_ASSISTANCE_PROGNAME = $(BUILD_DIR)/remote_assistance_host
REMOTE_ASSISTANCE_DEBUGFILE = $(REMOTE_ASSISTANCE_PROGNAME).debug
all:
diff --git a/remoting/host/installer/mac/ChromotingHostService.pkgproj b/remoting/host/installer/mac/ChromotingHostService.pkgproj
index 4da41aa..06fec05 100644
--- a/remoting/host/installer/mac/ChromotingHostService.pkgproj
+++ b/remoting/host/installer/mac/ChromotingHostService.pkgproj
@@ -321,7 +321,7 @@
<key>GID</key>
<integer>0</integer>
<key>PATH</key>
- <string>PreferencePanes/org.chromium.chromoting.prefPane</string>
+ <string>PreferencePanes/@@PREFPANE_BUNDLE_NAME@@</string>
<key>PATH_TYPE</key>
<integer>1</integer>
<key>PERMISSIONS</key>
@@ -404,7 +404,7 @@
<key>GID</key>
<integer>0</integer>
<key>PATH</key>
- <string>PrivilegedHelperTools/org.chromium.chromoting.me2me_host.app</string>
+ <string>PrivilegedHelperTools/@@HOST_BUNDLE_NAME@@</string>
<key>PATH_TYPE</key>
<integer>1</integer>
<key>PERMISSIONS</key>
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 bc3ceec..24a229e 100755
--- a/remoting/host/installer/mac/PrivilegedHelperTools/org.chromium.chromoting.me2me.sh
+++ b/remoting/host/installer/mac/PrivilegedHelperTools/org.chromium.chromoting.me2me.sh
@@ -7,12 +7,14 @@
# Version = @@VERSION@@
NAME=org.chromium.chromoting
+HOST_BUNDLE_NAME=ChromeRemoteDesktopHost.bundle
+PREFPANE_BUNDLE_NAME=ChromeRemoteDesktop.prefPane
CONFIG_DIR=/Library/PrivilegedHelperTools
-HOST_EXE=$CONFIG_DIR/$NAME.me2me_host.app/Contents/MacOS/remoting_me2me_host
-PLIST_FILE=$CONFIG_DIR/$NAME.me2me_host.app/Contents/Info.plist
ENABLED_FILE=$CONFIG_DIR/$NAME.me2me_enabled
CONFIG_FILE=$CONFIG_DIR/$NAME.json
-PREF_PANE_BUNDLE=/Library/PreferencePanes/$NAME.prefPane
+HOST_EXE=$CONFIG_DIR/$HOST_BUNDLE_NAME/Contents/MacOS/remoting_me2me_host
+PLIST_FILE=$CONFIG_DIR/$HOST_BUNDLE_NAME/Contents/Info.plist
+PREF_PANE_BUNDLE=/Library/PreferencePanes/$PREFPANE_BUNDLE_NAME
# The exit code returned by 'wait' when a process is terminated by SIGTERM.
SIGTERM_EXIT_CODE=143
diff --git a/remoting/host/installer/mac/do_signing.props b/remoting/host/installer/mac/do_signing.props
index ac6b07c..d5ecce8 100644
--- a/remoting/host/installer/mac/do_signing.props
+++ b/remoting/host/installer/mac/do_signing.props
@@ -1,4 +1,8 @@
-HOST_UNINSTALLER_NAME=@@HOST_UNINSTALLER_NAME@@
-HOST_PKG=@@HOST_PKG@@
-DMG_VOLUME_NAME=@@DMG_VOLUME_NAME@@
DMG_FILE_NAME=@@DMG_FILE_NAME@@
+DMG_VOLUME_NAME=@@DMG_VOLUME_NAME@@
+HOST_BUNDLE_NAME=@@HOST_BUNDLE_NAME@@
+HOST_PKG=@@HOST_PKG@@
+HOST_UNINSTALLER_NAME=@@HOST_UNINSTALLER_NAME@@
+NATIVE_MESSAGING_HOST_BUNDLE_NAME=@@NATIVE_MESSAGING_HOST_BUNDLE_NAME@@
+PREFPANE_BUNDLE_NAME=@@PREFPANE_BUNDLE_NAME@@
+REMOTE_ASSISTANCE_HOST_BUNDLE_NAME=@@REMOTE_ASSISTANCE_HOST_BUNDLE_NAME@@
diff --git a/remoting/host/installer/mac/do_signing.sh b/remoting/host/installer/mac/do_signing.sh
index ef9b85d..2e756f9 100755
--- a/remoting/host/installer/mac/do_signing.sh
+++ b/remoting/host/installer/mac/do_signing.sh
@@ -30,26 +30,36 @@ setup() {
# Individually load the properties for this build. Don't 'source' the file
# to guard against code accidentally being added to the props file.
- HOST_UNINSTALLER_NAME=$(read_property "HOST_UNINSTALLER_NAME")
- HOST_PKG=$(read_property "HOST_PKG")
DMG_VOLUME_NAME=$(read_property "DMG_VOLUME_NAME")
DMG_FILE_NAME=$(read_property "DMG_FILE_NAME")
+ HOST_BUNDLE_NAME=$(read_property "HOST_BUNDLE_NAME")
+ HOST_PKG=$(read_property "HOST_PKG")
+ HOST_UNINSTALLER_NAME=$(read_property "HOST_UNINSTALLER_NAME")
+ NATIVE_MESSAGING_HOST_BUNDLE_NAME=$(read_property\
+ "NATIVE_MESSAGING_HOST_BUNDLE_NAME")
+ PREFPANE_BUNDLE_NAME=$(read_property "PREFPANE_BUNDLE_NAME")
+ REMOTE_ASSISTANCE_HOST_BUNDLE_NAME=$(read_property\
+ "REMOTE_ASSISTANCE_HOST_BUNDLE_NAME")
# Binaries to sign.
- ME2ME_HOST='PrivilegedHelperTools/org.chromium.chromoting.me2me_host.app'
- ME2ME_NM_HOST="${ME2ME_HOST}/Contents/MacOS/native_messaging_host"
- IT2ME_NM_HOST="${ME2ME_HOST}/Contents/MacOS/remote_assistance_host"
+ ME2ME_HOST="PrivilegedHelperTools/${HOST_BUNDLE_NAME}"
+ ME2ME_NM_HOST="PrivilegedHelperTools/${HOST_BUNDLE_NAME}/Contents/MacOS/"`
+ `"${NATIVE_MESSAGING_HOST_BUNDLE_NAME}/Contents/MacOS/"`
+ `"native_messaging_host"
+ IT2ME_NM_HOST="PrivilegedHelperTools/${HOST_BUNDLE_NAME}/Contents/MacOS/"`
+ `"${REMOTE_ASSISTANCE_HOST_BUNDLE_NAME}/Contents/MacOS/"`
+ `"remote_assistance_host"
UNINSTALLER="Applications/${HOST_UNINSTALLER_NAME}.app"
- PREFPANE='PreferencePanes/org.chromium.chromoting.prefPane'
+ PREFPANE="PreferencePanes/${PREFPANE_BUNDLE_NAME}"
# The Chromoting Host installer is a meta-package that consists of 3
# components:
# * Chromoting Host Service package
# * Chromoting Host Uninstaller package
# * Keystone package (GoogleSoftwareUpdate - for Official builds only)
- PKGPROJ_HOST='ChromotingHost.pkgproj'
- PKGPROJ_HOST_SERVICE='ChromotingHostService.pkgproj'
- PKGPROJ_HOST_UNINSTALLER='ChromotingHostUninstaller.pkgproj'
+ PKGPROJ_HOST="ChromotingHost.pkgproj"
+ PKGPROJ_HOST_SERVICE="ChromotingHostService.pkgproj"
+ PKGPROJ_HOST_UNINSTALLER="ChromotingHostUninstaller.pkgproj"
# Final (user-visible) pkg name.
PKG_FINAL="${HOST_PKG}.pkg"
@@ -93,7 +103,7 @@ shell_safe_path() {
read_property() {
local property="${1}"
local filename="${PROPS_FILENAME}"
- echo `grep "${property}" "${filename}" | tail -n 1 | cut -d "=" -f2-`
+ echo `grep "\<${property}\>=" "${filename}" | tail -n 1 | cut -d "=" -f2-`
}
verify_clean_dir() {
diff --git a/remoting/host/it2me/remote_assistance_host-Info.plist b/remoting/host/it2me/remote_assistance_host-Info.plist
new file mode 100644
index 0000000..f7149131
--- /dev/null
+++ b/remoting/host/it2me/remote_assistance_host-Info.plist
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIconFile</key>
+ <string>remote_assistance_host</string>
+ <key>CFBundleIdentifier</key>
+ <string>BUNDLE_ID</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>remote_assistance_host</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>VERSION_FULL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>VERSION_SHORT</string>
+ <key>LSMinimumSystemVersion</key>
+ <string>${MACOSX_DEPLOYMENT_TARGET}.0</string>
+ <key>NSPrincipalClass</key>
+ <string>CrApplication</string>
+ <key>LSUIElement</key>
+ <string>1</string>
+ <key>BreakpadProduct</key>
+ <string>Chromoting_Mac</string>
+ <key>BreakpadVersion</key>
+ <string>VERSION_FULL</string>
+</dict>
+</plist>
diff --git a/remoting/host/it2me/remote_assistance_host-InfoPlist.strings.jinja2 b/remoting/host/it2me/remote_assistance_host-InfoPlist.strings.jinja2
new file mode 100644
index 0000000..4a650d8
--- /dev/null
+++ b/remoting/host/it2me/remote_assistance_host-InfoPlist.strings.jinja2
@@ -0,0 +1 @@
+NSHumanReadableCopyright = "{% trans %}COPYRIGHT{% endtrans %}";
diff --git a/remoting/host/setup/me2me_native_messaging_host_main.cc b/remoting/host/setup/me2me_native_messaging_host_main.cc
index 59f198b..5e0e0e2 100644
--- a/remoting/host/setup/me2me_native_messaging_host_main.cc
+++ b/remoting/host/setup/me2me_native_messaging_host_main.cc
@@ -10,10 +10,16 @@
#include "base/run_loop.h"
#include "base/strings/string_number_conversions.h"
#include "net/url_request/url_fetcher.h"
+#include "remoting/base/breakpad.h"
#include "remoting/host/host_exit_codes.h"
#include "remoting/host/logging.h"
#include "remoting/host/pairing_registry_delegate.h"
#include "remoting/host/setup/me2me_native_messaging_host.h"
+#include "remoting/host/usage_stats_consent.h"
+
+#if defined(OS_MACOSX)
+#include "base/mac/scoped_nsautorelease_pool.h"
+#endif // defined(OS_MACOSX)
#if defined(OS_WIN)
#include "base/win/registry.h"
@@ -54,6 +60,20 @@ bool IsProcessElevated() {
#endif // defined(OS_WIN)
int StartMe2MeNativeMessagingHost() {
+#if defined(OS_MACOSX)
+ // Needed so we don't leak objects when threads are created.
+ base::mac::ScopedNSAutoreleasePool pool;
+#endif // defined(OS_MACOSX)
+
+#if defined(REMOTING_ENABLE_BREAKPAD)
+ // Initialize Breakpad as early as possible. On Mac the command-line needs to
+ // be initialized first, so that the preference for crash-reporting can be
+ // looked up in the config file.
+ if (IsUsageStatsAllowed()) {
+ InitializeCrashReporting();
+ }
+#endif // defined(REMOTING_ENABLE_BREAKPAD)
+
// Mac OS X requires that the main thread be a UI message loop in order to
// receive distributed notifications from the System Preferences pane. An
// IO thread is needed for the pairing registry and URL context getter.
diff --git a/remoting/host/setup/native_messaging_host-Info.plist b/remoting/host/setup/native_messaging_host-Info.plist
new file mode 100644
index 0000000..fe01256
--- /dev/null
+++ b/remoting/host/setup/native_messaging_host-Info.plist
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIconFile</key>
+ <string>native_messaging_host</string>
+ <key>CFBundleIdentifier</key>
+ <string>BUNDLE_ID</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>native_messaging_host</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>VERSION_FULL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>VERSION_SHORT</string>
+ <key>LSMinimumSystemVersion</key>
+ <string>${MACOSX_DEPLOYMENT_TARGET}.0</string>
+ <key>NSPrincipalClass</key>
+ <string>CrApplication</string>
+ <key>LSUIElement</key>
+ <string>1</string>
+ <key>BreakpadProduct</key>
+ <string>Chromoting_Mac</string>
+ <key>BreakpadVersion</key>
+ <string>VERSION_FULL</string>
+</dict>
+</plist>
diff --git a/remoting/host/setup/native_messaging_host-InfoPlist.strings.jinja2 b/remoting/host/setup/native_messaging_host-InfoPlist.strings.jinja2
new file mode 100644
index 0000000..4a650d8
--- /dev/null
+++ b/remoting/host/setup/native_messaging_host-InfoPlist.strings.jinja2
@@ -0,0 +1 @@
+NSHumanReadableCopyright = "{% trans %}COPYRIGHT{% endtrans %}";