diff --git a/common/crash_reporter/crash_reporter_linux.cc b/common/crash_reporter/crash_reporter_linux.cc index 8f1cd3d2134..4dc50a11457 100644 --- a/common/crash_reporter/crash_reporter_linux.cc +++ b/common/crash_reporter/crash_reporter_linux.cc @@ -5,16 +5,7 @@ #include "common/crash_reporter/crash_reporter_linux.h" -// #include -// #include -// #include -// #include -// #include #include -// #include -// #include -// #include -// #include #include #include "base/debug/crash_logging.h" @@ -22,13 +13,9 @@ #include "base/linux_util.h" #include "base/logging.h" #include "base/path_service.h" -// #include "base/platform_file.h" -// #include "base/posix/global_descriptors.h" #include "base/process/memory.h" #include "base/memory/singleton.h" -// #include "base/strings/string_util.h" #include "common/crash_reporter/linux/crash_dump_handler.h" -// #include "content/public/common/content_descriptors.h" #include "vendor/breakpad/src/client/linux/handler/exception_handler.h" #include "vendor/breakpad/src/common/linux/linux_libc_support.h" diff --git a/common/crash_reporter/linux/crash_dump_handler.cc b/common/crash_reporter/linux/crash_dump_handler.cc index c63d9a15b6a..afbd44e6228 100644 --- a/common/crash_reporter/linux/crash_dump_handler.cc +++ b/common/crash_reporter/linux/crash_dump_handler.cc @@ -19,9 +19,6 @@ #include "third_party/lss/linux_syscall_support.h" -#define STAT_STRUCT struct kernel_stat -#define FSTAT_FUNC sys_fstat - // Some versions of gcc are prone to warn about unused return values. In cases // where we either a) know the call cannot fail, or b) there is nothing we // can do when a call fails, we mark the return code as ignored. This avoids @@ -268,8 +265,8 @@ void MimeWriter::AddItemWithoutTrailingSpaces(const void* base, size_t size) { void LoadDataFromFD(google_breakpad::PageAllocator& allocator, int fd, bool close_fd, uint8_t** file_data, size_t* size) { - STAT_STRUCT st; - if (FSTAT_FUNC(fd, &st) != 0) { + struct kernel_stat st; + if (sys_fstat(fd, &st) != 0) { static const char msg[] = "Cannot upload crash dump: stat failed\n"; WriteLog(msg, sizeof(msg) - 1); if (close_fd)