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

Side by Side Diff: base/platform_file_posix.cc

Issue 7184032: Upstream android file related code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove android specific shmem method 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
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/platform_file.h" 5 #include "base/platform_file.h"
6 6
7 #include <fcntl.h> 7 #include <fcntl.h>
8 #include <errno.h> 8 #include <errno.h>
9 #include <sys/stat.h> 9 #include <sys/stat.h>
10 10
11 #include "base/eintr_wrapper.h" 11 #include "base/eintr_wrapper.h"
12 #include "base/file_path.h" 12 #include "base/file_path.h"
13 #include "base/logging.h" 13 #include "base/logging.h"
14 #include "base/utf_string_conversions.h" 14 #include "base/utf_string_conversions.h"
15 15
16 #if defined(OS_ANDROID)
17 #include "base/os_compat_android.h"
18 #endif
19
16 namespace base { 20 namespace base {
17 21
18 #if defined(OS_OPENBSD) || defined(OS_FREEBSD) || \ 22 #if defined(OS_OPENBSD) || defined(OS_FREEBSD) || \
19 (defined(OS_MACOSX) && \ 23 (defined(OS_MACOSX) && \
20 MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5) 24 MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5)
21 typedef struct stat stat_wrapper_t; 25 typedef struct stat stat_wrapper_t;
22 static int CallFstat(int fd, stat_wrapper_t *sb) { 26 static int CallFstat(int fd, stat_wrapper_t *sb) {
23 return fstat(fd, sb); 27 return fstat(fd, sb);
24 } 28 }
25 #else 29 #else
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 info->is_directory = S_ISDIR(file_info.st_mode); 189 info->is_directory = S_ISDIR(file_info.st_mode);
186 info->is_symbolic_link = S_ISLNK(file_info.st_mode); 190 info->is_symbolic_link = S_ISLNK(file_info.st_mode);
187 info->size = file_info.st_size; 191 info->size = file_info.st_size;
188 info->last_modified = base::Time::FromTimeT(file_info.st_mtime); 192 info->last_modified = base::Time::FromTimeT(file_info.st_mtime);
189 info->last_accessed = base::Time::FromTimeT(file_info.st_atime); 193 info->last_accessed = base::Time::FromTimeT(file_info.st_atime);
190 info->creation_time = base::Time::FromTimeT(file_info.st_ctime); 194 info->creation_time = base::Time::FromTimeT(file_info.st_ctime);
191 return true; 195 return true;
192 } 196 }
193 197
194 } // namespace base 198 } // namespace base
OLDNEW
« no previous file with comments | « base/path_service.cc ('k') | base/shared_memory_android.cc » ('j') | base/shared_memory_posix.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698