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

Unified Diff: content/common/sandbox_mac.h

Issue 8589001: Load mac sandbox definitions from resources instead of the bundle. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: also remove old bundle gyp code Created 9 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
Index: content/common/sandbox_mac.h
diff --git a/content/common/sandbox_mac.h b/content/common/sandbox_mac.h
index 358c098a996e86d171bfd38d8fe5dccfd40e1e5b..6f67ee8dbbe680b65a9b334370db7acbc444c3cc 100644
--- a/content/common/sandbox_mac.h
+++ b/content/common/sandbox_mac.h
@@ -57,44 +57,18 @@ class Sandbox {
typedef base::hash_map<std::string, SandboxSubstring>
SandboxVariableSubstitions;
- enum SandboxProcessType {
- SANDBOX_TYPE_FIRST_TYPE, // Placeholder to ease iteration.
-
- SANDBOX_TYPE_RENDERER = SANDBOX_TYPE_FIRST_TYPE,
-
- // The worker process uses the most restrictive sandbox which has almost
- // *everything* locked down. Only a couple of /System/Library/ paths and
- // some other very basic operations (e.g., reading metadata to allow
- // following symlinks) are permitted.
- SANDBOX_TYPE_WORKER,
-
- // Utility process is as restrictive as the worker process except full
- // access is allowed to one configurable directory.
- SANDBOX_TYPE_UTILITY,
-
- // Native Client sandbox for the user's untrusted code.
- SANDBOX_TYPE_NACL_LOADER,
-
- // GPU process.
- SANDBOX_TYPE_GPU,
-
- // The PPAPI plugin process.
- SANDBOX_TYPE_PPAPI,
-
- SANDBOX_AFTER_TYPE_LAST_TYPE, // Placeholder to ease iteration.
- };
-
// Warm up System APIs that empirically need to be accessed before the Sandbox
- // is turned on. |sandbox_type| is the type of sandbox to warm up.
- static void SandboxWarmup(SandboxProcessType sandbox_type);
+ // is turned on. |sandbox_definition_resource_id| defines what sandbox to
+ // warm up.
+ static void SandboxWarmup(int sandbox_definition_resource_id);
// Turns on the OS X sandbox for this process.
- // |sandbox_type| - type of Sandbox to use.
+ // |sandbox_definition_resource_id| - type of Sandbox to use.
Jói 2011/11/17 13:50:21 type of -> resource ID of definition of ?
// |allowed_dir| - directory to allow access to, currently the only sandbox
// profile that supports this is SANDBOX_TYPE_UTILITY .
//
// Returns true on success, false if an error occurred enabling the sandbox.
- static bool EnableSandbox(SandboxProcessType sandbox_type,
+ static bool EnableSandbox(int sandbox_definition_resource_id,
const FilePath& allowed_dir);

Powered by Google App Engine
This is Rietveld 408576698