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

Unified Diff: content/common/sandbox_mac.mm

Issue 7060002: Mac: Fix WebGL in OS X 10.7 + misc. Sandbox cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 | « content/common/common.sb ('k') | content/renderer/renderer.sb » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/sandbox_mac.mm
diff --git a/content/common/sandbox_mac.mm b/content/common/sandbox_mac.mm
index 59d4871622ce90d3f88a56f4f01d252dfa770a23..fd3b3527ed22292ae7686d35576f060329026d1b 100644
--- a/content/common/sandbox_mac.mm
+++ b/content/common/sandbox_mac.mm
@@ -385,13 +385,15 @@ NSString* LoadSandboxTemplate(Sandbox::SandboxProcessType sandbox_type) {
}
// Retrieve OS X version, output parameters are self explanatory.
-void GetOSVersion(bool* snow_leopard_or_higher) {
+void GetOSVersion(bool* snow_leopard_or_higher, bool* lion_or_higher) {
int32 major_version, minor_version, bugfix_version;
base::SysInfo::OperatingSystemVersionNumbers(&major_version,
&minor_version,
&bugfix_version);
*snow_leopard_or_higher =
(major_version > 10 || (major_version == 10 && minor_version >= 6));
+ *lion_or_higher =
+ (major_version > 10 || (major_version == 10 && minor_version >= 7));
}
// static
@@ -505,7 +507,8 @@ bool Sandbox::EnableSandbox(SandboxProcessType sandbox_type,
}
bool snow_leopard_or_higher;
- GetOSVersion(&snow_leopard_or_higher);
+ bool lion_or_higher;
+ GetOSVersion(&snow_leopard_or_higher, &lion_or_higher);
// Without this, the sandbox will print a message to the system log every
// time it denies a request. This floods the console with useless spew. The
@@ -528,9 +531,14 @@ bool Sandbox::EnableSandbox(SandboxProcessType sandbox_type,
SandboxSubstring(home_dir_canonical.value(),
SandboxSubstring::LITERAL);
+ if (lion_or_higher) {
+ // >=10.7 Sandbox rules.
+ [tokens_to_remove addObject:@";10.7_OR_ABOVE"];
+ }
Nico 2011/05/22 16:01:06 |else [tokens_to_remove addObject:@";BEFORE_10.7"]
+
if (snow_leopard_or_higher) {
- // 10.6-only Sandbox rules.
- [tokens_to_remove addObject:@";10.6_ONLY"];
+ // >=10.6 Sandbox rules.
+ [tokens_to_remove addObject:@";10.6_OR_ABOVE"];
} else {
// Sandbox rules only for versions before 10.6.
[tokens_to_remove addObject:@";BEFORE_10.6"];
« no previous file with comments | « content/common/common.sb ('k') | content/renderer/renderer.sb » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698