Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_COMMON_NACL_FORK_DELEGATE_LINUX_H_ | |
| 6 #define CHROME_COMMON_NACL_FORK_DELEGATE_LINUX_H_ | |
| 7 #pragma once | |
| 8 | |
| 9 #include "base/basictypes.h" | |
| 10 #include "base/compiler_specific.h" | |
| 11 #include "content/common/zygote_fork_delegate_linux.h" | |
| 12 | |
| 13 // The NaClForkDelegate is created during Chrome linux zygote | |
| 14 // initialization, and provides "fork()" functionality with | |
| 15 // NaCl specific process characteristics (specifically address | |
| 16 // space layout) as an alternative to forking the zygote. | |
| 17 // A new delegate is passed in as an argument to ZygoteMain(). | |
| 18 class NaClForkDelegate : public ZygoteForkDelegate { | |
| 19 public: | |
| 20 NaClForkDelegate(); | |
| 21 ~NaClForkDelegate(); | |
| 22 | |
| 23 virtual void Init(const bool sandboxed, | |
|
Evan Martin
2011/06/27 18:49:32
nit: I think one of our compilers (clang?) will wa
Brad Chen
2011/06/27 22:06:25
Done.
| |
| 24 const int browserdesc, | |
| 25 const int sandboxdesc) OVERRIDE; | |
| 26 virtual bool CanHelp(const std::string& process_type) OVERRIDE; | |
| 27 virtual pid_t Fork(const std::vector<int>& fds) OVERRIDE; | |
| 28 virtual bool AckChild(const int fd, | |
| 29 const std::string& channel_switch) OVERRIDE; | |
| 30 | |
| 31 private: | |
| 32 bool sandboxed_; | |
| 33 int fd_; | |
| 34 pid_t pid_; | |
| 35 }; | |
| 36 | |
| 37 #endif // CHROME_COMMON_NACL_FORK_DELEGATE_LINUX_H_ | |
| OLD | NEW |