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

Unified Diff: content/common/sandbox_init_mac.cc

Issue 2102443002: [GN] content_unittests should depeng on //content/common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix mac Created 4 years, 6 months 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/common/BUILD.gn ('k') | content/public/common/content_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/sandbox_init_mac.cc
diff --git a/content/common/sandbox_init_mac.cc b/content/common/sandbox_init_mac.cc
index 36a4058c35e3a5f449f5704629dad98117fd86a3..31b8edf449764e40a09b767826c883dc2dc8755d 100644
--- a/content/common/sandbox_init_mac.cc
+++ b/content/common/sandbox_init_mac.cc
@@ -12,14 +12,7 @@
#include "content/public/common/sandbox_init.h"
namespace content {
-
-bool InitializeSandbox(int sandbox_type, const base::FilePath& allowed_dir) {
- // Warm up APIs before turning on the sandbox.
- Sandbox::SandboxWarmup(sandbox_type);
-
- // Actually sandbox the process.
- return Sandbox::EnableSandbox(sandbox_type, allowed_dir);
-}
+namespace {
// Fill in |sandbox_type| and |allowed_dir| based on the command line, returns
// false if the current process type doesn't need to be sandboxed or if the
@@ -66,6 +59,16 @@ bool GetSandboxTypeFromCommandLine(int* sandbox_type,
return true;
}
+} // namespace
+
+bool InitializeSandbox(int sandbox_type, const base::FilePath& allowed_dir) {
+ // Warm up APIs before turning on the sandbox.
+ Sandbox::SandboxWarmup(sandbox_type);
+
+ // Actually sandbox the process.
+ return Sandbox::EnableSandbox(sandbox_type, allowed_dir);
+}
+
bool InitializeSandbox() {
int sandbox_type = 0;
base::FilePath allowed_dir;
« no previous file with comments | « content/common/BUILD.gn ('k') | content/public/common/content_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698