Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 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 <errno.h> | 7 #include <errno.h> |
| 8 #include <string.h> | 8 #include <string.h> |
| 9 #include <sys/param.h> | 9 #include <sys/param.h> |
| 10 #if defined(OS_ANDROID) | |
|
joth
2011/06/17 11:25:54
this is unreliable as we may not have included bas
michaelbai
2011/06/17 22:41:29
Done.
| |
| 11 #include <sys/vfs.h> | |
| 12 #define statvfs statfs // Android uses a statvfs-like statfs struct and call. | |
| 13 #else | |
| 10 #include <sys/statvfs.h> | 14 #include <sys/statvfs.h> |
| 11 #include <sys/sysctl.h> | 15 #include <sys/sysctl.h> |
| 16 #endif | |
| 12 #include <sys/utsname.h> | 17 #include <sys/utsname.h> |
| 13 #include <unistd.h> | 18 #include <unistd.h> |
| 14 | 19 |
| 15 #include "base/basictypes.h" | 20 #include "base/basictypes.h" |
| 16 #include "base/file_util.h" | 21 #include "base/file_util.h" |
| 17 #include "base/logging.h" | 22 #include "base/logging.h" |
| 18 #include "base/utf_string_conversions.h" | 23 #include "base/utf_string_conversions.h" |
| 19 | 24 |
| 20 namespace base { | 25 namespace base { |
| 21 | 26 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 73 } | 78 } |
| 74 return std::string(info.machine); | 79 return std::string(info.machine); |
| 75 } | 80 } |
| 76 | 81 |
| 77 // static | 82 // static |
| 78 size_t SysInfo::VMAllocationGranularity() { | 83 size_t SysInfo::VMAllocationGranularity() { |
| 79 return getpagesize(); | 84 return getpagesize(); |
| 80 } | 85 } |
| 81 | 86 |
| 82 } // namespace base | 87 } // namespace base |
| OLD | NEW |