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 COMPONENTS_NACL_ZYGOTE_NACL_FORK_DELEGATE_LINUX_H_ | 5 #ifndef COMPONENTS_NACL_ZYGOTE_NACL_FORK_DELEGATE_LINUX_H_ |
6 #define COMPONENTS_NACL_ZYGOTE_NACL_FORK_DELEGATE_LINUX_H_ | 6 #define COMPONENTS_NACL_ZYGOTE_NACL_FORK_DELEGATE_LINUX_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 18 matching lines...) Expand all Loading... | |
29 // The NaClForkDelegate is created during Chrome linux zygote | 29 // The NaClForkDelegate is created during Chrome linux zygote |
30 // initialization, and provides "fork()" functionality with | 30 // initialization, and provides "fork()" functionality with |
31 // NaCl specific process characteristics (specifically address | 31 // NaCl specific process characteristics (specifically address |
32 // space layout) as an alternative to forking the zygote. | 32 // space layout) as an alternative to forking the zygote. |
33 // A new delegate is passed in as an argument to ZygoteMain(). | 33 // A new delegate is passed in as an argument to ZygoteMain(). |
34 class NaClForkDelegate : public content::ZygoteForkDelegate { | 34 class NaClForkDelegate : public content::ZygoteForkDelegate { |
35 public: | 35 public: |
36 explicit NaClForkDelegate(bool nonsfi_mode); | 36 explicit NaClForkDelegate(bool nonsfi_mode); |
37 ~NaClForkDelegate() override; | 37 ~NaClForkDelegate() override; |
38 | 38 |
39 void Init(int sandboxdesc, bool enable_layer1_sandbox) override; | 39 void Init(int sandboxdesc) override; |
jln (very slow on Chromium)
2015/02/06 00:37:29
I added that to make it hard to have bugs such as
rickyz (no longer on Chrome)
2015/02/06 01:53:19
Done.
| |
40 void InitialUMA(std::string* uma_name, | 40 void InitialUMA(std::string* uma_name, |
41 int* uma_sample, | 41 int* uma_sample, |
42 int* uma_boundary_value) override; | 42 int* uma_boundary_value) override; |
43 bool CanHelp(const std::string& process_type, | 43 bool CanHelp(const std::string& process_type, |
44 std::string* uma_name, | 44 std::string* uma_name, |
45 int* uma_sample, | 45 int* uma_sample, |
46 int* uma_boundary_value) override; | 46 int* uma_boundary_value) override; |
47 pid_t Fork(const std::string& process_type, | 47 pid_t Fork(const std::string& process_type, |
48 const std::vector<int>& fds, | 48 const std::vector<int>& fds, |
49 const std::string& channel_id) override; | 49 const std::string& channel_id) override; |
(...skipping 23 matching lines...) Expand all Loading... | |
73 int fd_; | 73 int fd_; |
74 | 74 |
75 FRIEND_TEST_ALL_PREFIXES(NaClForkDelegateLinuxTest, EnvPassthrough); | 75 FRIEND_TEST_ALL_PREFIXES(NaClForkDelegateLinuxTest, EnvPassthrough); |
76 | 76 |
77 DISALLOW_COPY_AND_ASSIGN(NaClForkDelegate); | 77 DISALLOW_COPY_AND_ASSIGN(NaClForkDelegate); |
78 }; | 78 }; |
79 | 79 |
80 } // namespace nacl | 80 } // namespace nacl |
81 | 81 |
82 #endif // COMPONENTS_NACL_ZYGOTE_NACL_FORK_DELEGATE_LINUX_H_ | 82 #endif // COMPONENTS_NACL_ZYGOTE_NACL_FORK_DELEGATE_LINUX_H_ |
OLD | NEW |