• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
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 namespace base {
9 
10 LaunchOptions::LaunchOptions() = default;
11 
12 LaunchOptions::LaunchOptions(const LaunchOptions& other) = default;
13 
14 LaunchOptions::~LaunchOptions() = default;
15 
LaunchOptionsForTest()16 LaunchOptions LaunchOptionsForTest() {
17   LaunchOptions options;
18 #if defined(OS_LINUX)
19   // To prevent accidental privilege sharing to an untrusted child, processes
20   // are started with PR_SET_NO_NEW_PRIVS. Do not set that here, since this
21   // new child will be used for testing only.
22   options.allow_new_privs = true;
23 #endif
24   return options;
25 }
26 
27 }  // namespace base
28