| 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_USER_COLLECTOR_H_ | 5 #ifndef _CRASH_REPORTER_USER_COLLECTOR_H_ |
| 6 #define _CRASH_REPORTER_USER_COLLECTOR_H_ | 6 #define _CRASH_REPORTER_USER_COLLECTOR_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 bool Disable() { return SetUpInternal(false); } | 40 bool Disable() { return SetUpInternal(false); } |
| 41 | 41 |
| 42 // Handle a specific user crash. Returns true on success. | 42 // Handle a specific user crash. Returns true on success. |
| 43 bool HandleCrash(int signal, int pid, const char *force_exec); | 43 bool HandleCrash(int signal, int pid, const char *force_exec); |
| 44 | 44 |
| 45 // Set (override the default) core file pattern. | 45 // Set (override the default) core file pattern. |
| 46 void set_core_pattern_file(const std::string &pattern) { | 46 void set_core_pattern_file(const std::string &pattern) { |
| 47 core_pattern_file_ = pattern; | 47 core_pattern_file_ = pattern; |
| 48 } | 48 } |
| 49 | 49 |
| 50 // Set (override the default) core pipe limit file. |
| 51 void set_core_pipe_limit_file(const std::string &path) { |
| 52 core_pipe_limit_file_ = path; |
| 53 } |
| 54 |
| 50 private: | 55 private: |
| 51 friend class UserCollectorTest; | 56 friend class UserCollectorTest; |
| 52 FRIEND_TEST(UserCollectorTest, CopyOffProcFilesBadPath); | 57 FRIEND_TEST(UserCollectorTest, CopyOffProcFilesBadPath); |
| 53 FRIEND_TEST(UserCollectorTest, CopyOffProcFilesBadPid); | 58 FRIEND_TEST(UserCollectorTest, CopyOffProcFilesBadPid); |
| 54 FRIEND_TEST(UserCollectorTest, CopyOffProcFilesOK); | 59 FRIEND_TEST(UserCollectorTest, CopyOffProcFilesOK); |
| 55 FRIEND_TEST(UserCollectorTest, GetIdFromStatus); | 60 FRIEND_TEST(UserCollectorTest, GetIdFromStatus); |
| 56 FRIEND_TEST(UserCollectorTest, GetProcessPath); | 61 FRIEND_TEST(UserCollectorTest, GetProcessPath); |
| 57 FRIEND_TEST(UserCollectorTest, GetSymlinkTarget); | 62 FRIEND_TEST(UserCollectorTest, GetSymlinkTarget); |
| 58 FRIEND_TEST(UserCollectorTest, GetUserInfoFromName); | 63 FRIEND_TEST(UserCollectorTest, GetUserInfoFromName); |
| 59 | 64 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 const FilePath &temp_directory); | 105 const FilePath &temp_directory); |
| 101 bool ConvertCoreToMinidump(pid_t pid, | 106 bool ConvertCoreToMinidump(pid_t pid, |
| 102 const FilePath &container_dir, | 107 const FilePath &container_dir, |
| 103 const FilePath &core_path, | 108 const FilePath &core_path, |
| 104 const FilePath &minidump_path); | 109 const FilePath &minidump_path); |
| 105 bool ConvertAndEnqueueCrash(int pid, const std::string &exec_name, | 110 bool ConvertAndEnqueueCrash(int pid, const std::string &exec_name, |
| 106 bool *out_of_capacity); | 111 bool *out_of_capacity); |
| 107 | 112 |
| 108 bool generate_diagnostics_; | 113 bool generate_diagnostics_; |
| 109 std::string core_pattern_file_; | 114 std::string core_pattern_file_; |
| 115 std::string core_pipe_limit_file_; |
| 110 std::string our_path_; | 116 std::string our_path_; |
| 111 bool initialized_; | 117 bool initialized_; |
| 112 | 118 |
| 113 // String containing the current log of crash handling errors. | 119 // String containing the current log of crash handling errors. |
| 114 std::string error_log_; | 120 std::string error_log_; |
| 115 | 121 |
| 116 static const char *kUserId; | 122 static const char *kUserId; |
| 117 static const char *kGroupId; | 123 static const char *kGroupId; |
| 118 }; | 124 }; |
| 119 | 125 |
| 120 #endif // _CRASH_REPORTER_USER_COLLECTOR_H_ | 126 #endif // _CRASH_REPORTER_USER_COLLECTOR_H_ |
| OLD | NEW |