Commit 9ca6d9b1 authored by Peter K. Lee's avatar Peter K. Lee Committed by Commit Bot

Improved comment explaining interpretation of First Launch after Upgrade

For MobileSessionShutdownType histogram, there is a
FIRST_LAUNCH_AFTER_UPGRADE. The comment the code that logs this status
is improved to better explain why ignoring First Launch After Upgrade is
the right thing to do.

Change-Id: If09af3fa46155c269a97e05253eedc4febc37d68
Reviewed-on: https://chromium-review.googlesource.com/c/1320129Reviewed-by: default avatarOlivier Robin <olivierrobin@chromium.org>
Commit-Queue: Peter Lee <pkl@chromium.org>
Cr-Commit-Position: refs/heads/master@{#606078}
parent 91a16f43
...@@ -40,9 +40,19 @@ bool MobileSessionShutdownMetricsProvider::HasPreviousSessionData() { ...@@ -40,9 +40,19 @@ bool MobileSessionShutdownMetricsProvider::HasPreviousSessionData() {
void MobileSessionShutdownMetricsProvider::ProvidePreviousSessionData( void MobileSessionShutdownMetricsProvider::ProvidePreviousSessionData(
metrics::ChromeUserMetricsExtension* uma_proto) { metrics::ChromeUserMetricsExtension* uma_proto) {
// If this is the first launch after an upgrade, existing crash reports may // If app was upgraded since the last session, even if the previous session
// have been deleted before this code runs, so log this case in its own // ended in an unclean shutdown (crash, may or may not be UTE), this should
// bucket. // *not* be logged into one of the Foreground* or Background* states of
// MobileSessionShutdownType. The crash is really from the pre-upgraded
// version of app. Logging it now will incorrectly inflate the current
// version's crash count with a crash that happened in a previous version of
// the app.
//
// Not counting first run after upgrade does *not* bias the distribution of
// the 4 Foreground* termination states because the reason of a crash would
// not be affected by an imminent upgrade of Chrome app. Thus, the ratio of
// Foreground shutdowns w/ crash log vs. w/o crash log is expected to be the
// same regardless of whether First Launch after Upgrade is considered or not.
if (IsFirstLaunchAfterUpgrade()) { if (IsFirstLaunchAfterUpgrade()) {
LogShutdownType(FIRST_LAUNCH_AFTER_UPGRADE); LogShutdownType(FIRST_LAUNCH_AFTER_UPGRADE);
return; return;
......
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