| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/zygote/zygote_main.h" | 5 #include "content/zygote/zygote_main.h" |
| 6 | 6 |
| 7 #include <dlfcn.h> | 7 #include <dlfcn.h> |
| 8 #include <fcntl.h> | 8 #include <fcntl.h> |
| 9 #include <openssl/rand.h> | 9 #include <openssl/rand.h> |
| 10 #include <pthread.h> | 10 #include <pthread.h> |
| 11 #include <signal.h> | 11 #include <signal.h> |
| 12 #include <stddef.h> |
| 13 #include <stdint.h> |
| 12 #include <string.h> | 14 #include <string.h> |
| 13 #include <sys/socket.h> | 15 #include <sys/socket.h> |
| 14 #include <sys/types.h> | 16 #include <sys/types.h> |
| 15 #include <unistd.h> | 17 #include <unistd.h> |
| 16 | 18 |
| 17 #include <vector> | 19 #include <vector> |
| 18 | 20 |
| 19 #include "base/basictypes.h" | |
| 20 #include "base/bind.h" | 21 #include "base/bind.h" |
| 21 #include "base/command_line.h" | 22 #include "base/command_line.h" |
| 22 #include "base/compiler_specific.h" | 23 #include "base/compiler_specific.h" |
| 23 #include "base/memory/scoped_vector.h" | 24 #include "base/memory/scoped_vector.h" |
| 24 #include "base/native_library.h" | 25 #include "base/native_library.h" |
| 25 #include "base/pickle.h" | 26 #include "base/pickle.h" |
| 26 #include "base/posix/eintr_wrapper.h" | 27 #include "base/posix/eintr_wrapper.h" |
| 27 #include "base/posix/unix_domain_socket_linux.h" | 28 #include "base/posix/unix_domain_socket_linux.h" |
| 28 #include "base/rand_util.h" | 29 #include "base/rand_util.h" |
| 29 #include "base/strings/safe_sprintf.h" | 30 #include "base/strings/safe_sprintf.h" |
| (...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 608 const bool namespace_sandbox_engaged = sandbox_flags & kSandboxLinuxUserNS; | 609 const bool namespace_sandbox_engaged = sandbox_flags & kSandboxLinuxUserNS; |
| 609 CHECK_EQ(using_namespace_sandbox, namespace_sandbox_engaged); | 610 CHECK_EQ(using_namespace_sandbox, namespace_sandbox_engaged); |
| 610 | 611 |
| 611 Zygote zygote(sandbox_flags, fork_delegates.Pass(), extra_children, | 612 Zygote zygote(sandbox_flags, fork_delegates.Pass(), extra_children, |
| 612 extra_fds); | 613 extra_fds); |
| 613 // This function call can return multiple times, once per fork(). | 614 // This function call can return multiple times, once per fork(). |
| 614 return zygote.ProcessRequests(); | 615 return zygote.ProcessRequests(); |
| 615 } | 616 } |
| 616 | 617 |
| 617 } // namespace content | 618 } // namespace content |
| OLD | NEW |