Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(755)

Unified Diff: components/crash/app/breakpad_win.cc

Issue 985763004: Ensure that the base::debug crash key functions can be used from chrome.exe. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/crash/app/breakpad_win.cc
diff --git a/components/crash/app/breakpad_win.cc b/components/crash/app/breakpad_win.cc
index 528ea50ae7633b4d934be08cb7753a2f6f10991d..38020f447dc1341041bb3cce0d77907b49a389c9 100644
--- a/components/crash/app/breakpad_win.cc
+++ b/components/crash/app/breakpad_win.cc
@@ -281,6 +281,20 @@ long WINAPI ServiceExceptionFilter(EXCEPTION_POINTERS* info) {
return EXCEPTION_EXECUTE_HANDLER;
}
+// Installed via base::debug::SetCrashKeyReportingFunctions.
+void SetCrashKeyValueForBaseDebug(const base::StringPiece& key,
+ const base::StringPiece& value) {
+ DCHECK(CrashKeysWin::keeper());
+ CrashKeysWin::keeper()->SetCrashKeyValue(base::UTF8ToUTF16(key),
+ base::UTF8ToUTF16(value));
+}
+
+// Installed via base::debug::SetCrashKeyReportingFunctions.
+void ClearCrashKeyForBaseDebug(const base::StringPiece& key) {
+ DCHECK(CrashKeysWin::keeper());
+ CrashKeysWin::keeper()->ClearCrashKeyValue(base::UTF8ToUTF16(key));
+}
+
} // namespace
// NOTE: This function is used by SyzyASAN to annotate crash reports. If you
@@ -527,6 +541,9 @@ void InitCrashReporter(const std::string& process_type_switch) {
base::CommandLine::ForCurrentProcess(),
GetCrashReporterClient());
+ base::debug::SetCrashKeyReportingFunctions(&SetCrashKeyValueForBaseDebug,
+ &ClearCrashKeyForBaseDebug);
+
google_breakpad::ExceptionHandler::MinidumpCallback callback = NULL;
LPTOP_LEVEL_EXCEPTION_FILTER default_filter = NULL;
// We install the post-dump callback only for the browser and service
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698