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