Commit 9063bcd9 authored by Alex Gough's avatar Alex Gough Committed by Commit Bot

Allow cloud print service to initialize broker.

Bug: 1102447
Change-Id: I9f19ff9903a88fa0ff01fa1c7f42e2772e49baa8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2298039Reviewed-by: default avatarLei Zhang <thestig@chromium.org>
Commit-Queue: Alex Gough <ajgo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#788365}
parent 55bc3e46
......@@ -133,12 +133,14 @@ int MainDllLoader::Launch(HINSTANCE instance,
// Initialize the sandbox services.
sandbox::SandboxInterfaceInfo sandbox_info = {0};
const bool is_browser = process_type_.empty();
const bool is_cloud_print_service =
process_type_ == switches::kCloudPrintServiceProcess;
// IsUnsandboxedSandboxType() can't be used here because its result can be
// gated behind a feature flag, which are not yet initialized.
const bool is_sandboxed =
sandbox::policy::SandboxTypeFromCommandLine(cmd_line) !=
sandbox::policy::SandboxType::kNoSandbox;
if (is_browser || is_sandboxed) {
if (is_browser || is_cloud_print_service || is_sandboxed) {
// For child processes that are running as --no-sandbox, don't initialize
// the sandbox info, otherwise they'll be treated as brokers (as if they
// were the browser).
......
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