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

Side by Side Diff: chrome/app/nacl_fork_delegate_linux.h

Issue 11819022: NaCl: Remove unused "sandboxed_" field and argument from NaClForkDelegate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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
« no previous file with comments | « no previous file | chrome/app/nacl_fork_delegate_linux.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 CHROME_APP_NACL_FORK_DELEGATE_LINUX_H_ 5 #ifndef CHROME_APP_NACL_FORK_DELEGATE_LINUX_H_
6 #define CHROME_APP_NACL_FORK_DELEGATE_LINUX_H_ 6 #define CHROME_APP_NACL_FORK_DELEGATE_LINUX_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "content/public/common/zygote_fork_delegate_linux.h" 13 #include "content/public/common/zygote_fork_delegate_linux.h"
14 14
15 // The NaClForkDelegate is created during Chrome linux zygote 15 // The NaClForkDelegate is created during Chrome linux zygote
16 // initialization, and provides "fork()" functionality with 16 // initialization, and provides "fork()" functionality with
17 // NaCl specific process characteristics (specifically address 17 // NaCl specific process characteristics (specifically address
18 // space layout) as an alternative to forking the zygote. 18 // space layout) as an alternative to forking the zygote.
19 // A new delegate is passed in as an argument to ZygoteMain(). 19 // A new delegate is passed in as an argument to ZygoteMain().
20 class NaClForkDelegate : public content::ZygoteForkDelegate { 20 class NaClForkDelegate : public content::ZygoteForkDelegate {
21 public: 21 public:
22 NaClForkDelegate(); 22 NaClForkDelegate();
23 virtual ~NaClForkDelegate(); 23 virtual ~NaClForkDelegate();
24 24
25 virtual void Init(bool sandboxed, 25 virtual void Init(int browserdesc, int sandboxdesc) OVERRIDE;
26 int browserdesc,
27 int sandboxdesc) OVERRIDE;
28 virtual void InitialUMA(std::string* uma_name, 26 virtual void InitialUMA(std::string* uma_name,
29 int* uma_sample, 27 int* uma_sample,
30 int* uma_boundary_value) OVERRIDE; 28 int* uma_boundary_value) OVERRIDE;
31 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,
32 int* uma_sample, int* uma_boundary_value) OVERRIDE; 30 int* uma_sample, int* uma_boundary_value) OVERRIDE;
33 virtual pid_t Fork(const std::vector<int>& fds) OVERRIDE; 31 virtual pid_t Fork(const std::vector<int>& fds) OVERRIDE;
34 virtual bool AckChild(int fd, 32 virtual bool AckChild(int fd,
35 const std::string& channel_switch) OVERRIDE; 33 const std::string& channel_switch) OVERRIDE;
36 34
37 private: 35 private:
38 // These values are reported via UMA and hence they become permanent 36 // These values are reported via UMA and hence they become permanent
39 // constants. Old values cannot be reused, only new ones added. 37 // constants. Old values cannot be reused, only new ones added.
40 enum NaClHelperStatus { 38 enum NaClHelperStatus {
41 kNaClHelperUnused = 0, 39 kNaClHelperUnused = 0,
42 kNaClHelperMissing = 1, 40 kNaClHelperMissing = 1,
43 kNaClHelperBootstrapMissing = 2, 41 kNaClHelperBootstrapMissing = 2,
44 kNaClHelperValgrind = 3, 42 kNaClHelperValgrind = 3,
45 kNaClHelperLaunchFailed = 4, 43 kNaClHelperLaunchFailed = 4,
46 kNaClHelperAckFailed = 5, 44 kNaClHelperAckFailed = 5,
47 kNaClHelperSuccess = 6, 45 kNaClHelperSuccess = 6,
48 kNaClHelperStatusBoundary // Must be one greater than highest value used. 46 kNaClHelperStatusBoundary // Must be one greater than highest value used.
49 }; 47 };
50 48
51 NaClHelperStatus status_; 49 NaClHelperStatus status_;
52 bool sandboxed_;
53 int fd_; 50 int fd_;
54 }; 51 };
55 52
56 #endif // CHROME_APP_NACL_FORK_DELEGATE_LINUX_H_ 53 #endif // CHROME_APP_NACL_FORK_DELEGATE_LINUX_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/app/nacl_fork_delegate_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698