Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(183)

Side by Side Diff: shell/crash/breakpad_linux_impl.h

Issue 1227333002: Add breakpad support to mojo shell apk. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Reuse chromium breakpad infrastructure. Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« shell/crash/breakpad_linux.cc ('K') | « shell/crash/breakpad_linux.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Internal header file for the Linux breakpad implementation. This file is
6 // shared between crash_handler_host_linux.cc and breakpad_linux.cc. It should
7 // only be used in files compiled with linux_breakpad=1.
8
9 #ifndef COMPONENTS_CRASH_APP_BREAKPAD_LINUX_IMPL_H_
10 #define COMPONENTS_CRASH_APP_BREAKPAD_LINUX_IMPL_H_
11
12 #include <sys/types.h>
13
14 #include "base/basictypes.h"
15 #include "breakpad/src/common/simple_string_dictionary.h"
16 #include "shell/crash/breakpad_linux.h"
17
18 namespace breakpad {
19
20 typedef google_breakpad::NonAllocatingMap<256, 256, 64> CrashKeyStorage;
21
22 // Define a preferred limit on minidump sizes, because Crash Server currently
23 // throws away any larger than 1.2MB (1.2 * 1024 * 1024). A value of -1 means
24 // no limit.
25 static const off_t kMaxMinidumpFileSize = 1258291;
26
27 const size_t kCrashIovSize = 6;
28
29 // BreakpadInfo describes a crash report.
30 // The minidump information can either be contained in a file descriptor (fd) or
31 // in a file (whose path is in filename).
32 struct BreakpadInfo {
33 int fd; // File descriptor to the Breakpad dump data.
34 const char* filename; // Path to the Breakpad dump data.
35 const char* process_type; // Process type, e.g. "renderer".
36 unsigned process_type_length; // Length of |process_type|.
37 const char* distro; // Linux distro string.
38 unsigned distro_length; // Length of |distro|.
39 uint64_t process_start_time; // Uptime of the crashing process.
40 size_t oom_size; // Amount of memory requested if OOM.
41 uint64_t pid; // PID where applicable.
42 CrashKeyStorage* crash_keys;
43 };
44
45 extern void HandleCrashDump(const BreakpadInfo& info);
46
47 } // namespace breakpad
48
49 #endif // COMPONENTS_CRASH_APP_BREAKPAD_LINUX_IMPL_H_
OLDNEW
« shell/crash/breakpad_linux.cc ('K') | « shell/crash/breakpad_linux.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698