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

Unified Diff: content/browser/gpu/gpu_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 | « components/nacl/broker/nacl_broker_listener.cc ('k') | content/browser/ppapi_plugin_process_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gpu/gpu_process_host.cc
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
index 9edf3abe2fea349eda3b49b7c3bf3b5fcadb96df..31e6d4d0d00209db39f85ee2f60bba3144c66b85 100644
--- a/content/browser/gpu/gpu_process_host.cc
+++ b/content/browser/gpu/gpu_process_host.cc
@@ -189,16 +189,15 @@ class GpuSandboxedProcessLauncherDelegate
return sandbox;
}
- void PreSandbox(bool* disable_default_policy,
- base::FilePath* exposed_dir) override {
- *disable_default_policy = true;
+ bool DisableDefaultPolicy() override {
+ return true;
}
// For the GPU process we gotten as far as USER_LIMITED. The next level
// which is USER_RESTRICTED breaks both the DirectX backend and the OpenGL
// backend. Note that the GPU process is connected to the interactive
// desktop.
- void PreSpawnTarget(sandbox::TargetPolicy* policy, bool* success) override {
+ bool PreSpawnTarget(sandbox::TargetPolicy* policy) override {
if (base::win::GetVersion() > base::win::VERSION_XP) {
if (cmd_line_->GetSwitchValueASCII(switches::kUseGL) ==
gfx::kGLImplementationDesktopName) {
@@ -239,10 +238,8 @@ class GpuSandboxedProcessLauncherDelegate
sandbox::TargetPolicy::SUBSYS_NAMED_PIPES,
sandbox::TargetPolicy::NAMEDPIPES_ALLOW_ANY,
L"\\\\.\\pipe\\chrome.gpu.*");
- if (result != sandbox::SBOX_ALL_OK) {
- *success = false;
- return;
- }
+ if (result != sandbox::SBOX_ALL_OK)
+ return false;
// Block this DLL even if it is not loaded by the browser process.
policy->AddDllToUnload(L"cmsetac.dll");
@@ -253,10 +250,8 @@ class GpuSandboxedProcessLauncherDelegate
result = policy->AddRule(sandbox::TargetPolicy::SUBSYS_HANDLES,
sandbox::TargetPolicy::HANDLES_DUP_BROKER,
L"Section");
- if (result != sandbox::SBOX_ALL_OK) {
- *success = false;
- return;
- }
+ if (result != sandbox::SBOX_ALL_OK)
+ return false;
#endif
if (cmd_line_->HasSwitch(switches::kEnableLogging)) {
@@ -265,12 +260,12 @@ class GpuSandboxedProcessLauncherDelegate
result = policy->AddRule(sandbox::TargetPolicy::SUBSYS_FILES,
sandbox::TargetPolicy::FILES_ALLOW_ANY,
log_file_path.c_str());
- if (result != sandbox::SBOX_ALL_OK) {
- *success = false;
- return;
- }
+ if (result != sandbox::SBOX_ALL_OK)
+ return false;
}
}
+
+ return true;
}
#elif defined(OS_POSIX)
« no previous file with comments | « components/nacl/broker/nacl_broker_listener.cc ('k') | content/browser/ppapi_plugin_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698