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

Side by Side Diff: base/platform_file_posix.cc

Issue 12259025: Linux: apply a different hyphen patch. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 10 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
« no previous file with comments | « base/platform_file.h ('k') | base/platform_file_win.cc » ('j') | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include <unistd.h> 10 #include <unistd.h>
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 break; 153 break;
154 default: 154 default:
155 *error = PLATFORM_FILE_ERROR_FAILED; 155 *error = PLATFORM_FILE_ERROR_FAILED;
156 } 156 }
157 } 157 }
158 } 158 }
159 159
160 return descriptor; 160 return descriptor;
161 } 161 }
162 162
163 FILE* FdopenPlatformFile(PlatformFile file, const char* mode) {
164 return fdopen(file, mode);
165 }
166
163 bool ClosePlatformFile(PlatformFile file) { 167 bool ClosePlatformFile(PlatformFile file) {
164 base::ThreadRestrictions::AssertIOAllowed(); 168 base::ThreadRestrictions::AssertIOAllowed();
165 return !HANDLE_EINTR(close(file)); 169 return !HANDLE_EINTR(close(file));
166 } 170 }
167 171
168 int64 SeekPlatformFile(PlatformFile file, 172 int64 SeekPlatformFile(PlatformFile file,
169 PlatformFileWhence whence, 173 PlatformFileWhence whence,
170 int64 offset) { 174 int64 offset) {
171 base::ThreadRestrictions::AssertIOAllowed(); 175 base::ThreadRestrictions::AssertIOAllowed();
172 if (file < 0 || offset < 0) 176 if (file < 0 || offset < 0)
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 info->is_directory = S_ISDIR(file_info.st_mode); 315 info->is_directory = S_ISDIR(file_info.st_mode);
312 info->is_symbolic_link = S_ISLNK(file_info.st_mode); 316 info->is_symbolic_link = S_ISLNK(file_info.st_mode);
313 info->size = file_info.st_size; 317 info->size = file_info.st_size;
314 info->last_modified = base::Time::FromTimeT(file_info.st_mtime); 318 info->last_modified = base::Time::FromTimeT(file_info.st_mtime);
315 info->last_accessed = base::Time::FromTimeT(file_info.st_atime); 319 info->last_accessed = base::Time::FromTimeT(file_info.st_atime);
316 info->creation_time = base::Time::FromTimeT(file_info.st_ctime); 320 info->creation_time = base::Time::FromTimeT(file_info.st_ctime);
317 return true; 321 return true;
318 } 322 }
319 323
320 } // namespace base 324 } // namespace base
OLDNEW
« no previous file with comments | « base/platform_file.h ('k') | base/platform_file_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698