Index: ios/chrome/browser/metrics/ios_stability_metrics_provider.mm |
diff --git a/ios/chrome/browser/metrics/ios_stability_metrics_provider.mm b/ios/chrome/browser/metrics/ios_stability_metrics_provider.mm |
index cc1af0be6c364d41ee19695630f379f62a5b78ab..8d8050daa00e32e48af72b28852d03254da7c3d3 100644 |
--- a/ios/chrome/browser/metrics/ios_stability_metrics_provider.mm |
+++ b/ios/chrome/browser/metrics/ios_stability_metrics_provider.mm |
@@ -38,14 +38,6 @@ bool IOSStabilityMetricsProvider::HasInitialStabilityMetrics() { |
void IOSStabilityMetricsProvider::ProvideInitialStabilityMetrics( |
metrics::SystemProfileProto* system_profile_proto) { |
- // If this is the first launch after an upgrade, existing crash reports |
- // may have been deleted before this code runs, so log this case in its |
- // own bucket. |
- if (IsFirstLaunchAfterUpgrade()) { |
- LogShutdownType(FIRST_LAUNCH_AFTER_UPGRADE); |
- return; |
- } |
- |
// If the last app lifetime did not end with a crash, then log it as a |
// normal shutdown while in the background. |
if (metrics_service_->WasLastShutdownClean()) { |
@@ -53,6 +45,14 @@ void IOSStabilityMetricsProvider::ProvideInitialStabilityMetrics( |
return; |
} |
+ // If this is the first launch after an upgrade, existing crash reports |
+ // may have been deleted before this code runs, so log this case in its |
+ // own bucket. |
+ if (IsFirstLaunchAfterUpgrade()) { |
stuartmorgan
2015/07/21 20:16:24
I realized after suggesting just flipping these th
lpromero
2015/07/21 22:12:07
That's indeed to be checked. I will check that tom
Olivier
2015/07/22 16:54:19
If the WasLastShutdownClean is not reliable after
stuartmorgan
2015/07/28 22:27:43
The comment for this block is still true AFAICT. M
Olivier
2015/07/29 08:01:27
Even if we clean the reports, we can keep track th
|
+ LogShutdownType(SHUTDOWN_IN_FOREGROUND_UNKNOWN_LOG_STATE); |
+ return; |
+ } |
+ |
// If the last app lifetime ended in a crash, log the type of crash. |
MobileSessionShutdownType shutdown_type; |
const bool with_crash_log = |