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