Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Side by Side Diff: components/nacl/zygote/nacl_fork_delegate_linux.h

Issue 240673002: Simplify ZygoteForkDelegate API further (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Don't leak real PID to NaCl child processes Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 11 matching lines...) Expand all
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::string& process_type, 31 virtual pid_t Fork(const std::string& process_type,
32 const std::vector<int>& fds) OVERRIDE; 32 const std::vector<int>& fds,
33 virtual bool AckChild(int fd, const std::string& channel_id) OVERRIDE; 33 const std::string& channel_id) OVERRIDE;
34 virtual bool GetTerminationStatus(pid_t pid, bool known_dead, 34 virtual bool GetTerminationStatus(pid_t pid, bool known_dead,
35 base::TerminationStatus* status, 35 base::TerminationStatus* status,
36 int* exit_code) OVERRIDE; 36 int* exit_code) OVERRIDE;
37 37
38 private: 38 private:
39 // These values are reported via UMA and hence they become permanent 39 // These values are reported via UMA and hence they become permanent
40 // constants. Old values cannot be reused, only new ones added. 40 // constants. Old values cannot be reused, only new ones added.
41 enum NaClHelperStatus { 41 enum NaClHelperStatus {
42 kNaClHelperUnused = 0, 42 kNaClHelperUnused = 0,
43 kNaClHelperMissing = 1, 43 kNaClHelperMissing = 1,
44 kNaClHelperBootstrapMissing = 2, 44 kNaClHelperBootstrapMissing = 2,
45 kNaClHelperValgrind = 3, 45 kNaClHelperValgrind = 3,
46 kNaClHelperLaunchFailed = 4, 46 kNaClHelperLaunchFailed = 4,
47 kNaClHelperAckFailed = 5, 47 kNaClHelperAckFailed = 5,
48 kNaClHelperSuccess = 6, 48 kNaClHelperSuccess = 6,
49 kNaClHelperStatusBoundary // Must be one greater than highest value used. 49 kNaClHelperStatusBoundary // Must be one greater than highest value used.
50 }; 50 };
51 51
52 NaClHelperStatus status_; 52 NaClHelperStatus status_;
53 int fd_; 53 int fd_;
54 }; 54 };
55 55
56 #endif // COMPONENTS_NACL_ZYGOTE_NACL_FORK_DELEGATE_LINUX_H_ 56 #endif // COMPONENTS_NACL_ZYGOTE_NACL_FORK_DELEGATE_LINUX_H_
OLDNEW
« no previous file with comments | « components/nacl/loader/nacl_helper_linux.cc ('k') | components/nacl/zygote/nacl_fork_delegate_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698