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

Unified Diff: components/nacl/browser/nacl_process_host.cc

Issue 1640123005: Revert of Have each SandboxedProcessLauncherDelegate maintain a zygote. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/nacl/browser/nacl_process_host.h ('k') | content/browser/browser_main_loop.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/nacl/browser/nacl_process_host.cc
diff --git a/components/nacl/browser/nacl_process_host.cc b/components/nacl/browser/nacl_process_host.cc
index aae77fa3b6783932f639b08d5614f6128c7eac5b..41e337a408bb0fd76fb89ad7381449f100fd71f6 100644
--- a/components/nacl/browser/nacl_process_host.cc
+++ b/components/nacl/browser/nacl_process_host.cc
@@ -68,7 +68,6 @@
#include <netinet/in.h>
#include <sys/socket.h>
-#include "content/public/browser/zygote_handle_linux.h"
#include "ipc/ipc_channel_posix.h"
#elif defined(OS_WIN)
#include <windows.h>
@@ -156,10 +155,6 @@
namespace {
-#if defined(OS_POSIX) && !defined(OS_MACOSX)
-content::ZygoteHandle g_nacl_zygote;
-#endif // defined(OS_POSIX) && !defined(OS_MACOSX)
-
// NOTE: changes to this class need to be reviewed by the security team.
class NaClSandboxedProcessLauncherDelegate
: public content::SandboxedProcessLauncherDelegate {
@@ -186,10 +181,7 @@
}
}
#elif defined(OS_POSIX)
-#if !defined(OS_MACOSX)
- content::ZygoteHandle* GetZygote() override { return &g_nacl_zygote; }
-#endif // !defined(OS_MACOSX)
-
+ bool ShouldUseZygote() override { return true; }
base::ScopedFD TakeIpcFd() override { return std::move(ipc_fd_); }
#endif // OS_WIN
@@ -424,14 +416,6 @@
}
NaClBrowser::GetDelegate()->SetDebugPatterns(nacl_debug_mask);
}
-
-#if defined(OS_POSIX) && !defined(OS_MACOSX)
-// static
-void NaClProcessHost::EarlyZygoteLaunch() {
- DCHECK(!g_nacl_zygote);
- g_nacl_zygote = content::CreateZygote();
-}
-#endif // defined(OS_POSIX) && !defined(OS_MACOSX)
// static
void NaClProcessHost::SetPpapiKeepAliveThrottleForTesting(
« no previous file with comments | « components/nacl/browser/nacl_process_host.h ('k') | content/browser/browser_main_loop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698