summaryrefslogtreecommitdiffstats
path: root/chrome/common/sandbox_init_wrapper_mac.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/common/sandbox_init_wrapper_mac.cc')
-rw-r--r--chrome/common/sandbox_init_wrapper_mac.cc16
1 files changed, 9 insertions, 7 deletions
diff --git a/chrome/common/sandbox_init_wrapper_mac.cc b/chrome/common/sandbox_init_wrapper_mac.cc
index ca21255..d65ee70 100644
--- a/chrome/common/sandbox_init_wrapper_mac.cc
+++ b/chrome/common/sandbox_init_wrapper_mac.cc
@@ -12,10 +12,12 @@
bool SandboxInitWrapper::InitializeSandbox(const CommandLine& command_line,
const std::string& process_type) {
+ using sandbox::Sandbox;
+
if (command_line.HasSwitch(switches::kNoSandbox))
return true;
- sandbox::SandboxProcessType sandbox_process_type;
+ Sandbox::SandboxProcessType sandbox_process_type;
FilePath allowed_dir; // Empty by default.
if (process_type.empty()) {
@@ -29,7 +31,7 @@ bool SandboxInitWrapper::InitializeSandbox(const CommandLine& command_line,
// this once this flag is removed.
return true;
} else {
- sandbox_process_type = sandbox::SANDBOX_TYPE_RENDERER;
+ sandbox_process_type = Sandbox::SANDBOX_TYPE_RENDERER;
}
} else if (process_type == switches::kExtensionProcess) {
// Extension processes are just renderers [they use RenderMain()] with a
@@ -42,15 +44,15 @@ bool SandboxInitWrapper::InitializeSandbox(const CommandLine& command_line,
return true;
} else if (process_type == switches::kUtilityProcess) {
// Utility process sandbox.
- sandbox_process_type = sandbox::SANDBOX_TYPE_UTILITY;
+ sandbox_process_type = Sandbox::SANDBOX_TYPE_UTILITY;
allowed_dir =
command_line.GetSwitchValuePath(switches::kUtilityProcessAllowedDir);
} else if (process_type == switches::kWorkerProcess) {
// Worker process sandbox.
- sandbox_process_type = sandbox::SANDBOX_TYPE_WORKER;
+ sandbox_process_type = Sandbox::SANDBOX_TYPE_WORKER;
} else if (process_type == switches::kNaClLoaderProcess) {
// Native Client sel_ldr (user untrusted code) sandbox.
- sandbox_process_type = sandbox::SANDBOX_TYPE_NACL_LOADER;
+ sandbox_process_type = Sandbox::SANDBOX_TYPE_NACL_LOADER;
} else if ((process_type == switches::kPluginProcess) ||
(process_type == switches::kProfileImportProcess) ||
(process_type == switches::kGpuProcess) ||
@@ -64,8 +66,8 @@ bool SandboxInitWrapper::InitializeSandbox(const CommandLine& command_line,
}
// Warm up APIs before turning on the sandbox.
- sandbox::SandboxWarmup();
+ Sandbox::SandboxWarmup();
// Actually sandbox the process.
- return sandbox::EnableSandbox(sandbox_process_type, allowed_dir);
+ return Sandbox::EnableSandbox(sandbox_process_type, allowed_dir);
}