From eefe67009f54d968d650d9e231a3799a12cffd16 Mon Sep 17 00:00:00 2001 From: Drew Stonebraker Date: Fri, 19 Apr 2019 00:46:11 +0000 Subject: [PATCH] Make standalone webview crash dump percentage contingent on channel We currently submit a manual CL every time we want to change the hardcoded crash dump percentage for standalone webview due to releasing a beta apk or promoting a beta to stable. Now that standalone webview has channels (https://bugs.chromium.org/p/chromium/issues/detail?id=919216), add logic to include different crash reporting rates for different channels. Bug: 954298 Change-Id: I3a6a9e32e67260cdb2190ea5b394c514d6df0c06 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1574362 Reviewed-by: Tao Bai Commit-Queue: Drew Stonebraker Cr-Commit-Position: refs/heads/master@{#652426} --- .../common/crash_reporter/aw_crash_reporter_client.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/android_webview/common/crash_reporter/aw_crash_reporter_client.cc b/android_webview/common/crash_reporter/aw_crash_reporter_client.cc index 2f7ec5c334ea01..74eba6879dc38c 100644 --- a/android_webview/common/crash_reporter/aw_crash_reporter_client.cc +++ b/android_webview/common/crash_reporter/aw_crash_reporter_client.cc @@ -27,6 +27,8 @@ namespace android_webview { +constexpr unsigned int kCrashDumpPercentageForStable = 1; + namespace { class AwCrashReporterClient : public crash_reporter::CrashReporterClient { @@ -76,6 +78,9 @@ class AwCrashReporterClient : public crash_reporter::CrashReporterClient { return 100; } + if (version_info::android::GetChannel() == version_info::Channel::STABLE) + return kCrashDumpPercentageForStable; + return 100; }