1 // Copyright 2013 The Chromium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #include "base/process/launch.h" 6 #include "build/build_config.h" 7 8 #if BUILDFLAG(IS_MAC) || (BUILDFLAG(IS_IOS) && BUILDFLAG(USE_BLINK)) 9 #include "base/mac/mach_port_rendezvous.h" 10 #endif 11 12 namespace base { 13 14 LaunchOptions::LaunchOptions() = default; 15 16 LaunchOptions::LaunchOptions(const LaunchOptions& other) = default; 17 18 LaunchOptions::~LaunchOptions() = default; 19 LaunchOptionsForTest()20LaunchOptions LaunchOptionsForTest() { 21 LaunchOptions options; 22 #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) 23 // To prevent accidental privilege sharing to an untrusted child, processes 24 // are started with PR_SET_NO_NEW_PRIVS. Do not set that here, since this 25 // new child will be used for testing only. 26 options.allow_new_privs = true; 27 #endif 28 return options; 29 } 30 31 } // namespace base 32