| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 friend class UserCollectorTest; | 56 friend class UserCollectorTest; |
| 57 FRIEND_TEST(UserCollectorTest, CopyOffProcFilesBadPath); | 57 FRIEND_TEST(UserCollectorTest, CopyOffProcFilesBadPath); |
| 58 FRIEND_TEST(UserCollectorTest, CopyOffProcFilesBadPid); | 58 FRIEND_TEST(UserCollectorTest, CopyOffProcFilesBadPid); |
| 59 FRIEND_TEST(UserCollectorTest, CopyOffProcFilesOK); | 59 FRIEND_TEST(UserCollectorTest, CopyOffProcFilesOK); |
| 60 FRIEND_TEST(UserCollectorTest, GetExecutableBaseNameFromPid); | 60 FRIEND_TEST(UserCollectorTest, GetExecutableBaseNameFromPid); |
| 61 FRIEND_TEST(UserCollectorTest, GetIdFromStatus); | 61 FRIEND_TEST(UserCollectorTest, GetIdFromStatus); |
| 62 FRIEND_TEST(UserCollectorTest, GetProcessPath); | 62 FRIEND_TEST(UserCollectorTest, GetProcessPath); |
| 63 FRIEND_TEST(UserCollectorTest, GetSymlinkTarget); | 63 FRIEND_TEST(UserCollectorTest, GetSymlinkTarget); |
| 64 FRIEND_TEST(UserCollectorTest, GetUserInfoFromName); | 64 FRIEND_TEST(UserCollectorTest, GetUserInfoFromName); |
| 65 FRIEND_TEST(UserCollectorTest, ParseCrashAttributes); | 65 FRIEND_TEST(UserCollectorTest, ParseCrashAttributes); |
| 66 FRIEND_TEST(UserCollectorTest, ShouldDumpChromeOverridesDeveloperImage); |
| 67 FRIEND_TEST(UserCollectorTest, ShouldDumpDeveloperImageOverridesConsent); |
| 68 FRIEND_TEST(UserCollectorTest, ShouldDumpUseConsentProductionImage); |
| 66 | 69 |
| 67 // Enumeration to pass to GetIdFromStatus. Must match the order | 70 // Enumeration to pass to GetIdFromStatus. Must match the order |
| 68 // that the kernel lists IDs in the status file. | 71 // that the kernel lists IDs in the status file. |
| 69 enum IdKind { | 72 enum IdKind { |
| 70 kIdReal = 0, // uid and gid | 73 kIdReal = 0, // uid and gid |
| 71 kIdEffective = 1, // euid and egid | 74 kIdEffective = 1, // euid and egid |
| 72 kIdSet = 2, // suid and sgid | 75 kIdSet = 2, // suid and sgid |
| 73 kIdFileSystem = 3, // fsuid and fsgid | 76 kIdFileSystem = 3, // fsuid and fsgid |
| 74 kIdMax | 77 kIdMax |
| 75 }; | 78 }; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 const FilePath &temp_directory); | 110 const FilePath &temp_directory); |
| 108 bool ConvertCoreToMinidump(pid_t pid, | 111 bool ConvertCoreToMinidump(pid_t pid, |
| 109 const FilePath &container_dir, | 112 const FilePath &container_dir, |
| 110 const FilePath &core_path, | 113 const FilePath &core_path, |
| 111 const FilePath &minidump_path); | 114 const FilePath &minidump_path); |
| 112 bool ConvertAndEnqueueCrash(int pid, const std::string &exec_name, | 115 bool ConvertAndEnqueueCrash(int pid, const std::string &exec_name, |
| 113 bool *out_of_capacity); | 116 bool *out_of_capacity); |
| 114 bool ParseCrashAttributes(const std::string &crash_attributes, | 117 bool ParseCrashAttributes(const std::string &crash_attributes, |
| 115 pid_t *pid, int *signal, | 118 pid_t *pid, int *signal, |
| 116 std::string *kernel_supplied_name); | 119 std::string *kernel_supplied_name); |
| 120 bool ShouldDump(bool has_owner_consent, |
| 121 bool is_developer, |
| 122 bool is_crash_test_in_progress, |
| 123 const std::string &exec, |
| 124 std::string *reason); |
| 117 | 125 |
| 118 bool generate_diagnostics_; | 126 bool generate_diagnostics_; |
| 119 std::string core_pattern_file_; | 127 std::string core_pattern_file_; |
| 120 std::string core_pipe_limit_file_; | 128 std::string core_pipe_limit_file_; |
| 121 std::string our_path_; | 129 std::string our_path_; |
| 122 bool initialized_; | 130 bool initialized_; |
| 123 | 131 |
| 124 static const char *kUserId; | 132 static const char *kUserId; |
| 125 static const char *kGroupId; | 133 static const char *kGroupId; |
| 126 }; | 134 }; |
| 127 | 135 |
| 128 #endif // _CRASH_REPORTER_USER_COLLECTOR_H_ | 136 #endif // _CRASH_REPORTER_USER_COLLECTOR_H_ |
| OLD | NEW |