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

Unified Diff: sandbox/mac/policy.h

Issue 310833003: Make BootstrapSandboxPolicy a struct, containing the existing rule map and a new default rule. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: const auto& Created 6 years, 7 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 | « sandbox/mac/launchd_interception_server.cc ('k') | sandbox/mac/policy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/mac/policy.h
diff --git a/sandbox/mac/policy.h b/sandbox/mac/policy.h
index 0cedcb864abe3ea4e1e1c16f2a5b9bb708e9b12c..e500468237a42f0c4840f7d8564ec99693767009 100644
--- a/sandbox/mac/policy.h
+++ b/sandbox/mac/policy.h
@@ -47,8 +47,20 @@ struct SANDBOX_EXPORT Rule {
mach_port_t substitute_port;
};
-// A SandboxPolicy maps bootstrap server names to policy Rules.
-typedef std::map<std::string, Rule> BootstrapSandboxPolicy;
+// A policy object manages the rules enforced on a target sandboxed process.
+struct SANDBOX_EXPORT BootstrapSandboxPolicy {
+ typedef std::map<std::string, Rule> NamedRules;
+
+ BootstrapSandboxPolicy();
+ ~BootstrapSandboxPolicy();
+
+ // The default action to take if the server name being looked up is not
+ // present in |rules|.
+ Rule default_rule;
+
+ // A map of bootstrap server names to policy Rules.
+ NamedRules rules;
+};
// Checks that a policy is well-formed.
SANDBOX_EXPORT bool IsPolicyValid(const BootstrapSandboxPolicy& policy);
« no previous file with comments | « sandbox/mac/launchd_interception_server.cc ('k') | sandbox/mac/policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698