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

Side by Side Diff: src/platform/crash/crash_dumper.h

Issue 2128004: Adding in-process crash dumping library and crash uploader (Closed) Base URL: ssh://git@chromiumos-git//chromeos
Patch Set: respond to review and add another test Created 10 years, 7 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 | « src/platform/crash/Makefile ('k') | src/platform/crash/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 #include <string>
9
10 #include "base/scoped_ptr.h"
11
12 namespace google_breakpad {
13 class ExceptionHandler;
14 }
15
16 class FilePath;
17
18 // Class to manage crash handling and dumping. When Enable is called, all
19 // crashes will be caught and stored to the appropriate crash directory.
20 // The directory will be:
21 // /home/chronos/user/crash - for all processes running as chronos
22 // /var/spool/crash - for all other processes
23 // The class takes care of creating the directories (even recreating them
24 // at crash time in case the cryptohome mounting changes from Enable time.
25
26 class CrashDumper {
27 public:
28 ~CrashDumper() {
29 if (IsEnabled()) {
30 Disable();
31 }
32 }
33
34 // Enable crash detection and dumping. Aborts if already enabled
35 // or crash reporting cannot be enabled. If the cryptohome is mounted
36 // while crash handling is enabled, later crashes may be lost.
37 static void Enable();
38
39 // Return if enabled.
40 static bool IsEnabled();
41
42 // Disable crash detection and dumping. Aborts if not enabled.
43 static void Disable();
44 };
45
46 #endif // CRASH_CRASH_DUMPER_H_
OLDNEW
« no previous file with comments | « src/platform/crash/Makefile ('k') | src/platform/crash/crash_dumper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698