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 "content/common/zygote_fork_delegate_linux.h" | |
| 11 | |
| 12 class NaClForkDelegate : public ZygoteForkDelegate { | |
|
Evan Martin
2011/06/24 18:57:33
Needs file-level comments describing what this is.
Brad Chen
2011/06/25 22:14:51
Done.
| |
| 13 public: | |
| 14 // The NaClForkDelegate is created during Chrome linux zygote | |
| 15 // initialization, and provides "fork()" functionality with | |
| 16 // NaCl specific process characteristics (specifically address | |
| 17 // space layout) as an alternative to forking the zygote. | |
| 18 // A new delegate is passed in as an argument to ZygoteMain(). | |
| 19 NaClForkDelegate(); | |
| 20 ~NaClForkDelegate(); | |
| 21 | |
| 22 virtual void Init(const bool sandboxed, | |
|
Evan Martin
2011/06/24 18:57:33
Please use OVERRIDE on virtual methods that you ar
Brad Chen
2011/06/25 22:14:51
Done.
| |
| 23 const int browserdesc, | |
| 24 const int sandboxdesc); | |
| 25 virtual bool CanHelp(const std::string& process_type); | |
| 26 virtual pid_t Fork(const std::vector<int>& fds); | |
| 27 virtual bool AckChild(const int fd, const std::string& channel_switch); | |
| 28 | |
| 29 private: | |
| 30 bool sandboxed_; | |
| 31 int fd_; | |
| 32 pid_t pid_; | |
| 33 }; | |
| 34 | |
| 35 #endif // CHROME_COMMON_NACL_FORK_DELEGATE_LINUX_H_ | |
| OLD | NEW |