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

Side by Side Diff: crash_dumper.h

Issue 2868032: Remove source from crash-reporter and crash-dumper as they are no longer necessary. (Closed) Base URL: ssh://git@chromiumos-git//crash.git
Patch Set: Created 10 years, 6 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
« no previous file with comments | « Makefile ('k') | crash_dumper.cc » ('j') | 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 (c) 2010 The Chromium OS 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 #ifndef CRASH_CRASH_DUMPER_H_
6 #define CRASH_CRASH_DUMPER_H_
7
8 // Class to manage crash handling and dumping. When Enable is called, all
9 // crashes will be caught and stored to the appropriate crash directory.
10 // The directory will be:
11 // /home/chronos/user/crash - for all processes running as chronos
12 // /var/spool/crash - for all other processes
13 // The class takes care of creating the directories (even recreating them
14 // at crash time in case the cryptohome mounting changes from Enable time.
15 //
16 // For most use cases, there is no need to include or call any functions
17 // explicitly in this header file. Crash dumping is enabled just by linking
18 // in libcrash_dumper.
19
20 class CrashDumper {
21 public:
22 CrashDumper() {
23 Enable();
24 }
25
26 ~CrashDumper() {
27 if (IsEnabled()) {
28 Disable();
29 }
30 }
31
32 // Enable crash detection and dumping. Aborts if already enabled
33 // or crash reporting cannot be enabled. If the cryptohome is mounted
34 // while crash handling is enabled, later crashes may be lost.
35 static void Enable();
36
37 // Return if enabled.
38 static bool IsEnabled();
39
40 // Disable crash detection and dumping. Aborts if not enabled.
41 static void Disable();
42 };
43
44 #endif // CRASH_CRASH_DUMPER_H_
OLDNEW
« no previous file with comments | « Makefile ('k') | crash_dumper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698