Commit c5a8dfe6 authored by Lambros Lambrou's avatar Lambros Lambrou Committed by Commit Bot

Remove permission-checks at host startup on MacOS 10.15+

The host permissions are already checked by the permission-wizard,
before the Me2Me service helper starts the host binary. So there is no
need to show the old dialog prompts here, particularly when the
screen-capture heuristic may sometimes give false negatives.

Bug: 1047528
Change-Id: I52c4c4ddec92cfe0db208ce82487cd9bda99ad74
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2032408
Commit-Queue: Lambros Lambrou <lambroslambrou@chromium.org>
Commit-Queue: Jamie Walch <jamiewalch@chromium.org>
Auto-Submit: Lambros Lambrou <lambroslambrou@chromium.org>
Reviewed-by: default avatarJamie Walch <jamiewalch@chromium.org>
Cr-Commit-Position: refs/heads/master@{#737141}
parent 0ac23411
......@@ -1556,14 +1556,10 @@ void HostProcess::StartHost() {
#if defined(OS_MACOSX)
// Don't run the permission-checks as root (i.e. at the login screen), as they
// are not actionable there.
if (getuid() != 0U) {
// Capture a single screen image to trigger OS permission checks which will
// add our binary to the list of apps that can be granted permission. This
// is only needed for OS X 10.15 and later.
if (base::mac::IsAtLeastOS10_15()) {
DesktopCapturerChecker().TriggerSingleCapture();
}
// Also, the permission-checks are not needed on MacOS 10.15+, as they are
// always handled by the new permission-wizard (the old shell script is
// never used on 10.15+).
if (getuid() != 0U && base::mac::IsAtMostOS10_14()) {
mac::PromptUserToChangeTrustStateIfNeeded(context_->ui_task_runner());
}
#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