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 #ifndef CONTENT_BROWSER_ZYGOTE_HOST_ZYGOTE_HOST_IMPL_LINUX_H_ | 5 #ifndef CONTENT_BROWSER_ZYGOTE_HOST_ZYGOTE_HOST_IMPL_LINUX_H_ |
6 #define CONTENT_BROWSER_ZYGOTE_HOST_ZYGOTE_HOST_IMPL_LINUX_H_ | 6 #define CONTENT_BROWSER_ZYGOTE_HOST_ZYGOTE_HOST_IMPL_LINUX_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 // |known_dead| should be set to true when we already know that the process | 46 // |known_dead| should be set to true when we already know that the process |
47 // is dead. When |known_dead| is false, processes could be seen as | 47 // is dead. When |known_dead| is false, processes could be seen as |
48 // still running, even when they're not. When |known_dead| is true, the | 48 // still running, even when they're not. When |known_dead| is true, the |
49 // process will be SIGKILL-ed first (which should have no effect if it was | 49 // process will be SIGKILL-ed first (which should have no effect if it was |
50 // really dead). This is to prevent a waiting waitpid() from blocking in | 50 // really dead). This is to prevent a waiting waitpid() from blocking in |
51 // a single-threaded Zygote. See crbug.com/157458. | 51 // a single-threaded Zygote. See crbug.com/157458. |
52 base::TerminationStatus GetTerminationStatus(base::ProcessHandle handle, | 52 base::TerminationStatus GetTerminationStatus(base::ProcessHandle handle, |
53 bool known_dead, | 53 bool known_dead, |
54 int* exit_code); | 54 int* exit_code); |
55 | 55 |
| 56 bool UsingSUIDSandbox() const; |
| 57 |
56 // ZygoteHost implementation: | 58 // ZygoteHost implementation: |
57 virtual pid_t GetPid() const OVERRIDE; | 59 virtual pid_t GetPid() const OVERRIDE; |
58 virtual pid_t GetSandboxHelperPid() const OVERRIDE; | 60 virtual pid_t GetSandboxHelperPid() const OVERRIDE; |
59 virtual int GetSandboxStatus() const OVERRIDE; | 61 virtual int GetSandboxStatus() const OVERRIDE; |
60 virtual void AdjustRendererOOMScore(base::ProcessHandle process_handle, | 62 virtual void AdjustRendererOOMScore(base::ProcessHandle process_handle, |
61 int score) OVERRIDE; | 63 int score) OVERRIDE; |
62 | 64 |
63 private: | 65 private: |
64 friend struct DefaultSingletonTraits<ZygoteHostImpl>; | 66 friend struct DefaultSingletonTraits<ZygoteHostImpl>; |
65 | 67 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 // A lock protecting list_of_running_zygote_children_ and | 99 // A lock protecting list_of_running_zygote_children_ and |
98 // should_teardown_after_last_child_exits_. | 100 // should_teardown_after_last_child_exits_. |
99 base::Lock child_tracking_lock_; | 101 base::Lock child_tracking_lock_; |
100 std::set<pid_t> list_of_running_zygote_children_; | 102 std::set<pid_t> list_of_running_zygote_children_; |
101 bool should_teardown_after_last_child_exits_; | 103 bool should_teardown_after_last_child_exits_; |
102 }; | 104 }; |
103 | 105 |
104 } // namespace content | 106 } // namespace content |
105 | 107 |
106 #endif // CONTENT_BROWSER_ZYGOTE_HOST_ZYGOTE_HOST_IMPL_LINUX_H_ | 108 #endif // CONTENT_BROWSER_ZYGOTE_HOST_ZYGOTE_HOST_IMPL_LINUX_H_ |
OLD | NEW |