Commit 46025da6 authored by Drew Stonebraker's avatar Drew Stonebraker Committed by Commit Bot

Do not subsample crash reporting on debug android

Report 100% of crashes on debuggable builds. This may help us find
dogfood/dev/etc related issues more quickly.

Bug: 984619
Test: Add logs in is_debug_android to test expected values.
Change-Id: I3132b42d42ce1a5609c3ab688c4d56749fee1598
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1704693Reviewed-by: default avatarTobias Sargeant <tobiasjs@chromium.org>
Reviewed-by: default avatarRichard Coles <torne@chromium.org>
Commit-Queue: Drew Stonebraker <stonebraker@chromium.org>
Cr-Commit-Position: refs/heads/master@{#678367}
parent 579b892e
...@@ -74,7 +74,8 @@ class AwCrashReporterClient : public crash_reporter::CrashReporterClient { ...@@ -74,7 +74,8 @@ class AwCrashReporterClient : public crash_reporter::CrashReporterClient {
unsigned int GetCrashDumpPercentage() override { unsigned int GetCrashDumpPercentage() override {
if (base::CommandLine::ForCurrentProcess()->HasSwitch( if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableCrashReporterForTesting)) { switches::kEnableCrashReporterForTesting) ||
base::android::BuildInfo::GetInstance()->is_debug_android()) {
return 100; return 100;
} }
......
...@@ -76,7 +76,8 @@ BuildInfo::BuildInfo(const std::vector<std::string>& params) ...@@ -76,7 +76,8 @@ BuildInfo::BuildInfo(const std::vector<std::string>& params)
custom_themes_(StrDupParam(params, 19)), custom_themes_(StrDupParam(params, 19)),
resources_version_(StrDupParam(params, 20)), resources_version_(StrDupParam(params, 20)),
extracted_file_suffix_(params[21]), extracted_file_suffix_(params[21]),
is_at_least_q_(GetIntParam(params, 22)) {} is_at_least_q_(GetIntParam(params, 22)),
is_debug_android_(GetIntParam(params, 23)) {}
// static // static
BuildInfo* BuildInfo::GetInstance() { BuildInfo* BuildInfo::GetInstance() {
......
...@@ -124,6 +124,8 @@ class BASE_EXPORT BuildInfo { ...@@ -124,6 +124,8 @@ class BASE_EXPORT BuildInfo {
bool is_at_least_q() const { return is_at_least_q_; } bool is_at_least_q() const { return is_at_least_q_; }
bool is_debug_android() const { return is_debug_android_; }
private: private:
friend struct BuildInfoSingletonTraits; friend struct BuildInfoSingletonTraits;
...@@ -157,6 +159,7 @@ class BASE_EXPORT BuildInfo { ...@@ -157,6 +159,7 @@ class BASE_EXPORT BuildInfo {
// Not needed by breakpad. // Not needed by breakpad.
const std::string extracted_file_suffix_; const std::string extracted_file_suffix_;
const bool is_at_least_q_; const bool is_at_least_q_;
const bool is_debug_android_;
DISALLOW_COPY_AND_ASSIGN(BuildInfo); DISALLOW_COPY_AND_ASSIGN(BuildInfo);
}; };
......
...@@ -83,6 +83,7 @@ public class BuildInfo { ...@@ -83,6 +83,7 @@ public class BuildInfo {
buildInfo.resourcesVersion, buildInfo.resourcesVersion,
buildInfo.extractedFileSuffix, buildInfo.extractedFileSuffix,
isAtLeastQ() ? "1" : "0", isAtLeastQ() ? "1" : "0",
isDebugAndroid() ? "1" : "0",
}; };
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment