Chromium Code Reviews| Index: base/platform_file_posix.cc |
| diff --git a/base/platform_file_posix.cc b/base/platform_file_posix.cc |
| index 46039b980ffe2ba788786ada360ba0c21e3f49b3..bfd40e95a75ad70fe27f2e37456481cfc8cee2df 100644 |
| --- a/base/platform_file_posix.cc |
| +++ b/base/platform_file_posix.cc |
| @@ -77,4 +77,12 @@ bool ClosePlatformFile(PlatformFile file) { |
| return close(file); |
| } |
| +bool GetPlatformFileSize(PlatformFile file, uint64* out_size) { |
| + struct stat st; |
| + if (fstat(file, &st)) |
| + return false; |
| + *out_size = st.st_size; |
| + return true; |
| +} |
| + |
| } // namespace base |