Commit 6d9cef49 authored by Ian Barkley-Yeung's avatar Ian Barkley-Yeung Committed by Commit Bot

Added more VLOGs for crash consent

Added some VLOG messages to
ChromeCrashReporterClient::GetCollectStatsConsent to explain why it is
returning false. Crash-related tests on ChromeOS have been flaky; this
is part of understanding why.

BUG=chromium:994987,chromium:984807
TEST=Ran Chrome with and without consent, and Chromium with and without
consent. Ensured crash dumps produced only for Chrome with consent, and
that (with --vmodule=chrome_crash_reporter_client=1), expected messages
were generated.

Change-Id: Iecf77fd78a7aee0c5eb2ba852ad576d84cac6b71
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1833929Reviewed-by: default avatarRobert Sesek <rsesek@chromium.org>
Commit-Queue: Ian Barkley-Yeung <iby@chromium.org>
Cr-Commit-Position: refs/heads/master@{#702130}
parent efded41b
...@@ -164,8 +164,12 @@ bool ChromeCrashReporterClient::GetCollectStatsConsent() { ...@@ -164,8 +164,12 @@ bool ChromeCrashReporterClient::GetCollectStatsConsent() {
bool is_stable_channel = bool is_stable_channel =
chrome::GetChannel() == version_info::Channel::STABLE; chrome::GetChannel() == version_info::Channel::STABLE;
if (is_guest_session && is_stable_channel) if (is_guest_session && is_stable_channel) {
VLOG(1) << "GetCollectStatsConsent(): is_guest_session " << is_guest_session
<< " && is_stable_channel " << is_stable_channel
<< " so returning false";
return false; return false;
}
#endif // defined(OS_CHROMEOS) #endif // defined(OS_CHROMEOS)
#if defined(OS_ANDROID) #if defined(OS_ANDROID)
...@@ -174,8 +178,15 @@ bool ChromeCrashReporterClient::GetCollectStatsConsent() { ...@@ -174,8 +178,15 @@ bool ChromeCrashReporterClient::GetCollectStatsConsent() {
// do not upload them. // do not upload them.
return is_official_chrome_build; return is_official_chrome_build;
#else // !defined(OS_ANDROID) #else // !defined(OS_ANDROID)
return is_official_chrome_build && if (!is_official_chrome_build) {
GoogleUpdateSettings::GetCollectStatsConsent(); VLOG(1) << "GetCollectStatsConsent(): is_official_chrome_build is false "
<< "so returning false";
return false;
}
bool settings_consent = GoogleUpdateSettings::GetCollectStatsConsent();
VLOG(1) << "GetCollectStatsConsent(): settings_consent: " << settings_consent
<< " so returning that";
return settings_consent;
#endif // defined(OS_ANDROID) #endif // defined(OS_ANDROID)
} }
......
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