Chromium Code Reviews| 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 #ifndef CHROME_APP_BREAKPAD_LINUX_H_ | 5 #ifndef CHROME_APP_BREAKPAD_LINUX_H_ |
| 6 #define CHROME_APP_BREAKPAD_LINUX_H_ | 6 #define CHROME_APP_BREAKPAD_LINUX_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 | 9 |
| 10 extern void InitCrashReporter(); | 10 extern void InitCrashReporter(); |
| 11 #if defined(OS_ANDROID) | |
| 12 extern void InitNonBrowserCrashReporter(int minidump_fd); | |
|
Lei Zhang
2012/10/19 23:22:34
Rename to InitNonBrowserCrashReporterForAndroid to
Jay Civelli
2012/10/22 22:09:48
Done.
| |
| 13 #else | |
| 14 extern void InitNonBrowserCrashReporter(); | |
|
Lei Zhang
2012/10/19 23:22:34
Not needed - Linux/CrOS does not call this.
Jay Civelli
2012/10/22 22:09:48
Done.
| |
| 15 #endif | |
| 11 bool IsCrashReporterEnabled(); | 16 bool IsCrashReporterEnabled(); |
| 12 | 17 |
| 13 static const size_t kMaxActiveURLSize = 1024; | 18 static const size_t kMaxActiveURLSize = 1024; |
| 14 static const size_t kGuidSize = 32; // 128 bits = 32 chars in hex. | 19 static const size_t kGuidSize = 32; // 128 bits = 32 chars in hex. |
| 15 static const size_t kDistroSize = 128; | 20 static const size_t kDistroSize = 128; |
| 16 #if defined(ADDRESS_SANITIZER) | 21 #if defined(ADDRESS_SANITIZER) |
| 17 static const size_t kMaxAsanReportSize = 1 << 16; | 22 static const size_t kMaxAsanReportSize = 1 << 16; |
| 18 #endif | 23 #endif |
| 19 | 24 |
| 20 struct BreakpadInfo { | 25 struct BreakpadInfo { |
| 26 int fd; // File descriptor to the Breakpad dump data. | |
| 21 const char* filename; // Path to the Breakpad dump data. | 27 const char* filename; // Path to the Breakpad dump data. |
| 22 #if defined(ADDRESS_SANITIZER) | 28 #if defined(ADDRESS_SANITIZER) |
| 23 const char* log_filename; // Path to the ASan log file. | 29 const char* log_filename; // Path to the ASan log file. |
| 24 const char* asan_report_str; // ASan report. | 30 const char* asan_report_str; // ASan report. |
| 25 unsigned asan_report_length; // Length of |asan_report_length|. | 31 unsigned asan_report_length; // Length of |asan_report_length|. |
| 26 #endif | 32 #endif |
| 27 const char* process_type; // Process type, e.g. "renderer". | 33 const char* process_type; // Process type, e.g. "renderer". |
| 28 unsigned process_type_length; // Length of |process_type|. | 34 unsigned process_type_length; // Length of |process_type|. |
| 29 const char* crash_url; // Active URL in the crashing process. | 35 const char* crash_url; // Active URL in the crashing process. |
| 30 unsigned crash_url_length; // Length of |crash_url|. | 36 unsigned crash_url_length; // Length of |crash_url|. |
| 31 const char* guid; // Client ID. | 37 const char* guid; // Client ID. |
| 32 unsigned guid_length; // Length of |guid|. | 38 unsigned guid_length; // Length of |guid|. |
| 33 const char* distro; // Linux distro string. | 39 const char* distro; // Linux distro string. |
| 34 unsigned distro_length; // Length of |distro|. | 40 unsigned distro_length; // Length of |distro|. |
| 35 bool upload; // Whether to upload or save crash dump. | 41 bool upload; // Whether to upload or save crash dump. |
| 36 uint64_t process_start_time; // Uptime of the crashing process. | 42 uint64_t process_start_time; // Uptime of the crashing process. |
| 37 size_t oom_size; // Amount of memory requested if OOM. | 43 size_t oom_size; // Amount of memory requested if OOM. |
| 38 uint64_t pid; // PID where applicable. | 44 uint64_t pid; // PID where applicable. |
| 39 }; | 45 }; |
| 40 | 46 |
| 41 extern void HandleCrashDump(const BreakpadInfo& info); | 47 extern void HandleCrashDump(const BreakpadInfo& info); |
| 42 | 48 |
| 43 #endif // CHROME_APP_BREAKPAD_LINUX_H_ | 49 #endif // CHROME_APP_BREAKPAD_LINUX_H_ |
| OLD | NEW |