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

Unified Diff: third_party/crashpad/crashpad/util/file/file_io_posix.cc

Issue 2349083002: Update Crashpad to 23d31c4fea61962e156f992889c6b041ad757d12 (Closed)
Patch Set: Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: third_party/crashpad/crashpad/util/file/file_io_posix.cc
diff --git a/third_party/crashpad/crashpad/util/file/file_io_posix.cc b/third_party/crashpad/crashpad/util/file/file_io_posix.cc
index ce08a3960c5b39c591efa9c599670129bfcd839b..30eae539ac60e9f235ea62ed12cb971ad827d55b 100644
--- a/third_party/crashpad/crashpad/util/file/file_io_posix.cc
+++ b/third_party/crashpad/crashpad/util/file/file_io_posix.cc
@@ -16,6 +16,7 @@
#include <fcntl.h>
#include <sys/file.h>
+#include <sys/stat.h>
#include <unistd.h>
#include "base/files/file_path.h"
@@ -187,4 +188,13 @@ bool LoggingCloseFile(FileHandle file) {
return rv == 0;
}
+FileOffset LoggingFileSizeByHandle(FileHandle file) {
+ struct stat st;
+ if (fstat(file, &st) != 0) {
+ PLOG(ERROR) << "fstat";
+ return -1;
+ }
+ return st.st_size;
+}
+
} // namespace crashpad
« no previous file with comments | « third_party/crashpad/crashpad/util/file/file_io.h ('k') | third_party/crashpad/crashpad/util/file/file_io_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698