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

Unified Diff: base/sys_info_mac.cc

Issue 174254: Some tweaks to the OS X Sandbox: (Closed)
Patch Set: Created 11 years, 4 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 | « no previous file | chrome/renderer/renderer.sb » ('j') | chrome/renderer/renderer_main_platform_delegate_mac.mm » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/sys_info_mac.cc
diff --git a/base/sys_info_mac.cc b/base/sys_info_mac.cc
index caec74d125987bb8e54b572c15ec3821ce39d4b9..54b73205f0920d52475310bc9e49e72d48082d76 100644
--- a/base/sys_info_mac.cc
+++ b/base/sys_info_mac.cc
@@ -12,21 +12,12 @@ namespace base {
void SysInfo::OperatingSystemVersionNumbers(int32 *major_version,
int32 *minor_version,
int32 *bugfix_version) {
- int32 major_version_cached = 0;
- int32 minor_version_cached = 0;
- int32 bugfix_version_cached = 0;
-
- // Gestalt can't be called in the sandbox, so we cache its return value.
Gestalt(gestaltSystemVersionMajor,
- reinterpret_cast<SInt32*>(&major_version_cached));
+ reinterpret_cast<SInt32*>(major_version));
Gestalt(gestaltSystemVersionMinor,
- reinterpret_cast<SInt32*>(&minor_version_cached));
+ reinterpret_cast<SInt32*>(minor_version));
Gestalt(gestaltSystemVersionBugFix,
- reinterpret_cast<SInt32*>(&bugfix_version_cached));
-
- *major_version = major_version_cached;
- *minor_version = minor_version_cached;
- *bugfix_version = bugfix_version_cached;
+ reinterpret_cast<SInt32*>(bugfix_version));
}
} // namespace base
« no previous file with comments | « no previous file | chrome/renderer/renderer.sb » ('j') | chrome/renderer/renderer_main_platform_delegate_mac.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698