OLD | NEW |
1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2008 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 #ifndef BASE_SYS_INFO_H_ | 5 #ifndef BASE_SYS_INFO_H_ |
6 #define BASE_SYS_INFO_H_ | 6 #define BASE_SYS_INFO_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 // width and height parameters. | 60 // width and height parameters. |
61 static void GetPrimaryDisplayDimensions(int* width, int* height); | 61 static void GetPrimaryDisplayDimensions(int* width, int* height); |
62 | 62 |
63 // Return the number of displays. | 63 // Return the number of displays. |
64 static int DisplayCount(); | 64 static int DisplayCount(); |
65 | 65 |
66 // Return the smallest amount of memory (in bytes) which the VM system will | 66 // Return the smallest amount of memory (in bytes) which the VM system will |
67 // allocate. | 67 // allocate. |
68 static size_t VMAllocationGranularity(); | 68 static size_t VMAllocationGranularity(); |
69 | 69 |
70 #if defined(OS_LINUX) | 70 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
71 // Returns the maximum SysV shared memory segment size. | 71 // Returns the maximum SysV shared memory segment size. |
72 static size_t MaxSharedMemorySize(); | 72 static size_t MaxSharedMemorySize(); |
73 #endif | 73 #endif |
74 | 74 |
75 #if defined(OS_CHROMEOS) | 75 #if defined(OS_CHROMEOS) |
76 // Returns the name of the version entry we wish to look up in the | 76 // Returns the name of the version entry we wish to look up in the |
77 // Linux Standard Base release information file. | 77 // Linux Standard Base release information file. |
78 static std::string GetLinuxStandardBaseVersionKey(); | 78 static std::string GetLinuxStandardBaseVersionKey(); |
79 | 79 |
80 // Parses /etc/lsb-release to get version information for Google Chrome OS. | 80 // Parses /etc/lsb-release to get version information for Google Chrome OS. |
81 // Declared here so it can be exposed for unit testing. | 81 // Declared here so it can be exposed for unit testing. |
82 static void ParseLsbRelease(const std::string& lsb_release, | 82 static void ParseLsbRelease(const std::string& lsb_release, |
83 int32 *major_version, | 83 int32 *major_version, |
84 int32 *minor_version, | 84 int32 *minor_version, |
85 int32 *bugfix_version); | 85 int32 *bugfix_version); |
86 #endif | 86 #endif |
87 }; | 87 }; |
88 | 88 |
89 } // namespace base | 89 } // namespace base |
90 | 90 |
91 #endif // BASE_SYS_INFO_H_ | 91 #endif // BASE_SYS_INFO_H_ |
OLD | NEW |