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

Unified Diff: chrome/common/sandbox_init_wrapper_mac.cc

Issue 4380001: Mac Sandbox: Clean up forward declaration of internal sandbox functions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup Created 10 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 | « no previous file | chrome/common/sandbox_mac.h » ('j') | chrome/common/sandbox_mac.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/sandbox_init_wrapper_mac.cc
diff --git a/chrome/common/sandbox_init_wrapper_mac.cc b/chrome/common/sandbox_init_wrapper_mac.cc
index ca212556d87f7938b3e29dd30b11b9f6be85b19a..d65ee7051e37f1221b3ef24ac07d4e9cbf2cbcfa 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);
}
« no previous file with comments | « no previous file | chrome/common/sandbox_mac.h » ('j') | chrome/common/sandbox_mac.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698