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 CONTENT_COMMON_ZYGOTE_FORK_DELEGATE_H_ | |
6 #define CONTENT_COMMON_ZYGOTE_FORK_DELEGATE_H_ | |
7 #pragma once | |
8 | |
9 #include "base/basictypes.h" | |
10 | |
agl
2011/06/20 17:28:55
This file need a large number of comments, for eac
Brad Chen
2011/06/20 22:09:47
Done.
| |
11 class ZygoteForkDelegate { | |
12 public: | |
13 ZygoteForkDelegate() {}; | |
14 virtual ~ZygoteForkDelegate() {}; | |
15 virtual void Init(const bool sandboxed, | |
16 const int browserdesc, | |
17 const int sandboxdesc) = 0; | |
18 virtual bool CanHelp(const std::string& process_type) = 0; | |
19 virtual pid_t Fork(const std::vector<int>& fds) = 0; | |
20 }; | |
21 | |
22 class NullForkDelegate : public ZygoteForkDelegate { | |
23 public: | |
24 NullForkDelegate() {}; | |
25 ~NullForkDelegate() {}; | |
26 virtual void Init(const bool sandboxed, | |
27 const int browserdesc, | |
28 const int sandboxdesc) {}; | |
29 virtual bool CanHelp(const std::string& process_type) { return false; }; | |
30 virtual pid_t Fork(const std::vector<int>& fds) { return -1; }; | |
31 }; | |
32 | |
33 #endif // CONTENT_COMMON_ZYGOTE_FORK_DELEGATE_H_ | |
OLD | NEW |