OLD | NEW |
1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 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 | 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 _CRASH_REPORTER_KERNEL_COLLECTOR_H_ | 5 #ifndef _CRASH_REPORTER_KERNEL_COLLECTOR_H_ |
6 #define _CRASH_REPORTER_KERNEL_COLLECTOR_H_ | 6 #define _CRASH_REPORTER_KERNEL_COLLECTOR_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 return is_enabled_; | 30 return is_enabled_; |
31 } | 31 } |
32 | 32 |
33 // Collect any preserved kernel crash dump. Returns true if there was | 33 // Collect any preserved kernel crash dump. Returns true if there was |
34 // a dump (even if there were problems storing the dump), false otherwise. | 34 // a dump (even if there were problems storing the dump), false otherwise. |
35 bool Collect(); | 35 bool Collect(); |
36 | 36 |
37 private: | 37 private: |
38 friend class KernelCollectorTest; | 38 friend class KernelCollectorTest; |
39 FRIEND_TEST(KernelCollectorTest, ClearPreservedDump); | 39 FRIEND_TEST(KernelCollectorTest, ClearPreservedDump); |
40 FRIEND_TEST(KernelCollectorTest, GetKernelCrashPath); | |
41 FRIEND_TEST(KernelCollectorTest, LoadPreservedDump); | 40 FRIEND_TEST(KernelCollectorTest, LoadPreservedDump); |
42 FRIEND_TEST(KernelCollectorTest, CollectOK); | 41 FRIEND_TEST(KernelCollectorTest, CollectOK); |
43 | 42 |
44 bool LoadPreservedDump(std::string *contents); | 43 bool LoadPreservedDump(std::string *contents); |
45 bool ClearPreservedDump(); | 44 bool ClearPreservedDump(); |
46 FilePath GetKernelCrashPath(const FilePath &root_crash_path, | |
47 time_t timestamp); | |
48 | 45 |
49 bool is_enabled_; | 46 bool is_enabled_; |
50 FilePath preserved_dump_path_; | 47 FilePath preserved_dump_path_; |
51 static const char kClearingSequence[]; | 48 static const char kClearingSequence[]; |
52 }; | 49 }; |
53 | 50 |
54 #endif // _CRASH_REPORTER_KERNEL_COLLECTOR_H_ | 51 #endif // _CRASH_REPORTER_KERNEL_COLLECTOR_H_ |
OLD | NEW |