Index: content/browser/ppapi_plugin_process_host.cc |
diff --git a/content/browser/ppapi_plugin_process_host.cc b/content/browser/ppapi_plugin_process_host.cc |
index 794a5a108034f13d46a3dc8d49a14f746891e62d..ea078c6a510138df8a609e5878af4d61971dbd34 100644 |
--- a/content/browser/ppapi_plugin_process_host.cc |
+++ b/content/browser/ppapi_plugin_process_host.cc |
@@ -59,23 +59,27 @@ class PpapiPluginSandboxedProcessLauncherDelegate |
return !is_broker_; |
} |
- void PreSpawnTarget(sandbox::TargetPolicy* policy, bool* success) override { |
- if (is_broker_) |
- return; |
- *success = false; |
+ bool PreSpawnTarget(sandbox::TargetPolicy* policy) override { |
+ if (is_broker_) { |
+ return true; |
+ } |
+ |
// The Pepper process is as locked-down as a renderer except that it can |
// create the server side of Chrome pipes. |
sandbox::ResultCode result; |
result = policy->AddRule(sandbox::TargetPolicy::SUBSYS_NAMED_PIPES, |
sandbox::TargetPolicy::NAMEDPIPES_ALLOW_ANY, |
L"\\\\.\\pipe\\chrome.*"); |
- if (result != sandbox::SBOX_ALL_OK) |
- return; |
+ if (result != sandbox::SBOX_ALL_OK) { |
+ return false; |
+ } |
+ |
#if !defined(NACL_WIN64) |
for (const auto& mime_type : info_.mime_types) { |
if (IsWin32kLockdownEnabledForMimeType(mime_type.mime_type)) { |
- if (!AddWin32kLockdownPolicy(policy)) |
- return; |
+ if (!AddWin32kLockdownPolicy(policy)) { |
+ return false; |
+ } |
break; |
} |
} |
@@ -86,7 +90,7 @@ class PpapiPluginSandboxedProcessLauncherDelegate |
if (!sid.empty()) |
AddAppContainerPolicy(policy, sid.c_str()); |
- *success = true; |
+ return true; |
} |
#elif defined(OS_POSIX) |