Commit 84218e1c authored by mseaborn@chromium.org's avatar mseaborn@chromium.org

NaCl: Remove unused "sandboxed_" field and argument from NaClForkDelegate

BUG=none
TEST=any NaCl test on Linux

Review URL: https://codereview.chromium.org/11819022

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175901 0039d316-1c4b-4281-b951-d872f2087c98
parent 2adfdb69
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
NaClForkDelegate::NaClForkDelegate() NaClForkDelegate::NaClForkDelegate()
: status_(kNaClHelperUnused), : status_(kNaClHelperUnused),
sandboxed_(false),
fd_(-1) {} fd_(-1) {}
// Note these need to match up with their counterparts in nacl_helper_linux.c // Note these need to match up with their counterparts in nacl_helper_linux.c
...@@ -35,13 +34,10 @@ const char kNaClHelperReservedAtZero[] = ...@@ -35,13 +34,10 @@ const char kNaClHelperReservedAtZero[] =
"--reserved_at_zero=0xXXXXXXXXXXXXXXXX"; "--reserved_at_zero=0xXXXXXXXXXXXXXXXX";
const char kNaClHelperRDebug[] = "--r_debug=0xXXXXXXXXXXXXXXXX"; const char kNaClHelperRDebug[] = "--r_debug=0xXXXXXXXXXXXXXXXX";
void NaClForkDelegate::Init(const bool sandboxed, void NaClForkDelegate::Init(const int browserdesc, const int sandboxdesc) {
const int browserdesc,
const int sandboxdesc) {
VLOG(1) << "NaClForkDelegate::Init()"; VLOG(1) << "NaClForkDelegate::Init()";
int fds[2]; int fds[2];
sandboxed_ = sandboxed;
// Confirm a couple hard-wired assumptions. // Confirm a couple hard-wired assumptions.
// The NaCl constants are from chrome/nacl/nacl_linux_helper.h // The NaCl constants are from chrome/nacl/nacl_linux_helper.h
DCHECK(kNaClBrowserDescriptor == browserdesc); DCHECK(kNaClBrowserDescriptor == browserdesc);
......
...@@ -22,9 +22,7 @@ class NaClForkDelegate : public content::ZygoteForkDelegate { ...@@ -22,9 +22,7 @@ class NaClForkDelegate : public content::ZygoteForkDelegate {
NaClForkDelegate(); NaClForkDelegate();
virtual ~NaClForkDelegate(); virtual ~NaClForkDelegate();
virtual void Init(bool sandboxed, virtual void Init(int browserdesc, int sandboxdesc) OVERRIDE;
int browserdesc,
int sandboxdesc) OVERRIDE;
virtual void InitialUMA(std::string* uma_name, virtual void InitialUMA(std::string* uma_name,
int* uma_sample, int* uma_sample,
int* uma_boundary_value) OVERRIDE; int* uma_boundary_value) OVERRIDE;
...@@ -49,7 +47,6 @@ class NaClForkDelegate : public content::ZygoteForkDelegate { ...@@ -49,7 +47,6 @@ class NaClForkDelegate : public content::ZygoteForkDelegate {
}; };
NaClHelperStatus status_; NaClHelperStatus status_;
bool sandboxed_;
int fd_; int fd_;
}; };
......
...@@ -25,9 +25,7 @@ class ZygoteForkDelegate { ...@@ -25,9 +25,7 @@ class ZygoteForkDelegate {
// Initialization happens in the zygote after it has been // Initialization happens in the zygote after it has been
// started by ZygoteMain. // started by ZygoteMain.
virtual void Init(bool sandboxed, virtual void Init(int browserdesc, int sandboxdesc) = 0;
int browserdesc,
int sandboxdesc) = 0;
// After Init, supply a UMA_HISTOGRAM_ENUMERATION the delegate // After Init, supply a UMA_HISTOGRAM_ENUMERATION the delegate
// would like to supply on the first fork. // would like to supply on the first fork.
......
...@@ -463,8 +463,7 @@ bool ZygoteMain(const MainFunctionParams& params, ...@@ -463,8 +463,7 @@ bool ZygoteMain(const MainFunctionParams& params,
if (forkdelegate != NULL) { if (forkdelegate != NULL) {
VLOG(1) << "ZygoteMain: initializing fork delegate"; VLOG(1) << "ZygoteMain: initializing fork delegate";
forkdelegate->Init(setuid_sandbox->IsSuidSandboxChild(), forkdelegate->Init(Zygote::kBrowserDescriptor,
Zygote::kBrowserDescriptor,
Zygote::kMagicSandboxIPCDescriptor); Zygote::kMagicSandboxIPCDescriptor);
} else { } else {
VLOG(1) << "ZygoteMain: fork delegate is NULL"; VLOG(1) << "ZygoteMain: fork delegate is NULL";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment