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

Unified Diff: android_webview/common/crash_reporter/aw_microdump_crash_reporter.cc

Issue 2717223003: Add WebView-specific whitelist for crash keys. (Closed)
Patch Set: Created 3 years, 10 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
Index: android_webview/common/crash_reporter/aw_microdump_crash_reporter.cc
diff --git a/android_webview/common/crash_reporter/aw_microdump_crash_reporter.cc b/android_webview/common/crash_reporter/aw_microdump_crash_reporter.cc
index 44c3b7cc8712b30377f5f9987edb08ba33059bbc..4b1a7f92e52e83b6e92fc5376a7a808031b692dd 100644
--- a/android_webview/common/crash_reporter/aw_microdump_crash_reporter.cc
+++ b/android_webview/common/crash_reporter/aw_microdump_crash_reporter.cc
@@ -10,6 +10,7 @@
#include "android_webview/common/crash_reporter/crash_keys.h"
#include "base/android/build_info.h"
#include "base/base_paths_android.h"
+#include "base/debug/crash_logging.h"
#include "base/debug/dump_without_crashing.h"
#include "base/files/file_path.h"
#include "base/lazy_instance.h"
@@ -36,6 +37,7 @@ class AwCrashReporterClient : public ::crash_reporter::CrashReporterClient {
// crash_reporter::CrashReporterClient implementation.
size_t RegisterCrashKeys() override;
+ std::vector<base::debug::CrashKey> GetWhiteListedCrashKeys() override;
bool IsRunningUnattended() override { return false; }
bool GetCollectStatsConsent() override {
@@ -86,6 +88,11 @@ size_t AwCrashReporterClient::RegisterCrashKeys() {
return crash_keys::RegisterWebViewCrashKeys();
}
+std::vector<base::debug::CrashKey>
+AwCrashReporterClient::GetWhiteListedCrashKeys() {
+ return crash_keys::GetWhiteListedWebViewCrashKeys();
+}
+
base::LazyInstance<AwCrashReporterClient>::Leaky g_crash_reporter_client =
LAZY_INSTANCE_INITIALIZER;
@@ -182,6 +189,7 @@ void EnableCrashReporter(const std::string& process_type, int crash_signal_fd) {
process_type == breakpad::kBrowserProcessType;
if (is_browser_process) {
breakpad::InitCrashReporter("", sanitization_info);
+ base::debug::SetCrashKeyValue("AW_DEBUG_KEY", "AW_DEBUG_VALUE");
} else {
breakpad::InitNonBrowserCrashReporterForAndroid(process_type,
sanitization_info);
« no previous file with comments | « no previous file | android_webview/common/crash_reporter/crash_keys.h » ('j') | android_webview/common/crash_reporter/crash_keys.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698