| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 // Set (override the default) core pipe limit file. | 51 // Set (override the default) core pipe limit file. |
| 52 void set_core_pipe_limit_file(const std::string &path) { | 52 void set_core_pipe_limit_file(const std::string &path) { |
| 53 core_pipe_limit_file_ = path; | 53 core_pipe_limit_file_ = path; |
| 54 } | 54 } |
| 55 | 55 |
| 56 private: | 56 private: |
| 57 friend class UserCollectorTest; | 57 friend class UserCollectorTest; |
| 58 FRIEND_TEST(UserCollectorTest, CopyOffProcFilesBadPath); | 58 FRIEND_TEST(UserCollectorTest, CopyOffProcFilesBadPath); |
| 59 FRIEND_TEST(UserCollectorTest, CopyOffProcFilesBadPid); | 59 FRIEND_TEST(UserCollectorTest, CopyOffProcFilesBadPid); |
| 60 FRIEND_TEST(UserCollectorTest, CopyOffProcFilesOK); | 60 FRIEND_TEST(UserCollectorTest, CopyOffProcFilesOK); |
| 61 FRIEND_TEST(UserCollectorTest, GetExecutableBaseNameFromPid); |
| 61 FRIEND_TEST(UserCollectorTest, GetIdFromStatus); | 62 FRIEND_TEST(UserCollectorTest, GetIdFromStatus); |
| 62 FRIEND_TEST(UserCollectorTest, GetProcessPath); | 63 FRIEND_TEST(UserCollectorTest, GetProcessPath); |
| 63 FRIEND_TEST(UserCollectorTest, GetSymlinkTarget); | 64 FRIEND_TEST(UserCollectorTest, GetSymlinkTarget); |
| 64 FRIEND_TEST(UserCollectorTest, GetUserInfoFromName); | 65 FRIEND_TEST(UserCollectorTest, GetUserInfoFromName); |
| 65 FRIEND_TEST(UserCollectorTest, ParseCrashAttributes); | 66 FRIEND_TEST(UserCollectorTest, ParseCrashAttributes); |
| 66 | 67 |
| 67 // Enumeration to pass to GetIdFromStatus. Must match the order | 68 // Enumeration to pass to GetIdFromStatus. Must match the order |
| 68 // that the kernel lists IDs in the status file. | 69 // that the kernel lists IDs in the status file. |
| 69 enum IdKind { | 70 enum IdKind { |
| 70 kIdReal = 0, // uid and gid | 71 kIdReal = 0, // uid and gid |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 std::string core_pattern_file_; | 120 std::string core_pattern_file_; |
| 120 std::string core_pipe_limit_file_; | 121 std::string core_pipe_limit_file_; |
| 121 std::string our_path_; | 122 std::string our_path_; |
| 122 bool initialized_; | 123 bool initialized_; |
| 123 | 124 |
| 124 static const char *kUserId; | 125 static const char *kUserId; |
| 125 static const char *kGroupId; | 126 static const char *kGroupId; |
| 126 }; | 127 }; |
| 127 | 128 |
| 128 #endif // _CRASH_REPORTER_USER_COLLECTOR_H_ | 129 #endif // _CRASH_REPORTER_USER_COLLECTOR_H_ |
| OLD | NEW |