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

Unified Diff: content/browser/ppapi_plugin_process_host.cc

Issue 1415483008: Get rid of SandboxedProcessLauncherDelegate::PreSandbox. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove curly braces Created 5 years, 1 month 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 | « content/browser/gpu/gpu_process_host.cc ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..4d87474f5a5f6447bc461116512ae546736fa7c8 100644
--- a/content/browser/ppapi_plugin_process_host.cc
+++ b/content/browser/ppapi_plugin_process_host.cc
@@ -59,10 +59,10 @@ class PpapiPluginSandboxedProcessLauncherDelegate
return !is_broker_;
}
- void PreSpawnTarget(sandbox::TargetPolicy* policy, bool* success) override {
+ bool PreSpawnTarget(sandbox::TargetPolicy* policy) override {
if (is_broker_)
- return;
- *success = false;
+ 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;
@@ -70,12 +70,13 @@ class PpapiPluginSandboxedProcessLauncherDelegate
sandbox::TargetPolicy::NAMEDPIPES_ALLOW_ANY,
L"\\\\.\\pipe\\chrome.*");
if (result != sandbox::SBOX_ALL_OK)
- return;
+ return false;
+
#if !defined(NACL_WIN64)
for (const auto& mime_type : info_.mime_types) {
if (IsWin32kLockdownEnabledForMimeType(mime_type.mime_type)) {
if (!AddWin32kLockdownPolicy(policy))
- return;
+ return false;
break;
}
}
@@ -86,7 +87,7 @@ class PpapiPluginSandboxedProcessLauncherDelegate
if (!sid.empty())
AddAppContainerPolicy(policy, sid.c_str());
- *success = true;
+ return true;
}
#elif defined(OS_POSIX)
« no previous file with comments | « content/browser/gpu/gpu_process_host.cc ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698