| 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 <sys/types.h> | 8 #include <sys/types.h> |
| 9 | 9 |
| 10 #include <set> | 10 #include <set> |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 // Retrieves the sandbox command passed into Init(); | 31 // Retrieves the sandbox command passed into Init(); |
| 32 const std::string& SandboxCommand() const; | 32 const std::string& SandboxCommand() const; |
| 33 | 33 |
| 34 // Tells the ZygoteHost the PIDs of all the zygotes. | 34 // Tells the ZygoteHost the PIDs of all the zygotes. |
| 35 void AddZygotePid(pid_t pid); | 35 void AddZygotePid(pid_t pid); |
| 36 | 36 |
| 37 // Returns whether or not this pid is the pid of a zygote. | 37 // Returns whether or not this pid is the pid of a zygote. |
| 38 bool IsZygotePid(pid_t pid) override; | 38 bool IsZygotePid(pid_t pid) override; |
| 39 | 39 |
| 40 bool ShouldUseNamespaceSandbox(); |
| 41 |
| 40 void SetRendererSandboxStatus(int status); | 42 void SetRendererSandboxStatus(int status); |
| 41 int GetRendererSandboxStatus() const override; | 43 int GetRendererSandboxStatus() const override; |
| 42 void AdjustRendererOOMScore(base::ProcessHandle process_handle, | 44 void AdjustRendererOOMScore(base::ProcessHandle process_handle, |
| 43 int score) override; | 45 int score) override; |
| 44 | 46 |
| 45 private: | 47 private: |
| 46 friend struct base::DefaultSingletonTraits<ZygoteHostImpl>; | 48 friend struct base::DefaultSingletonTraits<ZygoteHostImpl>; |
| 47 | 49 |
| 48 ZygoteHostImpl(); | 50 ZygoteHostImpl(); |
| 49 ~ZygoteHostImpl() override; | 51 ~ZygoteHostImpl() override; |
| 50 | 52 |
| 51 int renderer_sandbox_status_; | 53 int renderer_sandbox_status_; |
| 54 bool should_use_namespace_sandbox_; |
| 52 bool use_suid_sandbox_for_adj_oom_score_; | 55 bool use_suid_sandbox_for_adj_oom_score_; |
| 53 std::string sandbox_binary_; | 56 std::string sandbox_binary_; |
| 54 // This lock protects the |zygote_pids_| set. | 57 // This lock protects the |zygote_pids_| set. |
| 55 base::Lock zygote_pids_lock_; | 58 base::Lock zygote_pids_lock_; |
| 56 // This is a set of PIDs representing all the running zygotes. | 59 // This is a set of PIDs representing all the running zygotes. |
| 57 std::set<pid_t> zygote_pids_; | 60 std::set<pid_t> zygote_pids_; |
| 58 }; | 61 }; |
| 59 | 62 |
| 60 } // namespace content | 63 } // namespace content |
| 61 | 64 |
| 62 #endif // CONTENT_BROWSER_ZYGOTE_HOST_ZYGOTE_HOST_IMPL_LINUX_H_ | 65 #endif // CONTENT_BROWSER_ZYGOTE_HOST_ZYGOTE_HOST_IMPL_LINUX_H_ |
| OLD | NEW |