summaryrefslogtreecommitdiffstats
path: root/remoting/host/setup
diff options
context:
space:
mode:
authorweitaosu@chromium.org <weitaosu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-28 05:22:00 +0000
committerweitaosu@chromium.org <weitaosu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-28 05:22:00 +0000
commit1a9acf64f5b033cbe0c3d1a3d88f647bedbadc41 (patch)
treec6bad661a2da146c30ea75d244835c3211944ba3 /remoting/host/setup
parent897435b14d716f8a90edf96ce9de3309d4e2e5c1 (diff)
downloadchromium_src-1a9acf64f5b033cbe0c3d1a3d88f647bedbadc41.zip
chromium_src-1a9acf64f5b033cbe0c3d1a3d88f647bedbadc41.tar.gz
chromium_src-1a9acf64f5b033cbe0c3d1a3d88f647bedbadc41.tar.bz2
Add breakpad support for me2me and it2me native messaging host on Mac.
Changes in this CL include: 1. Initialize breakpad in it2me native messaging host 2. Create bundles for it2me and me2me native messaging hosts and move them out of the me2me host bundle (and update the manifests accordingly). 3. Dump symbols of the it2me and me2me native messaging hosts 4. Sign the me2me and it2me native messaging hosts 4. Rename the me2me host bundle and the prefPane bundle to get rid of the internal chromium/chromoting names and to conform to Mac convention 5. Refactor GYP, build-installer-archive.py, and do_signing.sh, etc to use name constants from branding_chrome and branding_chromium instead of hard coded names. This ensures that all the name constants are defined in a central location and reduces duplicate name definitions. Here are the names of the host bundles: me2me host: old name: org.chromium.chromoting.me2me_host new name: ChromeRemoteDesktop.Host Pref pane: old name: org.chromium.chromoting.prefPane new name: ChromeRemoteDesktop.prefPane it2me nm host: name: NativeMessagingHost Full Path: /Library/Google/ChromeRemoteDesktop/NativeMessagingHost.app me2me nm host: name: RemoteAssistanceHost Full path: /Library/Google/ChromeRemoteDesktop/RemoteAssistanceHost.app BUG= Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=259287 Review URL: https://codereview.chromium.org/186763004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@260075 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host/setup')
-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
3 files changed, 57 insertions, 0 deletions
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 %}";