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

Side by Side Diff: unclean_shutdown_collector.h

Issue 3179006: Collect and send kernel crash diagnostics (Closed) Base URL: ssh://git@chromiumos-git//crash-reporter.git
Patch Set: Respond to reviews Created 10 years, 4 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 | « kernel_collector_test.cc ('k') | unclean_shutdown_collector.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_REPORTER_UNCLEAN_SHUTDOWN_COLLECTOR_H_
6 #define _CRASH_REPORTER_UNCLEAN_SHUTDOWN_COLLECTOR_H_
7
8 #include <string>
9
10 #include "base/file_path.h"
11 #include "crash-reporter/crash_collector.h"
12 #include "gtest/gtest_prod.h" // for FRIEND_TEST
13
14 // Unclean shutdown collector.
15 class UncleanShutdownCollector : public CrashCollector {
16 public:
17 UncleanShutdownCollector();
18 virtual ~UncleanShutdownCollector();
19
20 // Enable collection - signal that a boot has started.
21 bool Enable();
22
23 // Collect if there is was an unclean shutdown. Returns true if
24 // there was, false otherwise.
25 bool Collect();
26
27 // Disable collection - signal that the system has been shutdown cleanly.
28 bool Disable();
29
30 private:
31 friend class UncleanShutdownCollectorTest;
32 FRIEND_TEST(UncleanShutdownCollectorTest, EnableCannotWrite);
33
34 bool DeleteUncleanShutdownFile();
35
36 const char *unclean_shutdown_file_;
37 };
38
39 #endif // _CRASH_REPORTER_UNCLEAN_SHUTDOWN_COLLECTOR_H_
OLDNEW
« no previous file with comments | « kernel_collector_test.cc ('k') | unclean_shutdown_collector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698