| 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 10 matching lines...) Expand all Loading... |
| 21 | 21 |
| 22 // Initialize the user crash collector for detection of crashes, | 22 // Initialize the user crash collector for detection of crashes, |
| 23 // given a crash counting function, the path to this executable, | 23 // given a crash counting function, the path to this executable, |
| 24 // metrics collection enabled oracle, and system logger facility. | 24 // metrics collection enabled oracle, and system logger facility. |
| 25 // Crash detection/reporting is not enabled until Enable is called. | 25 // Crash detection/reporting is not enabled until Enable is called. |
| 26 // |generate_diagnostics| is used to indicate whether or not to try | 26 // |generate_diagnostics| is used to indicate whether or not to try |
| 27 // to generate a minidump from crashes. | 27 // to generate a minidump from crashes. |
| 28 void Initialize(CountCrashFunction count_crash, | 28 void Initialize(CountCrashFunction count_crash, |
| 29 const std::string &our_path, | 29 const std::string &our_path, |
| 30 IsFeedbackAllowedFunction is_metrics_allowed, | 30 IsFeedbackAllowedFunction is_metrics_allowed, |
| 31 SystemLogging *logger, | |
| 32 bool generate_diagnostics); | 31 bool generate_diagnostics); |
| 33 | 32 |
| 34 virtual ~UserCollector(); | 33 virtual ~UserCollector(); |
| 35 | 34 |
| 36 // Enable collection. | 35 // Enable collection. |
| 37 bool Enable() { return SetUpInternal(true); } | 36 bool Enable() { return SetUpInternal(true); } |
| 38 | 37 |
| 39 // Disable collection. | 38 // Disable collection. |
| 40 bool Disable() { return SetUpInternal(false); } | 39 bool Disable() { return SetUpInternal(false); } |
| 41 | 40 |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 std::string core_pattern_file_; | 119 std::string core_pattern_file_; |
| 121 std::string core_pipe_limit_file_; | 120 std::string core_pipe_limit_file_; |
| 122 std::string our_path_; | 121 std::string our_path_; |
| 123 bool initialized_; | 122 bool initialized_; |
| 124 | 123 |
| 125 static const char *kUserId; | 124 static const char *kUserId; |
| 126 static const char *kGroupId; | 125 static const char *kGroupId; |
| 127 }; | 126 }; |
| 128 | 127 |
| 129 #endif // _CRASH_REPORTER_USER_COLLECTOR_H_ | 128 #endif // _CRASH_REPORTER_USER_COLLECTOR_H_ |
| OLD | NEW |