Skip to content

Commit

Permalink
[remoting mac] Completely remove pref-pane.
Browse files Browse the repository at this point in the history
This purges the remoting pref-pane from the codebase. The only
remaining reference is in the preflight install script which
removes the pref-pane from the system.

Bug: 751287
Change-Id: I65e97e9c81263a8cee5d0a71c4dcf8fe351f86af
Reviewed-on: https://chromium-review.googlesource.com/612620
Reviewed-by: Jamie Walch <jamiewalch@chromium.org>
Commit-Queue: Lambros Lambrou <lambroslambrou@chromium.org>
Cr-Commit-Position: refs/heads/master@{#494163}
  • Loading branch information
Lambros Lambrou authored and Commit Bot committed Aug 14, 2017
1 parent c66796a commit 53f3dd0
Show file tree
Hide file tree
Showing 25 changed files with 16 additions and 1,257 deletions.
2 changes: 0 additions & 2 deletions remoting/branding_Chrome
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ MAC_HOST_BUNDLE_NAME=ChromeRemoteDesktopHost.bundle
MAC_HOST_PACKAGE_NAME=Chrome Remote Desktop Host
MAC_NATIVE_MESSAGING_HOST_BUNDLE_ID=com.google.chrome.remote_desktop.native-messaging-host
MAC_NATIVE_MESSAGING_HOST_BUNDLE_NAME=NativeMessagingHost.bundle
MAC_PREFPANE_BUNDLE_ID=com.google.chromeremotedesktop.preferences
MAC_PREFPANE_BUNDLE_NAME=ChromeRemoteDesktop.prefPane
MAC_REMOTE_ASSISTANCE_HOST_BUNDLE_ID=com.google.chrome.remote_desktop.remote-assistance-host
MAC_REMOTE_ASSISTANCE_HOST_BUNDLE_NAME=RemoteAssistanceHost.bundle
MAC_UNINSTALLER_BUNDLE_ID=com.google.chromeremotedesktop.me2me-host-uninstaller
Expand Down
2 changes: 0 additions & 2 deletions remoting/branding_Chromium
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ MAC_HOST_BUNDLE_NAME=ChromotingHost.bundle
MAC_HOST_PACKAGE_NAME=Chromoting Host
MAC_NATIVE_MESSAGING_HOST_BUNDLE_ID=org.chromium.chromoting.native-messaging-host
MAC_NATIVE_MESSAGING_HOST_BUNDLE_NAME=NativeMessagingHost.bundle
MAC_PREFPANE_BUNDLE_ID=org.chromium.remoting.preferences
MAC_PREFPANE_BUNDLE_NAME=Chromoting.prefPane
MAC_REMOTE_ASSISTANCE_HOST_BUNDLE_ID=org.chromium.chromoting.remote-assistance-host
MAC_REMOTE_ASSISTANCE_HOST_BUNDLE_NAME=RemoteAssistanceHost.bundle
MAC_UNINSTALLER_BUNDLE_ID=org.chromium.chromoting.me2me-host-uninstaller
Expand Down
2 changes: 0 additions & 2 deletions remoting/host/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ static_library("host") {
"host_change_notification_listener.h",
"host_config.cc",
"host_config.h",
"host_config_constants.cc",
"host_details.cc",
"host_details.h",
"host_event_logger.h",
Expand Down Expand Up @@ -672,7 +671,6 @@ if (enable_remoting_host) {
sources = [
"installer/mac/uninstaller/remoting_uninstaller-InfoPlist.strings.jinja2",
"it2me/remote_assistance_host-InfoPlist.strings.jinja2",
"mac/me2me_preference_pane-InfoPlist.strings.jinja2",
"remoting_me2me_host-InfoPlist.strings.jinja2",
"setup/native_messaging_host-InfoPlist.strings.jinja2",
]
Expand Down
14 changes: 14 additions & 0 deletions remoting/host/host_config.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,20 @@

namespace remoting {

const char kHostEnabledConfigPath[] = "enabled";
const char kHostOwnerConfigPath[] = "host_owner";
const char kHostOwnerEmailConfigPath[] = "host_owner_email";
const char kXmppLoginConfigPath[] = "xmpp_login";
const char kOAuthRefreshTokenConfigPath[] = "oauth_refresh_token";
const char kHostIdConfigPath[] = "host_id";
const char kHostNameConfigPath[] = "host_name";
const char kHostSecretHashConfigPath[] = "host_secret_hash";
const char kPrivateKeyConfigPath[] = "private_key";
const char kUsageStatsConsentConfigPath[] = "usage_stats_consent";
const char kEnableVp9ConfigPath[] = "enable_vp9";
const char kEnableH264ConfigPath[] = "enable_h264";
const char kFrameRecorderBufferKbConfigPath[] = "frame-recorder-buffer-kb";

std::unique_ptr<base::DictionaryValue> HostConfigFromJson(
const std::string& json) {
std::unique_ptr<base::Value> value =
Expand Down
26 changes: 0 additions & 26 deletions remoting/host/host_config_constants.cc

This file was deleted.

122 changes: 1 addition & 121 deletions remoting/host/mac/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@
import("//remoting/build/config/remoting_build.gni")

source_set("constants") {
defines = [
"HOST_BUNDLE_NAME=\"" + host_bundle_name + "\"",
"PREFPANE_BUNDLE_NAME=\"" + prefpane_bundle_name + "\"",
]
defines = [ "HOST_BUNDLE_NAME=\"" + host_bundle_name + "\"" ]

sources = [
"constants_mac.cc",
Expand Down Expand Up @@ -99,25 +96,6 @@ target("mac_app_bundle", "remoting_me2me_host") {
]
}

create_bundle("remoting_host_prefpane.prefPane") {
bundle_root_dir = "$root_build_dir/$target_name/Contents"
bundle_resources_dir = bundle_root_dir + "/Resources"
bundle_executable_dir = bundle_root_dir + "/MacOS"

deps = [
":remoting_host_prefpane",
":remoting_host_prefpane_bundle_data",
":remoting_host_prefpane_plist_bundle_data",
":remoting_host_prefpane_resources",
":remoting_host_prefpane_xibs",
"//remoting/host:remoting_infoplist_strings",
]

foreach(locale, remoting_locales_with_underscores) {
deps += [ ":remoting_host_prefpane_strings_${locale}_bundle_data" ]
}
}

foreach(locale, remoting_locales_with_underscores) {
bundle_data("remoting_host_locale_${locale}_bundle_data") {
sources = [
Expand All @@ -132,28 +110,6 @@ foreach(locale, remoting_locales_with_underscores) {
}
}

bundle_data("remoting_host_prefpane_bundle_data") {
deps = [
":remoting_host_prefpane",
]
sources = [
"$root_build_dir/gen/remoting/host/remoting_host_prefpane",
]
outputs = [
"{{bundle_executable_dir}}/{{source_file_part}}",
]
}

bundle_data("remoting_host_prefpane_resources") {
sources = [
"//remoting/resources/chromoting128.png",
]

outputs = [
"{{bundle_resources_dir}}/{{source_file_part}}",
]
}

# native_messaging_host-InfoPlist.strings
foreach(locale, remoting_locales_with_underscores) {
bundle_data("native_messaging_host_strings_${locale}_bundle_data") {
Expand Down Expand Up @@ -226,79 +182,3 @@ target("mac_app_bundle", "remoting_native_messaging_host") {
[ "VERSION=" + "$chrome_version_major" + "." + "$remoting_version_patch" +
"." + "$chrome_version_build" + "." + "$chrome_version_patch" ]
}

loadable_module("remoting_host_prefpane") {
output_dir = "$root_out_dir/gen/remoting/host"
output_extension = ""

sources = [
"me2me_preference_pane.h",
"me2me_preference_pane.mm",
"me2me_preference_pane_confirm_pin.h",
"me2me_preference_pane_confirm_pin.mm",
"me2me_preference_pane_disable.h",
"me2me_preference_pane_disable.mm",
]

libs = [
"Cocoa.framework",
"CoreFoundation.framework",
"PreferencePanes.framework",
"Security.framework",
]

deps = [
":constants",
"//remoting/base",
"//remoting/host:host",
"//remoting/host:remoting_infoplist_strings",
"//remoting/resources:copy_locales",
"//third_party/jsoncpp",
]
foreach(locale, remoting_locales_with_underscores) {
deps += [ ":remoting_host_prefpane_strings_${locale}_bundle_data" ]
}
}

mac_info_plist("remoting_host_prefpane_plist") {
info_plist = "me2me_preference_pane-Info.plist"
extra_substitutions = [
"BUNDLE_ID=$prefpane_bundle_id",
"VERSION_FULL=$remoting_version_full",
"VERSION_SHORT=$remoting_version_short",
"MACOSX_DEPLOYMENT_TARGET=10.7",
]
executable_name = "remoting_host_prefpane"
}

bundle_data("remoting_host_prefpane_plist_bundle_data") {
sources = get_target_outputs(":remoting_host_prefpane_plist")
outputs = [
"{{bundle_root_dir}}/Info.plist",
]
public_deps = [
":remoting_host_prefpane_plist",
]
}

foreach(locale, remoting_locales_with_underscores) {
bundle_data("remoting_host_prefpane_strings_${locale}_bundle_data") {
sources = [
"$root_gen_dir/remoting/host/me2me_preference_pane-InfoPlist.strings/$locale.lproj/InfoPlist.strings",
]
outputs = [
"{{bundle_resources_dir}}/$locale.lproj/{{source_file_part}}",
]
deps = [
"//remoting/host:remoting_infoplist_strings",
]
}
}

mac_xib_bundle_data("remoting_host_prefpane_xibs") {
sources = [
"me2me_preference_pane.xib",
"me2me_preference_pane_confirm_pin.xib",
"me2me_preference_pane_disable.xib",
]
}
4 changes: 0 additions & 4 deletions remoting/host/mac/constants_mac.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,11 @@ namespace remoting {
#define APPLICATIONS_DIR "/Applications/"
#define HELPER_TOOLS_DIR "/Library/PrivilegedHelperTools/"
#define LAUNCH_AGENTS_DIR "/Library/LaunchAgents/"
#define PREFERENCE_PANES_DIR "/Library/PreferencePanes/"
#define LOG_DIR "/var/log/"
#define LOG_CONFIG_DIR "/etc/newsyslog.d/"

const char kServiceName[] = SERVICE_NAME;

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";

Expand Down
13 changes: 0 additions & 13 deletions remoting/host/mac/constants_mac.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,6 @@ namespace remoting {
// The name of the Remoting Host service that is registered with launchd.
extern const char kServiceName[];

// Use separate named notifications for success and failure because sandboxed
// components can't include a dictionary when sending distributed notifications.
// The preferences panel is not yet sandboxed, but err on the side of caution.
// These are #defines because they are used with CFSTR macro, which requires
// string literals.
#define UPDATE_SUCCEEDED_NOTIFICATION_NAME \
"org.chromium.chromoting.update_succeeded"
#define UPDATE_FAILED_NOTIFICATION_NAME "org.chromium.chromoting.update_failed"

// Chromoting's preference pane file.
extern const char kPrefPaneFileName[];
extern const char kPrefPaneFilePath[];

// Use a single configuration file, instead of separate "auth" and "host" files.
// This is because the SetConfigAndStart() API only provides a single
// dictionary, and splitting this into two dictionaries would require
Expand Down
30 changes: 0 additions & 30 deletions remoting/host/mac/me2me_preference_pane-Info.plist

This file was deleted.

This file was deleted.

Loading

0 comments on commit 53f3dd0

Please sign in to comment.