Commit 13da0355 authored by Lambros Lambrou's avatar Lambros Lambrou Committed by Commit Bot

Use correct IT2Me bundle name in permissions wizard.

This updates host code to reference the IT2Me bundle name from
branding_Chrome instead of hardcoding it.

Bug: 1015201
Change-Id: Ib3738b3716d5457fdc9a6812027ad2b468fbcf4b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1919905
Auto-Submit: Lambros Lambrou <lambroslambrou@chromium.org>
Commit-Queue: Gary Kacmarcik <garykac@chromium.org>
Reviewed-by: default avatarGary Kacmarcik <garykac@chromium.org>
Cr-Commit-Position: refs/heads/master@{#715938}
parent 5fc24a75
...@@ -21,17 +21,19 @@ PermissionChecker::PermissionChecker( ...@@ -21,17 +21,19 @@ PermissionChecker::PermissionChecker(
PermissionChecker::~PermissionChecker() = default; PermissionChecker::~PermissionChecker() = default;
std::string PermissionChecker::GetBundleName() { std::string PermissionChecker::GetBundleName() {
std::string host_bundle;
if (mode_ == HostMode::ME2ME) { if (mode_ == HostMode::ME2ME) {
std::string host_bundle(HOST_BUNDLE_NAME); host_bundle = HOST_BUNDLE_NAME;
} else {
// Strip off the ".app" suffix. host_bundle = REMOTE_ASSISTANCE_HOST_BUNDLE_NAME;
auto dot_position = host_bundle.rfind('.');
if (dot_position != std::string::npos) {
host_bundle = host_bundle.substr(0, dot_position);
}
return host_bundle;
} }
return "remote_assistance_host";
// Strip off the ".app" suffix.
auto dot_position = host_bundle.rfind('.');
if (dot_position != std::string::npos) {
host_bundle = host_bundle.substr(0, dot_position);
}
return host_bundle;
} }
void PermissionChecker::CheckAccessibilityPermission( void PermissionChecker::CheckAccessibilityPermission(
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include "base/process/launch.h" #include "base/process/launch.h"
#include "base/process/process.h" #include "base/process/process.h"
#include "remoting/host/mac/constants_mac.h" #include "remoting/host/mac/constants_mac.h"
#include "remoting/host/version.h"
namespace remoting { namespace remoting {
namespace mac { namespace mac {
...@@ -23,8 +24,8 @@ base::FilePath GetHostExePath(HostMode mode) { ...@@ -23,8 +24,8 @@ base::FilePath GetHostExePath(HostMode mode) {
if (mode == HostMode::ME2ME) if (mode == HostMode::ME2ME)
return host_path.Append("remoting_me2me_host"); return host_path.Append("remoting_me2me_host");
return host_path.Append( return host_path.Append(REMOTE_ASSISTANCE_HOST_BUNDLE_NAME)
"RemoteAssistanceHost.app/Contents/MacOS/remote_assistance_host"); .Append("Contents/MacOS/remote_assistance_host");
} }
bool CheckHostPermission(base::FilePath exe_path, std::string command_switch) { bool CheckHostPermission(base::FilePath exe_path, std::string command_switch) {
......
...@@ -12,6 +12,8 @@ ...@@ -12,6 +12,8 @@
#if defined(OS_MACOSX) #if defined(OS_MACOSX)
#define HOST_BUNDLE_NAME "@MAC_HOST_BUNDLE_NAME@" #define HOST_BUNDLE_NAME "@MAC_HOST_BUNDLE_NAME@"
#define REMOTE_ASSISTANCE_HOST_BUNDLE_NAME \
"@MAC_REMOTE_ASSISTANCE_HOST_BUNDLE_NAME@"
#endif // defined(OS_MACOSX) #endif // defined(OS_MACOSX)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment