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 10 matching lines...) Expand all Loading... |
21 public: | 21 public: |
22 NaClForkDelegate(); | 22 NaClForkDelegate(); |
23 virtual ~NaClForkDelegate(); | 23 virtual ~NaClForkDelegate(); |
24 | 24 |
25 virtual void Init(int sandboxdesc) OVERRIDE; | 25 virtual void Init(int sandboxdesc) OVERRIDE; |
26 virtual void InitialUMA(std::string* uma_name, | 26 virtual void InitialUMA(std::string* uma_name, |
27 int* uma_sample, | 27 int* uma_sample, |
28 int* uma_boundary_value) OVERRIDE; | 28 int* uma_boundary_value) OVERRIDE; |
29 virtual bool CanHelp(const std::string& process_type, std::string* uma_name, | 29 virtual bool CanHelp(const std::string& process_type, std::string* uma_name, |
30 int* uma_sample, int* uma_boundary_value) OVERRIDE; | 30 int* uma_sample, int* uma_boundary_value) OVERRIDE; |
31 virtual pid_t Fork(const std::vector<int>& fds) OVERRIDE; | 31 virtual pid_t Fork(const std::string& process_type, |
| 32 const std::vector<int>& fds) OVERRIDE; |
32 virtual bool AckChild(int fd, | 33 virtual bool AckChild(int fd, |
33 const std::string& channel_switch) OVERRIDE; | 34 const std::string& channel_switch) OVERRIDE; |
34 virtual bool GetTerminationStatus(pid_t pid, bool known_dead, | 35 virtual bool GetTerminationStatus(pid_t pid, bool known_dead, |
35 base::TerminationStatus* status, | 36 base::TerminationStatus* status, |
36 int* exit_code) OVERRIDE; | 37 int* exit_code) OVERRIDE; |
37 | 38 |
38 private: | 39 private: |
39 // These values are reported via UMA and hence they become permanent | 40 // These values are reported via UMA and hence they become permanent |
40 // constants. Old values cannot be reused, only new ones added. | 41 // constants. Old values cannot be reused, only new ones added. |
41 enum NaClHelperStatus { | 42 enum NaClHelperStatus { |
42 kNaClHelperUnused = 0, | 43 kNaClHelperUnused = 0, |
43 kNaClHelperMissing = 1, | 44 kNaClHelperMissing = 1, |
44 kNaClHelperBootstrapMissing = 2, | 45 kNaClHelperBootstrapMissing = 2, |
45 kNaClHelperValgrind = 3, | 46 kNaClHelperValgrind = 3, |
46 kNaClHelperLaunchFailed = 4, | 47 kNaClHelperLaunchFailed = 4, |
47 kNaClHelperAckFailed = 5, | 48 kNaClHelperAckFailed = 5, |
48 kNaClHelperSuccess = 6, | 49 kNaClHelperSuccess = 6, |
49 kNaClHelperStatusBoundary // Must be one greater than highest value used. | 50 kNaClHelperStatusBoundary // Must be one greater than highest value used. |
50 }; | 51 }; |
51 | 52 |
52 NaClHelperStatus status_; | 53 NaClHelperStatus status_; |
53 int fd_; | 54 int fd_; |
54 }; | 55 }; |
55 | 56 |
56 #endif // COMPONENTS_NACL_ZYGOTE_NACL_FORK_DELEGATE_LINUX_H_ | 57 #endif // COMPONENTS_NACL_ZYGOTE_NACL_FORK_DELEGATE_LINUX_H_ |
OLD | NEW |