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

Side by Side Diff: base/sys_info_posix.cc

Issue 7184032: Upstream android file related code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« base/shared_memory_posix.cc ('K') | « base/shared_memory_posix.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« base/shared_memory_posix.cc ('K') | « base/shared_memory_posix.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698