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

Unified Diff: content/common/sandbox_init_mac.cc

Issue 2944623003: Call SetApplicationIsDaemon() in V2 sandbox. (Closed)
Patch Set: Get rid of extra private 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
« no previous file with comments | « no previous file | content/common/sandbox_mac.h » ('j') | content/common/sandbox_mac.mm » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..3cb3e29deb50ec410aa5f3a2f916953bd73c6579 100644
--- a/content/common/sandbox_init_mac.cc
+++ b/content/common/sandbox_init_mac.cc
@@ -35,13 +35,20 @@ bool GetSandboxTypeFromCommandLine(int* sandbox_type,
const base::CommandLine& command_line =
*base::CommandLine::ForCurrentProcess();
+ std::string process_type =
+ command_line.GetSwitchValueASCII(switches::kProcessType);
+
if (command_line.HasSwitch(switches::kNoSandbox))
return false;
- if (command_line.HasSwitch(switches::kV2SandboxedEnabled))
+ if (command_line.HasSwitch(switches::kV2SandboxedEnabled)) {
CHECK(sandbox::Seatbelt::IsSandboxed());
+ if (process_type == switches::kRendererProcess) {
+ Sandbox::LaunchServicesNotAvailable();
+ }
+ // Do not enable the sandbox if V2 is already enabled.
+ return false;
+ }
- std::string process_type =
- command_line.GetSwitchValueASCII(switches::kProcessType);
if (process_type.empty()) {
// Browser process isn't sandboxed.
return false;
« no previous file with comments | « no previous file | content/common/sandbox_mac.h » ('j') | content/common/sandbox_mac.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698