| 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 #define SYS_SYSCALL_ENTRYPOINT "playground$syscallEntryPoint" | 7 #define SYS_SYSCALL_ENTRYPOINT "playground$syscallEntryPoint" |
| 8 | 8 |
| 9 #include "chrome/app/breakpad_linux.h" | 9 #include "chrome/app/breakpad_linux.h" |
| 10 | 10 |
| (...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 521 FilePath dumps_path(tmp_path); | 521 FilePath dumps_path(tmp_path); |
| 522 if (PathService::Get(chrome::DIR_CRASH_DUMPS, &dumps_path)) { | 522 if (PathService::Get(chrome::DIR_CRASH_DUMPS, &dumps_path)) { |
| 523 FilePath logfile = | 523 FilePath logfile = |
| 524 dumps_path.AppendASCII(CrashUploadList::kReporterLogFilename); | 524 dumps_path.AppendASCII(CrashUploadList::kReporterLogFilename); |
| 525 std::string logfile_str = logfile.value(); | 525 std::string logfile_str = logfile.value(); |
| 526 const size_t crash_log_path_len = logfile_str.size() + 1; | 526 const size_t crash_log_path_len = logfile_str.size() + 1; |
| 527 g_crash_log_path = new char[crash_log_path_len]; | 527 g_crash_log_path = new char[crash_log_path_len]; |
| 528 strncpy(g_crash_log_path, logfile_str.c_str(), crash_log_path_len); | 528 strncpy(g_crash_log_path, logfile_str.c_str(), crash_log_path_len); |
| 529 } | 529 } |
| 530 DCHECK(!g_breakpad); | 530 DCHECK(!g_breakpad); |
| 531 MinidumpDescriptor minidump_descriptor(dumps_path.value()); |
| 532 minidump_descriptor.set_size_limit(kMaxMinidumpFileSize); |
| 531 #if defined(OS_ANDROID) | 533 #if defined(OS_ANDROID) |
| 532 unattended = true; // Android never uploads directly. | 534 unattended = true; // Android never uploads directly. |
| 533 #endif | 535 #endif |
| 534 if (unattended) { | 536 if (unattended) { |
| 535 g_breakpad = new ExceptionHandler( | 537 g_breakpad = new ExceptionHandler( |
| 536 MinidumpDescriptor(dumps_path.value()), | 538 minidump_descriptor, |
| 537 NULL, | 539 NULL, |
| 538 CrashDoneNoUpload, | 540 CrashDoneNoUpload, |
| 539 NULL, | 541 NULL, |
| 540 true, // Install handlers. | 542 true, // Install handlers. |
| 541 -1); // Server file descriptor. -1 for in-process. | 543 -1); // Server file descriptor. -1 for in-process. |
| 542 return; | 544 return; |
| 543 } | 545 } |
| 544 | 546 |
| 545 #if !defined(OS_ANDROID) | 547 #if !defined(OS_ANDROID) |
| 546 // Attended mode | 548 // Attended mode |
| 547 g_breakpad = new ExceptionHandler( | 549 g_breakpad = new ExceptionHandler( |
| 548 MinidumpDescriptor(dumps_path.value()), | 550 minidump_descriptor, |
| 549 NULL, | 551 NULL, |
| 550 CrashDoneUpload, | 552 CrashDoneUpload, |
| 551 NULL, | 553 NULL, |
| 552 true, // Install handlers. | 554 true, // Install handlers. |
| 553 -1); // Server file descriptor. -1 for in-process. | 555 -1); // Server file descriptor. -1 for in-process. |
| 554 #endif | 556 #endif |
| 555 } | 557 } |
| 556 | 558 |
| 557 #if defined(OS_ANDROID) | 559 #if defined(OS_ANDROID) |
| 558 bool CrashDoneInProcessNoUpload( | 560 bool CrashDoneInProcessNoUpload( |
| (...skipping 899 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1458 void InitNonBrowserCrashReporterForAndroid(int minidump_fd) { | 1460 void InitNonBrowserCrashReporterForAndroid(int minidump_fd) { |
| 1459 const CommandLine* command_line = CommandLine::ForCurrentProcess(); | 1461 const CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| 1460 if (command_line->HasSwitch(switches::kEnableCrashReporter)) | 1462 if (command_line->HasSwitch(switches::kEnableCrashReporter)) |
| 1461 EnableNonBrowserCrashDumping(minidump_fd); | 1463 EnableNonBrowserCrashDumping(minidump_fd); |
| 1462 } | 1464 } |
| 1463 #endif // OS_ANDROID | 1465 #endif // OS_ANDROID |
| 1464 | 1466 |
| 1465 bool IsCrashReporterEnabled() { | 1467 bool IsCrashReporterEnabled() { |
| 1466 return g_is_crash_reporter_enabled; | 1468 return g_is_crash_reporter_enabled; |
| 1467 } | 1469 } |
| OLD | NEW |