| Index: chrome/browser/crash_handler_host_posix.cc
|
| diff --git a/chrome/browser/crash_handler_host_linux.cc b/chrome/browser/crash_handler_host_posix.cc
|
| similarity index 97%
|
| rename from chrome/browser/crash_handler_host_linux.cc
|
| rename to chrome/browser/crash_handler_host_posix.cc
|
| index 2d1ac2f21fcbad3a656cdb8f45c3187bc44d5f2c..fb93a0a21d1bdb8a36252462ed31d488e6acbbaf 100644
|
| --- a/chrome/browser/crash_handler_host_linux.cc
|
| +++ b/chrome/browser/crash_handler_host_posix.cc
|
| @@ -32,6 +32,12 @@
|
| #include "chrome/common/env_vars.h"
|
| #include "content/public/browser/browser_thread.h"
|
|
|
| +#if defined(OS_ANDROID)
|
| +#include <sys/linux-syscalls.h>
|
| +
|
| +#define SYS_read __NR_read
|
| +#endif
|
| +
|
| using content::BrowserThread;
|
| using google_breakpad::ExceptionHandler;
|
|
|
| @@ -312,8 +318,12 @@ void CrashHandlerHostLinux::OnFileCanReadWithoutBlocking(int fd) {
|
|
|
| info->distro_length = strlen(distro);
|
| info->distro = distro;
|
| -
|
| +#if defined(OS_ANDROID)
|
| + // Nothing gets uploaded in android.
|
| + info->upload = false;
|
| +#else
|
| info->upload = (getenv(env_vars::kHeadless) == NULL);
|
| +#endif
|
| info->process_start_time = uptime;
|
|
|
| BrowserThread::PostTask(
|
| @@ -350,10 +360,13 @@ void CrashHandlerHostLinux::WriteDumpFile(BreakpadInfo* info,
|
| delete[] crash_context;
|
|
|
| // Freed in CrashDumpTask();
|
| - char* minidump_filename_str = new char[minidump_filename.length() + 1];
|
| + unsigned minidump_filename_str_len = minidump_filename.length() + 1;
|
| + char* minidump_filename_str = new char[minidump_filename_str_len];
|
| minidump_filename.copy(minidump_filename_str, minidump_filename.length());
|
| minidump_filename_str[minidump_filename.length()] = '\0';
|
| info->filename = minidump_filename_str;
|
| + info->filename_length = minidump_filename_str_len;
|
| + info->pid = crashing_pid;
|
|
|
| BrowserThread::PostTask(
|
| BrowserThread::IO, FROM_HERE,
|
|
|