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/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 |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
184 | 184 |
185 info->is_directory = S_ISDIR(file_info.st_mode); | 185 info->is_directory = S_ISDIR(file_info.st_mode); |
186 info->is_symbolic_link = S_ISLNK(file_info.st_mode); | 186 info->is_symbolic_link = S_ISLNK(file_info.st_mode); |
187 info->size = file_info.st_size; | 187 info->size = file_info.st_size; |
188 info->last_modified = base::Time::FromTimeT(file_info.st_mtime); | 188 info->last_modified = base::Time::FromTimeT(file_info.st_mtime); |
189 info->last_accessed = base::Time::FromTimeT(file_info.st_atime); | 189 info->last_accessed = base::Time::FromTimeT(file_info.st_atime); |
190 info->creation_time = base::Time::FromTimeT(file_info.st_ctime); | 190 info->creation_time = base::Time::FromTimeT(file_info.st_ctime); |
191 return true; | 191 return true; |
192 } | 192 } |
193 | 193 |
194 PlatformFile GetFileHandleForProcess(PlatformFile file, | |
195 ProcessHandle process, | |
196 bool close_source_handle) { | |
197 return file; | |
piman
2011/06/13 23:19:42
from the peanut-gallery: this has a race condition
Jay Civelli
2011/06/14 00:19:27
Good point!
I moved that code to ipc_platform_file
piman
2011/06/14 00:31:23
Great, LGTM on that.
| |
198 } | |
199 | |
194 } // namespace base | 200 } // namespace base |
OLD | NEW |