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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 // ZygoteHost implementation: | 56 // ZygoteHost implementation: |
57 virtual pid_t GetPid() const OVERRIDE; | 57 virtual pid_t GetPid() const OVERRIDE; |
| 58 virtual pid_t GetSandboxHelperPid() const OVERRIDE; |
58 virtual int GetSandboxStatus() const OVERRIDE; | 59 virtual int GetSandboxStatus() const OVERRIDE; |
59 virtual void AdjustRendererOOMScore(base::ProcessHandle process_handle, | 60 virtual void AdjustRendererOOMScore(base::ProcessHandle process_handle, |
60 int score) OVERRIDE; | 61 int score) OVERRIDE; |
61 | 62 |
62 private: | 63 private: |
63 friend struct DefaultSingletonTraits<ZygoteHostImpl>; | 64 friend struct DefaultSingletonTraits<ZygoteHostImpl>; |
64 | 65 |
65 ZygoteHostImpl(); | 66 ZygoteHostImpl(); |
66 virtual ~ZygoteHostImpl(); | 67 virtual ~ZygoteHostImpl(); |
67 | 68 |
(...skipping 28 matching lines...) Expand all Loading... |
96 // A lock protecting list_of_running_zygote_children_ and | 97 // A lock protecting list_of_running_zygote_children_ and |
97 // should_teardown_after_last_child_exits_. | 98 // should_teardown_after_last_child_exits_. |
98 base::Lock child_tracking_lock_; | 99 base::Lock child_tracking_lock_; |
99 std::set<pid_t> list_of_running_zygote_children_; | 100 std::set<pid_t> list_of_running_zygote_children_; |
100 bool should_teardown_after_last_child_exits_; | 101 bool should_teardown_after_last_child_exits_; |
101 }; | 102 }; |
102 | 103 |
103 } // namespace content | 104 } // namespace content |
104 | 105 |
105 #endif // CONTENT_BROWSER_ZYGOTE_HOST_ZYGOTE_HOST_IMPL_LINUX_H_ | 106 #endif // CONTENT_BROWSER_ZYGOTE_HOST_ZYGOTE_HOST_IMPL_LINUX_H_ |
OLD | NEW |