OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium 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 COMPONENTS_CRASH_CONTENT_APP_CRASH_REPORTER_CLIENT_H_ | 5 #ifndef COMPONENTS_CRASH_CONTENT_APP_CRASH_REPORTER_CLIENT_H_ |
6 #define COMPONENTS_CRASH_CONTENT_APP_CRASH_REPORTER_CLIENT_H_ | 6 #define COMPONENTS_CRASH_CONTENT_APP_CRASH_REPORTER_CLIENT_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
| 11 #include <vector> |
11 | 12 |
| 13 #include "base/debug/crash_logging.h" |
12 #include "base/strings/string16.h" | 14 #include "base/strings/string16.h" |
13 #include "build/build_config.h" | 15 #include "build/build_config.h" |
14 | 16 |
15 #if !defined(OS_WIN) | 17 #if !defined(OS_WIN) |
16 namespace base { | 18 namespace base { |
17 class FilePath; | 19 class FilePath; |
18 } | 20 } |
19 #endif | 21 #endif |
20 | 22 |
21 #if defined(OS_MACOSX) | 23 #if defined(OS_MACOSX) |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 #if defined(OS_WIN) | 139 #if defined(OS_WIN) |
138 virtual bool GetCrashMetricsLocation(base::string16* metrics_dir); | 140 virtual bool GetCrashMetricsLocation(base::string16* metrics_dir); |
139 #else | 141 #else |
140 virtual bool GetCrashMetricsLocation(base::FilePath* metrics_dir); | 142 virtual bool GetCrashMetricsLocation(base::FilePath* metrics_dir); |
141 #endif | 143 #endif |
142 | 144 |
143 // Register all of the potential crash keys that can be sent to the crash | 145 // Register all of the potential crash keys that can be sent to the crash |
144 // reporting server. Returns the size of the union of all keys. | 146 // reporting server. Returns the size of the union of all keys. |
145 virtual size_t RegisterCrashKeys(); | 147 virtual size_t RegisterCrashKeys(); |
146 | 148 |
| 149 // TODO #if defined(USE_WHITELIST)? (would that work with monochrome? I.e. |
| 150 // will this code differ between clank and WebView - or will we compile it |
| 151 // with the same defines?) |
| 152 virtual std::vector<base::debug::CrashKey> GetWhiteListedCrashKeys(); |
| 153 |
147 // Returns true if running in unattended mode (for automated testing). | 154 // Returns true if running in unattended mode (for automated testing). |
148 virtual bool IsRunningUnattended(); | 155 virtual bool IsRunningUnattended(); |
149 | 156 |
150 // Returns true if the user has given consent to collect stats. | 157 // Returns true if the user has given consent to collect stats. |
151 virtual bool GetCollectStatsConsent(); | 158 virtual bool GetCollectStatsConsent(); |
152 | 159 |
153 // Returns true if the client is currently in the chosen sample that will | 160 // Returns true if the client is currently in the chosen sample that will |
154 // report stats and crashes. Crashes should only be reported if this function | 161 // report stats and crashes. Crashes should only be reported if this function |
155 // returns true and GetCollectStatsConsent returns true. | 162 // returns true and GetCollectStatsConsent returns true. |
156 virtual bool GetCollectStatsInSample(); | 163 virtual bool GetCollectStatsInSample(); |
(...skipping 17 matching lines...) Expand all Loading... |
174 virtual bool ShouldEnableBreakpadMicrodumps(); | 181 virtual bool ShouldEnableBreakpadMicrodumps(); |
175 #endif | 182 #endif |
176 | 183 |
177 // Returns true if breakpad should run in the given process type. | 184 // Returns true if breakpad should run in the given process type. |
178 virtual bool EnableBreakpadForProcess(const std::string& process_type); | 185 virtual bool EnableBreakpadForProcess(const std::string& process_type); |
179 }; | 186 }; |
180 | 187 |
181 } // namespace crash_reporter | 188 } // namespace crash_reporter |
182 | 189 |
183 #endif // COMPONENTS_CRASH_CONTENT_APP_CRASH_REPORTER_CLIENT_H_ | 190 #endif // COMPONENTS_CRASH_CONTENT_APP_CRASH_REPORTER_CLIENT_H_ |
OLD | NEW |