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

Unified Diff: content/common/sandbox_init_mac.cc

Issue 2931173003: Implement the V2 sandbox in the process launcher. (Closed)
Patch Set: Created 3 years, 6 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
Index: content/common/sandbox_init_mac.cc
diff --git a/content/common/sandbox_init_mac.cc b/content/common/sandbox_init_mac.cc
index b63600becf012d364ea8284cae2e19c2b1b0c3a3..f73e85db4d109045820688b28b0924360a07169b 100644
--- a/content/common/sandbox_init_mac.cc
+++ b/content/common/sandbox_init_mac.cc
@@ -37,8 +37,11 @@ bool GetSandboxTypeFromCommandLine(int* sandbox_type,
*base::CommandLine::ForCurrentProcess();
if (command_line.HasSwitch(switches::kNoSandbox))
return false;
- if (command_line.HasSwitch(switches::kV2SandboxedEnabled))
+ if (command_line.HasSwitch(switches::kV2SandboxedEnabled)) {
CHECK(sandbox::Seatbelt::IsSandboxed());
+ // Do not enable the sandbox if V2 is already enabled.
+ return false;
+ }
std::string process_type =
command_line.GetSwitchValueASCII(switches::kProcessType);

Powered by Google App Engine
This is Rietveld 408576698