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

Unified Diff: content/common/sandbox_init_mac.cc

Issue 2944623003: Call SetApplicationIsDaemon() in V2 sandbox. (Closed)
Patch Set: Split warmup and initialization into separate phases Created 3 years, 5 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
Index: content/common/sandbox_init_mac.cc
diff --git a/content/common/sandbox_init_mac.cc b/content/common/sandbox_init_mac.cc
index f73e85db4d109045820688b28b0924360a07169b..22a4e84a0c190472515aa11107cc8b73df27230d 100644
--- a/content/common/sandbox_init_mac.cc
+++ b/content/common/sandbox_init_mac.cc
@@ -72,6 +72,22 @@ bool GetSandboxTypeFromCommandLine(int* sandbox_type,
return true;
}
+void ExplicitlyWarmupSandbox() {
+ int sandbox_type = 0;
+ base::FilePath allowed_dir;
+ if (!GetSandboxTypeFromCommandLine(&sandbox_type, &allowed_dir))
+ return;
+ Sandbox::SandboxWarmup(sandbox_type);
+}
+
+bool ExplicitlyEnableSandbox() {
+ int sandbox_type = 0;
+ base::FilePath allowed_dir;
+ if (!GetSandboxTypeFromCommandLine(&sandbox_type, &allowed_dir))
+ return true;
+ return Sandbox::EnableSandbox(sandbox_type, allowed_dir);
+}
+
bool InitializeSandbox() {
int sandbox_type = 0;
base::FilePath allowed_dir;

Powered by Google App Engine
This is Rietveld 408576698