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_LINUXISH_H_ | 5 #ifndef CHROME_APP_BREAKPAD_LINUX_H_ |
6 #define CHROME_APP_BREAKPAD_LINUXISH_H_ | 6 #define CHROME_APP_BREAKPAD_LINUX_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 | 10 |
11 extern void InitCrashReporter(); | 11 extern void InitCrashReporter(); |
12 bool IsCrashReporterEnabled(); | 12 bool IsCrashReporterEnabled(); |
13 | 13 |
14 static const size_t kMaxActiveURLSize = 1024; | 14 static const size_t kMaxActiveURLSize = 1024; |
15 static const size_t kGuidSize = 32; // 128 bits = 32 chars in hex. | 15 static const size_t kGuidSize = 32; // 128 bits = 32 chars in hex. |
16 static const size_t kDistroSize = 128; | 16 static const size_t kDistroSize = 128; |
17 | 17 |
18 struct BreakpadInfo { | 18 struct BreakpadInfo { |
19 const char* filename; // Path to the Breakpad dump data. | 19 const char* filename; // Path to the Breakpad dump data. |
20 const char* process_type; // Process type, e.g. "renderer". | 20 const char* process_type; // Process type, e.g. "renderer". |
21 unsigned process_type_length; // Length of |process_type|. | 21 unsigned process_type_length; // Length of |process_type|. |
22 const char* crash_url; // Active URL in the crashing process. | 22 const char* crash_url; // Active URL in the crashing process. |
23 unsigned crash_url_length; // Length of |crash_url|. | 23 unsigned crash_url_length; // Length of |crash_url|. |
24 const char* guid; // Client ID. | 24 const char* guid; // Client ID. |
25 unsigned guid_length; // Length of |guid|. | 25 unsigned guid_length; // Length of |guid|. |
26 const char* distro; // Linux distro string. | 26 const char* distro; // Linux distro string. |
27 unsigned distro_length; // Length of |distro|. | 27 unsigned distro_length; // Length of |distro|. |
28 bool upload; // Whether to upload or save crash dump. | 28 bool upload; // Whether to upload or save crash dump. |
29 uint64_t process_start_time; // Uptime of the crashing process. | 29 uint64_t process_start_time; // Uptime of the crashing process. |
30 size_t oom_size; // Amount of memory requested if OOM. | 30 size_t oom_size; // Amount of memory requested if OOM. |
31 uint64_t pid; // PID where applicable. | 31 uint64_t pid; // PID where applicable. |
32 }; | 32 }; |
33 | 33 |
34 extern void HandleCrashDump(const BreakpadInfo& info); | 34 extern void HandleCrashDump(const BreakpadInfo& info); |
35 | 35 |
36 #endif // CHROME_APP_BREAKPAD_LINUXISH_H_ | 36 #endif // CHROME_APP_BREAKPAD_LINUX_H_ |
OLD | NEW |