]> khamidou — GitHub mirrors - electron.git/commitdiff
:lipstick: Remove dead code.
authorCheng Zhao <zcbenz@gmail.com>
Wed, 26 Feb 2014 12:41:59 +0000 (20:41 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Wed, 26 Feb 2014 12:41:59 +0000 (20:41 +0800)
common/crash_reporter/crash_reporter_linux.cc
common/crash_reporter/linux/crash_dump_handler.cc

index 8f1cd3d2134c1126641e6e391ec6869071179999..4dc50a11457ff77576a2f3d898410684e3b8c3c4 100644 (file)
@@ -5,16 +5,7 @@
 
 #include "common/crash_reporter/crash_reporter_linux.h"
 
-// #include <fcntl.h>
-// #include <poll.h>
-// #include <signal.h>
-// #include <stdlib.h>
-// #include <sys/socket.h>
 #include <sys/time.h>
-// #include <sys/types.h>
-// #include <sys/uio.h>
-// #include <sys/wait.h>
-// #include <time.h>
 #include <unistd.h>
 
 #include "base/debug/crash_logging.h"
 #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"
 
index c63d9a15b6a2364e2a77af4e37c449ebfa3ad55b..afbd44e6228b5c6052cc67a2cb931c5163b8f632 100644 (file)
@@ -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)