summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorjeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-11 02:01:51 +0000
committerjeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-11 02:01:51 +0000
commit59658423f8a374ac79bd8abb122c87ee8c9b8685 (patch)
tree56cf53acd0e91bf33a9e1f7b2cf67e7a5af82f64 /chrome
parente5a3ea33e830593b16f140429896940be276f1ca (diff)
downloadchromium_src-59658423f8a374ac79bd8abb122c87ee8c9b8685.zip
chromium_src-59658423f8a374ac79bd8abb122c87ee8c9b8685.tar.gz
chromium_src-59658423f8a374ac79bd8abb122c87ee8c9b8685.tar.bz2
Under the OS X Sandbox, some system calls are blocked.
This CL adds a facility to cache system info values on renderer startup. Review URL: http://codereview.chromium.org/20250 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9545 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/renderer/renderer_main_platform_delegate_mac.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/renderer/renderer_main_platform_delegate_mac.cc b/chrome/renderer/renderer_main_platform_delegate_mac.cc
index cb5e750..0ffbc6b 100644
--- a/chrome/renderer/renderer_main_platform_delegate_mac.cc
+++ b/chrome/renderer/renderer_main_platform_delegate_mac.cc
@@ -10,6 +10,8 @@ extern "C" {
#include <sandbox.h>
}
+#include "base/sys_info.h"
+
RendererMainPlatformDelegate::RendererMainPlatformDelegate(
const MainFunctionParams& parameters)
: parameters_(parameters) {
@@ -34,6 +36,10 @@ bool RendererMainPlatformDelegate::EnableSandbox() {
// succeed.
DebugUtil::BeingDebugged();
+ // Cache the System info information, since we can't query certain attributes
+ // with the Sandbox enabled.
+ base::SysInfo::CacheSysInfo();
+
char* error_buff = NULL;
int error = sandbox_init(kSBXProfilePureComputation, SANDBOX_NAMED,
&error_buff);