| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // For linux_syscall_support.h. This makes it safe to call embedded system | 5 // For linux_syscall_support.h. This makes it safe to call embedded system |
| 6 // calls when in seccomp mode. | 6 // calls when in seccomp mode. |
| 7 | 7 |
| 8 #include "chrome/app/breakpad_linux.h" | 8 #include "chrome/app/breakpad_linux.h" |
| 9 | 9 |
| 10 #include <fcntl.h> | 10 #include <fcntl.h> |
| (...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 509 AddItem(file_data, file_size); | 509 AddItem(file_data, file_size); |
| 510 Flush(); | 510 Flush(); |
| 511 } | 511 } |
| 512 #endif | 512 #endif |
| 513 | 513 |
| 514 void DumpProcess() { | 514 void DumpProcess() { |
| 515 if (g_breakpad) | 515 if (g_breakpad) |
| 516 g_breakpad->WriteMinidump(); | 516 g_breakpad->WriteMinidump(); |
| 517 } | 517 } |
| 518 | 518 |
| 519 const char kGoogleBreakpad[] = "google-breakpad"; | |
| 520 | |
| 521 size_t WriteLog(const char* buf, size_t nbytes) { | 519 size_t WriteLog(const char* buf, size_t nbytes) { |
| 522 #if defined(OS_ANDROID) | 520 #if defined(OS_ANDROID) |
| 523 return __android_log_write(ANDROID_LOG_WARN, kGoogleBreakpad, buf); | 521 return __android_log_write(ANDROID_LOG_WARN, kGoogleBreakpad, buf); |
| 524 #else | 522 #else |
| 525 return sys_write(2, buf, nbytes); | 523 return sys_write(2, buf, nbytes); |
| 526 #endif | 524 #endif |
| 527 } | 525 } |
| 528 | 526 |
| 529 #if defined(OS_ANDROID) | 527 #if defined(OS_ANDROID) |
| 530 // Android's native crash handler outputs a diagnostic tombstone to the device | 528 // Android's native crash handler outputs a diagnostic tombstone to the device |
| (...skipping 969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1500 } else { | 1498 } else { |
| 1501 EnableNonBrowserCrashDumping(minidump_fd); | 1499 EnableNonBrowserCrashDumping(minidump_fd); |
| 1502 } | 1500 } |
| 1503 } | 1501 } |
| 1504 } | 1502 } |
| 1505 #endif // OS_ANDROID | 1503 #endif // OS_ANDROID |
| 1506 | 1504 |
| 1507 bool IsCrashReporterEnabled() { | 1505 bool IsCrashReporterEnabled() { |
| 1508 return g_is_crash_reporter_enabled; | 1506 return g_is_crash_reporter_enabled; |
| 1509 } | 1507 } |
| OLD | NEW |