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 #if defined(OS_ANDROID) |
519 const char kGoogleBreakpad[] = "google-breakpad"; | 520 const char kGoogleBreakpad[] = "google-breakpad"; |
| 521 #endif |
520 | 522 |
521 size_t WriteLog(const char* buf, size_t nbytes) { | 523 size_t WriteLog(const char* buf, size_t nbytes) { |
522 #if defined(OS_ANDROID) | 524 #if defined(OS_ANDROID) |
523 return __android_log_write(ANDROID_LOG_WARN, kGoogleBreakpad, buf); | 525 return __android_log_write(ANDROID_LOG_WARN, kGoogleBreakpad, buf); |
524 #else | 526 #else |
525 return sys_write(2, buf, nbytes); | 527 return sys_write(2, buf, nbytes); |
526 #endif | 528 #endif |
527 } | 529 } |
528 | 530 |
529 #if defined(OS_ANDROID) | 531 #if defined(OS_ANDROID) |
(...skipping 970 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1500 } else { | 1502 } else { |
1501 EnableNonBrowserCrashDumping(minidump_fd); | 1503 EnableNonBrowserCrashDumping(minidump_fd); |
1502 } | 1504 } |
1503 } | 1505 } |
1504 } | 1506 } |
1505 #endif // OS_ANDROID | 1507 #endif // OS_ANDROID |
1506 | 1508 |
1507 bool IsCrashReporterEnabled() { | 1509 bool IsCrashReporterEnabled() { |
1508 return g_is_crash_reporter_enabled; | 1510 return g_is_crash_reporter_enabled; |
1509 } | 1511 } |
OLD | NEW |