OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/sys_info.h" | 5 #include "base/sys_info.h" |
6 | 6 |
7 #include <ApplicationServices/ApplicationServices.h> | 7 #include <ApplicationServices/ApplicationServices.h> |
8 #include <CoreServices/CoreServices.h> | 8 #include <CoreServices/CoreServices.h> |
9 #include <mach/mach_host.h> | 9 #include <mach/mach_host.h> |
10 #include <mach/mach_init.h> | 10 #include <mach/mach_init.h> |
11 | 11 |
12 #include "base/logging.h" | 12 #include "base/logging.h" |
13 | 13 |
14 namespace base { | 14 namespace base { |
15 | 15 |
16 // static | 16 // static |
17 void SysInfo::OperatingSystemVersionNumbers(int32 *major_version, | 17 void SysInfo::OperatingSystemVersionNumbers(int32* major_version, |
18 int32 *minor_version, | 18 int32* minor_version, |
19 int32 *bugfix_version) { | 19 int32* bugfix_version) { |
20 Gestalt(gestaltSystemVersionMajor, | 20 Gestalt(gestaltSystemVersionMajor, |
21 reinterpret_cast<SInt32*>(major_version)); | 21 reinterpret_cast<SInt32*>(major_version)); |
22 Gestalt(gestaltSystemVersionMinor, | 22 Gestalt(gestaltSystemVersionMinor, |
23 reinterpret_cast<SInt32*>(minor_version)); | 23 reinterpret_cast<SInt32*>(minor_version)); |
24 Gestalt(gestaltSystemVersionBugFix, | 24 Gestalt(gestaltSystemVersionBugFix, |
25 reinterpret_cast<SInt32*>(bugfix_version)); | 25 reinterpret_cast<SInt32*>(bugfix_version)); |
26 } | 26 } |
27 | 27 |
28 // static | 28 // static |
29 int64 SysInfo::AmountOfPhysicalMemory() { | 29 int64 SysInfo::AmountOfPhysicalMemory() { |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 // The primary display in a mirrored set will be counted, but those that | 80 // The primary display in a mirrored set will be counted, but those that |
81 // mirror it will not be. | 81 // mirror it will not be. |
82 ++display_count; | 82 ++display_count; |
83 } | 83 } |
84 } | 84 } |
85 | 85 |
86 return display_count; | 86 return display_count; |
87 } | 87 } |
88 | 88 |
89 } // namespace base | 89 } // namespace base |
OLD | NEW |