Push API: Fix unsubscribing from GCM on Android
[chromium-blink-merge.git] / base / process / launch.cc
blob1c752bd343a945bbab9efda4984d210017183b0d
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.
5 #include "base/process/launch.h"
7 namespace base {
9 LaunchOptions::LaunchOptions()
10 : wait(false),
11 #if defined(OS_WIN)
12 start_hidden(false),
13 handles_to_inherit(NULL),
14 inherit_handles(false),
15 as_user(NULL),
16 empty_desktop_name(false),
17 job_handle(NULL),
18 stdin_handle(NULL),
19 stdout_handle(NULL),
20 stderr_handle(NULL),
21 force_breakaway_from_job_(false)
22 #else
23 clear_environ(false),
24 fds_to_remap(NULL),
25 maximize_rlimits(NULL),
26 new_process_group(false)
27 #if defined(OS_LINUX)
28 , clone_flags(0)
29 , allow_new_privs(false)
30 #endif // OS_LINUX
31 #if defined(OS_POSIX)
32 , pre_exec_delegate(NULL)
33 #endif // OS_POSIX
34 #if defined(OS_CHROMEOS)
35 , ctrl_terminal_fd(-1)
36 #endif // OS_CHROMEOS
37 #endif // !defined(OS_WIN)
41 LaunchOptions::~LaunchOptions() {
44 LaunchOptions LaunchOptionsForTest() {
45 LaunchOptions options;
46 #if defined(OS_LINUX)
47 // To prevent accidental privilege sharing to an untrusted child, processes
48 // are started with PR_SET_NO_NEW_PRIVS. Do not set that here, since this
49 // new child will be used for testing only.
50 options.allow_new_privs = true;
51 #endif
52 return options;
55 } // namespace base